voluntaryexits

package
v4.0.0-...-b8b0360 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

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) ([]*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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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