func (s *State) ValidateProofOfPossession(pubkey *bls.PublicKey, proofOfPossession bls.Signature, withdrawalCredentials chainhash.Hash) (bool, error) {
	// fixme

	h, err := ssz.HashTreeRoot(pubkey.Serialize())
	if err != nil {
		return false, err
	}
	valid, err := bls.VerifySig(pubkey, h[:], &proofOfPossession, bls.DomainDeposit)
	if err != nil {
		return false, err
	}
	return valid, nil
}
// ValidateProofOfPossession validates a proof of possession for a new validator.
ValidateProofOfPossession validates a proof of possession for a new validator.
// ValidateProofOfPossession validates a proof of possession for a new validator .
func (s *State) ValidateProofOfPossession(pubkey *bls.PublicKey, proofOfPossession bls.Signature, withdrawalCredentials chainhash.Hash) (bool, error) {
	h, err := ssz.HashTreeRoot(pubkey.Serialize())
	if err != nil {
		return false, err
	}
	valid, err := bls.VerifySig(pubkey, h[:], &proofOfPossession, bls.DomainDeposit)
	if err != nil {
		return false, err
	}
	return valid, nil
}
func ( s * State ) ValidateProofOfPossession ( pubkey * bls . PublicKey , proofOfPossession bls . Signature , withdrawalCredentials chainhash . Hash ) ( bool , error ) { h , err := ssz . HashTreeRoot ( pubkey . Serialize ( ) ) if err != nil { return false , err } valid , err := bls . VerifySig ( pubkey , h [ : ] , & proofOfPossession , bls . DomainDeposit ) if err != nil { return false , err } return valid , nil }
ValidateProofOfPossession validates a proof of possession for a new validator.
ValidateProofOfPossession validates a proof of possession for a new validator .
// fixme