Skip to content

Correct validator public key type #29

@ArtiomTr

Description

@ArtiomTr
/// BLS public key - 52 bytes (as defined in lean spec)
#[derive(Clone, Debug, PartialEq, Eq, Ssz)]
#[ssz(transparent)]
pub struct BlsPublicKey(pub ByteVector<U52>);

So just to make clear - lean spec defines not BLS signatures, but XMSS. Second - if you're sure here are BLS signatures, then double-check size - as far as I remember, bls public keys are 48 bytes long, not 52.

Also, please avoid hardcoding everywhere 52. You can define type:

type PublicKeySize = U52;

And then use everywhere:

PublicKeySize::USIZE

Instead of hardcoded constant 52.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions