voluntaryexits

package
v4.0.4-rc.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2023 License: GPL-3.0 Imports: 10 Imported by: 20

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

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 NewPool

func NewPool() *Pool

NewPool returns an initialized pool.

func (*Pool) ExitsForInclusion

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL