func (s *server) GetValidatorProof(ctx context.Context, req *pb.GetValidatorProofRequest) (*pb.GetValidatorProofResponse, error) {
	node, state := s.chain.View.GetFinalizedHead()
	proof, err := proofs.ConstructValidatorProof(&state, req.ValidatorID)
	if err != nil {
		return nil, err
	}

	return &pb.GetValidatorProofResponse{
		FinalizedHash: node.Hash[:],
		Proof:         proof.ToProto(),
	}, nil
}
// GetValidatorRoot gets the validator root for a specified block.
GetValidatorRoot gets the validator root for a specified block.
// GetValidatorRoot gets the validator root for a specified block .
func (s *server) GetValidatorProof(ctx context.Context, req *pb.GetValidatorProofRequest) (*pb.GetValidatorProofResponse, error) {
	node, state := s.chain.View.GetFinalizedHead()
	proof, err := proofs.ConstructValidatorProof(&state, req.ValidatorID)
	if err != nil {
		return nil, err
	}
	return &pb.GetValidatorProofResponse{
		FinalizedHash: node.Hash[:],
		Proof:         proof.ToProto(),
	}, nil
}
func ( s * server ) GetValidatorProof ( ctx context . Context , req * pb . GetValidatorProofRequest ) ( * pb . GetValidatorProofResponse , error ) { node , state := s . chain . View . GetFinalizedHead ( ) proof , err := proofs . ConstructValidatorProof ( & state , req . ValidatorID ) if err != nil { return nil , err } return & pb . GetValidatorProofResponse { FinalizedHash : node . Hash [ : ] , Proof : proof . ToProto ( ) , } , nil }
GetValidatorRoot gets the validator root for a specified block.
GetValidatorRoot gets the validator root for a specified block .