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) ([]*zondpb.SignedVoluntaryExit, error)
- func (p *Pool) InsertVoluntaryExit(exit *zondpb.SignedVoluntaryExit)
- func (p *Pool) MarkIncluded(exit *zondpb.SignedVoluntaryExit)
- func (p *Pool) PendingExits() ([]*zondpb.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 ¶
func (p *Pool) ExitsForInclusion(state state.ReadOnlyBeaconState, slot types.Slot) ([]*zondpb.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 *zondpb.SignedVoluntaryExit)
InsertVoluntaryExit into the pool.
func (*Pool) MarkIncluded ¶
func (p *Pool) MarkIncluded(exit *zondpb.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() ([]*zondpb.SignedVoluntaryExit, error)
PendingExits returns all objects from the pool.
type PoolManager ¶
type PoolManager interface { PendingExits() ([]*zondpb.SignedVoluntaryExit, error) ExitsForInclusion(state state.ReadOnlyBeaconState, slot types.Slot) ([]*zondpb.SignedVoluntaryExit, error) InsertVoluntaryExit(exit *zondpb.SignedVoluntaryExit) MarkIncluded(exit *zondpb.SignedVoluntaryExit) }
PoolManager maintains pending and seen voluntary exits. This pool is used by proposers to insert voluntary exits into new blocks.