Documentation
¶
Index ¶
- func BlockToLightClientHeader(block *cltypes.SignedBeaconBlock) (*cltypes.LightClientHeader, error)
- func CreateLightClientBootstrap(state *state.CachingBeaconState, block *cltypes.SignedBeaconBlock) (*cltypes.LightClientBootstrap, error)
- func CreateLightClientUpdate(cfg *clparams.BeaconChainConfig, block *cltypes.SignedBeaconBlock, ...) (*cltypes.LightClientUpdate, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockToLightClientHeader ¶
func BlockToLightClientHeader(block *cltypes.SignedBeaconBlock) (*cltypes.LightClientHeader, error)
def block_to_light_client_header(block: SignedBeaconBlock) -> LightClientHeader:
return LightClientHeader( beacon=BeaconBlockHeader( slot=block.message.slot, proposer_index=block.message.proposer_index, parent_root=block.message.parent_root, state_root=block.message.state_root, body_root=hash_tree_root(block.message.body), ), )
func CreateLightClientBootstrap ¶
func CreateLightClientBootstrap(state *state.CachingBeaconState, block *cltypes.SignedBeaconBlock) (*cltypes.LightClientBootstrap, error)
return LightClientBootstrap(
header=block_to_light_client_header(block), current_sync_committee=state.current_sync_committee, current_sync_committee_branch=CurrentSyncCommitteeBranch( compute_merkle_proof(state, CURRENT_SYNC_COMMITTEE_GINDEX)),
)
func CreateLightClientUpdate ¶
func CreateLightClientUpdate(cfg *clparams.BeaconChainConfig, block *cltypes.SignedBeaconBlock, finalizedBlock *cltypes.SignedBeaconBlock, attestedBlock *cltypes.SignedBeaconBlock, attestedSlot uint64, attestedNextSyncCommittee *solid.SyncCommittee, attestedFinalizedCheckpoint solid.Checkpoint, attestedNextSyncCommitteeBranch, attestedFinalityBranch solid.HashVectorSSZ) (*cltypes.LightClientUpdate, error)
return update CreateLightClientUpdate implements the specs to initialize the light client update
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.