canopy-network/canopy · error
invalid bls public key: point at infinity
Error message
invalid bls public key: point at infinity
What it means
Raised in BytesToBLS12381Point when the deserialized G1 point equals the identity (point at infinity). The identity element is not a usable BLS public key because it makes every aggregate signature verify trivially, so bytes encoding infinity are rejected.
Source
Thrown at lib/crypto/bls.go:182
func BytesToBLS12381Public(bz []byte) (PublicKeyI, error) {
point, err := BytesToBLS12381Point(bz)
if err != nil {
return nil, err
}
return &BLS12381PublicKey{
Point: point,
scheme: newBLSScheme(),
}, nil
}
// BytesToBLS12381Point() creates a new G1 point on BLS12-381 curve which is the public key of the pair
func BytesToBLS12381Point(bz []byte) (kyber.Point, error) {
point := newBLSSuite().G1().Point()
if err := point.UnmarshalBinary(bz); err != nil {
return nil, err
}
if point.Equal(newBLSSuite().G1().Point().Null()) {
return nil, errors.New("invalid bls public key: point at infinity")
}
return point, nil
}
// Address() returns the short version of the public key
func (b *BLS12381PublicKey) Address() AddressI {
// hash the public key
pubHash := Hash(b.Bytes())
// take the first 20 bytes of the public key
address := Address(pubHash[:AddressSize])
// return the result
return &address
}
// Bytes() returns the protobuf bytes representation of the public key
func (b *BLS12381PublicKey) Bytes() []byte {
bz, _ := b.MarshalBinary()
return bzView on GitHub (pinned to ee8197d91d)
Solutions
- Reject the offending key at its source: the validator or signer serialized a degenerate key; regenerate it from a proper private key.
- Validate key material before storing it so infinity-encoded keys never reach consensus logic.
- If parsing external data (e.g. validator sets), skip or blacklist entries yielding infinity points and log them.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/crypto/bls.go:182 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of canopy-network/canopy@ee8197d91d (2026-09-06).
Data as JSON: /api/errors/7bbfed3f404ecf44.
Report an issue: GitHub.