Documentation ¶
Overview ¶
Package voluntaryexits defines an in-memory pool of received voluntary exit events by the beacon node, handling their lifecycle and performing integrity checks before serving them as objects for validators to include in blocks.
Index ¶
- type Pool
- func (p *Pool) ExitsForInclusion(state state.ReadOnlyBeaconState, slot types.Slot) ([]*ethpb.SignedVoluntaryExit, error)
- func (p *Pool) InsertVoluntaryExit(exit *ethpb.SignedVoluntaryExit)
- func (p *Pool) MarkIncluded(exit *ethpb.SignedVoluntaryExit)
- func (p *Pool) PendingExits() ([]*ethpb.SignedVoluntaryExit, error)
- type PoolManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool is a concrete implementation of PoolManager.
func (*Pool) ExitsForInclusion ¶ added in v3.2.2
func (p *Pool) ExitsForInclusion(state state.ReadOnlyBeaconState, slot types.Slot) ([]*ethpb.SignedVoluntaryExit, error)
ExitsForInclusion returns objects that are ready for inclusion at the given slot. This method will not return more than the block enforced MaxVoluntaryExits.
func (*Pool) InsertVoluntaryExit ¶
func (p *Pool) InsertVoluntaryExit(exit *ethpb.SignedVoluntaryExit)
InsertVoluntaryExit into the pool.
func (*Pool) MarkIncluded ¶
func (p *Pool) MarkIncluded(exit *ethpb.SignedVoluntaryExit)
MarkIncluded is used when an exit has been included in a beacon block. Every block seen by this node should call this method to include the exit. This will remove the exit from the pool.
func (*Pool) PendingExits ¶
func (p *Pool) PendingExits() ([]*ethpb.SignedVoluntaryExit, error)
PendingExits returns all objects from the pool.
type PoolManager ¶
type PoolManager interface { PendingExits() ([]*ethpb.SignedVoluntaryExit, error) ExitsForInclusion(state state.ReadOnlyBeaconState, slot types.Slot) ([]*ethpb.SignedVoluntaryExit, error) InsertVoluntaryExit(exit *ethpb.SignedVoluntaryExit) MarkIncluded(exit *ethpb.SignedVoluntaryExit) }
PoolManager maintains pending and seen voluntary exits. This pool is used by proposers to insert voluntary exits into new blocks.