func ValidatorProofFromProto(proof *pb.ValidatorProof) (*ValidatorProof, error) {
	if len(proof.PublicKey) != 96 {
		return nil, fmt.Errorf("expected validator proof public key to be 96 bytes, got %d", len(proof.PublicKey))
	}
	var pubKey [96]byte
	copy(pubKey[:], proof.PublicKey)

	witness, err := VerificationWitnessFromProto(proof.Proof)
	if err != nil {
		return nil, err
	}

	return &ValidatorProof{
		ShardID:        proof.ShardID,
		ValidatorIndex: proof.ValidatorIndex,
		PublicKey:      pubKey,
		Proof:          *witness,
	}, nil
}
// ValidatorProofFromProto converts a validator proof to protobuf format.
ValidatorProofFromProto converts a validator proof to protobuf format.
// ValidatorProofFromProto converts a validator proof to protobuf format .
func ValidatorProofFromProto(proof *pb.ValidatorProof) (*ValidatorProof, error) {
	if len(proof.PublicKey) != 96 {
		return nil, fmt.Errorf("expected validator proof public key to be 96 bytes, got %d", len(proof.PublicKey))
	}
	var pubKey [96]byte
	copy(pubKey[:], proof.PublicKey)
	witness, err := VerificationWitnessFromProto(proof.Proof)
	if err != nil {
		return nil, err
	}
	return &ValidatorProof{
		ShardID:        proof.ShardID,
		ValidatorIndex: proof.ValidatorIndex,
		PublicKey:      pubKey,
		Proof:          *witness,
	}, nil
}
func ValidatorProofFromProto ( proof * pb . ValidatorProof ) ( * ValidatorProof , error ) { if len ( proof . PublicKey ) != 96 { return nil , fmt . Errorf ( " " , len ( proof . PublicKey ) ) } var pubKey [ 96 ] byte copy ( pubKey [ : ] , proof . PublicKey ) witness , err := VerificationWitnessFromProto ( proof . Proof ) if err != nil { return nil , err } return & ValidatorProof { ShardID : proof . ShardID , ValidatorIndex : proof . ValidatorIndex , PublicKey : pubKey , Proof : * witness , } , nil }
ValidatorProofFromProto converts a validator proof to protobuf format.
ValidatorProofFromProto converts a validator proof to protobuf format .