lodestar icon indicating copy to clipboard operation
lodestar copied to clipboard

Add types for representing LC Merkle branches

Open nflaig opened this issue 1 year ago • 1 comments

Add named ssz types introduced in https://github.com/ethereum/consensus-specs/pull/3563 for representing LC Merkle branches.

Name SSZ equivalent Description
FinalityBranch Vector[Bytes32, floorlog2(FINALIZED_ROOT_GINDEX)] Merkle branch of finalized_checkpoint.root within BeaconState
CurrentSyncCommitteeBranch Vector[Bytes32, floorlog2(CURRENT_SYNC_COMMITTEE_GINDEX)] Merkle branch of current_sync_committee within BeaconState
NextSyncCommitteeBranch Vector[Bytes32, floorlog2(NEXT_SYNC_COMMITTEE_GINDEX)] Merkle branch of next_sync_committee within BeaconState
ExecutionBranch Vector[Bytes32, floorlog2(EXECUTION_PAYLOAD_GINDEX)] Merkle branch of execution_payload within BeaconBlockBody

The types should be added and exported as part of @lodestar/types package

https://github.com/ChainSafe/lodestar/blob/8cc5f0477acd729d02b4fe0b76fe1779da0882e6/packages/types/src/altair/sszTypes.ts#L206

https://github.com/ChainSafe/lodestar/blob/8cc5f0477acd729d02b4fe0b76fe1779da0882e6/packages/types/src/capella/sszTypes.ts#L209

nflaig avatar Jan 18 '24 21:01 nflaig

@nflaig Can I take this please ?

0xChaddB avatar May 29 '25 11:05 0xChaddB