Skip to content

Decoding of BEEFY justifications: VersionedFinalityProof, not Option<SignedCommitment> #929

@Lederstrumpf

Description

@Lederstrumpf

BEEFY justifications are encoded as VersionedFinalityProofs.
Snowbridge's commitment scanner currently parses these BEEFY justifications as OptionalSignedCommitment here.
This inadvertently works because the first byte of an encoded VersionedFinalityProof signals the version (currently strictly 1), which overlaps with the 1 used to signal Some(..) in an encoded option.
However, it will break once we add new VersionedFinalityProof versions, such as required for paritytech/polkadot-sdk#1119.

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