Optimality of variational inference for stochasticblock model with missing links