Documentation ¶
Index ¶
- func BlockToLightClientHeader(ctx context.Context, currentSlot primitives.Slot, ...) (interfaces.LightClientHeader, error)
- func ComputeTransactionsRoot(payload interfaces.ExecutionData) ([]byte, error)
- func ComputeWithdrawalsRoot(payload interfaces.ExecutionData) ([]byte, error)
- func CreateDefaultLightClientUpdate(currentSlot primitives.Slot, attestedState state.BeaconState) (interfaces.LightClientUpdate, error)
- func HasFinality(update interfaces.LightClientUpdate) (bool, error)
- func HasRelevantSyncCommittee(update interfaces.LightClientUpdate) (bool, error)
- func IsBetterUpdate(newUpdate, oldUpdate interfaces.LightClientUpdate) (bool, error)
- func NewLightClientBootstrapFromBeaconState(ctx context.Context, currentSlot primitives.Slot, state state.BeaconState, ...) (interfaces.LightClientBootstrap, error)
- func NewLightClientFinalityUpdateFromBeaconState(ctx context.Context, currentSlot primitives.Slot, state state.BeaconState, ...) (interfaces.LightClientFinalityUpdate, error)
- func NewLightClientOptimisticUpdateFromBeaconState(ctx context.Context, currentSlot primitives.Slot, state state.BeaconState, ...) (interfaces.LightClientOptimisticUpdate, error)
- func NewLightClientUpdateFromBeaconState(ctx context.Context, currentSlot primitives.Slot, state state.BeaconState, ...) (interfaces.LightClientUpdate, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockToLightClientHeader ¶
func BlockToLightClientHeader( ctx context.Context, currentSlot primitives.Slot, block interfaces.ReadOnlySignedBeaconBlock, ) (interfaces.LightClientHeader, error)
func ComputeTransactionsRoot ¶
func ComputeTransactionsRoot(payload interfaces.ExecutionData) ([]byte, error)
func ComputeWithdrawalsRoot ¶
func ComputeWithdrawalsRoot(payload interfaces.ExecutionData) ([]byte, error)
func CreateDefaultLightClientUpdate ¶ added in v5.2.0
func CreateDefaultLightClientUpdate(currentSlot primitives.Slot, attestedState state.BeaconState) (interfaces.LightClientUpdate, error)
func HasFinality ¶ added in v5.2.0
func HasFinality(update interfaces.LightClientUpdate) (bool, error)
func HasRelevantSyncCommittee ¶ added in v5.2.0
func HasRelevantSyncCommittee(update interfaces.LightClientUpdate) (bool, error)
func IsBetterUpdate ¶ added in v5.2.0
func IsBetterUpdate(newUpdate, oldUpdate interfaces.LightClientUpdate) (bool, error)
func NewLightClientBootstrapFromBeaconState ¶ added in v5.2.0
func NewLightClientBootstrapFromBeaconState( ctx context.Context, currentSlot primitives.Slot, state state.BeaconState, block interfaces.ReadOnlySignedBeaconBlock, ) (interfaces.LightClientBootstrap, error)
func NewLightClientFinalityUpdateFromBeaconState ¶
func NewLightClientFinalityUpdateFromBeaconState( ctx context.Context, currentSlot primitives.Slot, state state.BeaconState, block interfaces.ReadOnlySignedBeaconBlock, attestedState state.BeaconState, attestedBlock interfaces.ReadOnlySignedBeaconBlock, finalizedBlock interfaces.ReadOnlySignedBeaconBlock, ) (interfaces.LightClientFinalityUpdate, error)
func NewLightClientOptimisticUpdateFromBeaconState ¶
func NewLightClientOptimisticUpdateFromBeaconState( ctx context.Context, currentSlot primitives.Slot, state state.BeaconState, block interfaces.ReadOnlySignedBeaconBlock, attestedState state.BeaconState, attestedBlock interfaces.ReadOnlySignedBeaconBlock, ) (interfaces.LightClientOptimisticUpdate, error)
func NewLightClientUpdateFromBeaconState ¶
func NewLightClientUpdateFromBeaconState( ctx context.Context, currentSlot primitives.Slot, state state.BeaconState, block interfaces.ReadOnlySignedBeaconBlock, attestedState state.BeaconState, attestedBlock interfaces.ReadOnlySignedBeaconBlock, finalizedBlock interfaces.ReadOnlySignedBeaconBlock) (interfaces.LightClientUpdate, error)
To form a LightClientUpdate, the following historical states and blocks are needed:
- state: the post state of any block with a post-Altair parent block
- block: the corresponding block
- attested_state: the post state of attested_block
- attested_block: the block referred to by block.parent_root
- finalized_block: the block referred to by attested_state.finalized_checkpoint.root, if locally available (may be unavailable, e.g., when using checkpoint sync, or if it was pruned locally)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.