voluntaryexits

package
v1.0.0-alpha.6.3 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: GPL-3.0 Imports: 7 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 implements a struct to maintain pending and recently included voluntary exits. This pool is used by proposers to insert into new blocks.

func NewPool

func NewPool() *Pool

NewPool accepts a head fetcher (for reading the validator set) and returns an initialized voluntary exit pool.

func (*Pool) InsertVoluntaryExit

func (p *Pool) InsertVoluntaryExit(ctx context.Context, state *beaconstate.BeaconState, exit *ethpb.SignedVoluntaryExit)

InsertVoluntaryExit into the pool. This method is a no-op if the pending exit already exists, has been included recently, or the validator is already exited.

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.

func (*Pool) PendingExits

func (p *Pool) PendingExits(state *beaconstate.BeaconState, slot uint64) []*ethpb.SignedVoluntaryExit

PendingExits returns exits that are ready for inclusion at the given slot. This method will not return more than the block enforced MaxVoluntaryExits.

Jump to

Keyboard shortcuts

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