manager

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconMockManager

type BeaconMockManager struct {
	// contains filtered or unexported fields
}

Beacon mock manager

func NewBeaconMockManager

func NewBeaconMockManager(logger *slog.Logger, config *db.Config) *BeaconMockManager

Create a new beacon mock manager instance

func (*BeaconMockManager) AddValidator

func (m *BeaconMockManager) AddValidator(pubkey beacon.ValidatorPubkey, withdrawalCredentials common.Hash) (*db.Validator, error)

Add a validator to the Beacon chain

func (*BeaconMockManager) Beacon_Attestations

func (m *BeaconMockManager) Beacon_Attestations(ctx context.Context, blockId string) (client.AttestationsResponse, bool, error)

func (*BeaconMockManager) Beacon_Block

func (m *BeaconMockManager) Beacon_Block(ctx context.Context, blockId string) (client.BeaconBlockResponse, bool, error)

func (*BeaconMockManager) Beacon_BlsToExecutionChanges_Post

func (m *BeaconMockManager) Beacon_BlsToExecutionChanges_Post(ctx context.Context, request client.BLSToExecutionChangeRequest) error

func (*BeaconMockManager) Beacon_Committees

func (m *BeaconMockManager) Beacon_Committees(ctx context.Context, stateId string, epoch *uint64) (client.CommitteesResponse, error)

func (*BeaconMockManager) Beacon_FinalityCheckpoints

func (m *BeaconMockManager) Beacon_FinalityCheckpoints(ctx context.Context, stateId string) (client.FinalityCheckpointsResponse, error)

func (*BeaconMockManager) Beacon_Genesis

func (m *BeaconMockManager) Beacon_Genesis(ctx context.Context) (client.GenesisResponse, error)

func (*BeaconMockManager) Beacon_Header

func (*BeaconMockManager) Beacon_Validators

func (m *BeaconMockManager) Beacon_Validators(ctx context.Context, stateId string, ids []string) (client.ValidatorsResponse, error)

func (*BeaconMockManager) Beacon_VoluntaryExits_Post

func (m *BeaconMockManager) Beacon_VoluntaryExits_Post(ctx context.Context, request client.VoluntaryExitRequest) error

func (*BeaconMockManager) Config_DepositContract

func (m *BeaconMockManager) Config_DepositContract(ctx context.Context) (client.Eth2DepositContractResponse, error)

func (*BeaconMockManager) Config_Spec

func (*BeaconMockManager) GetConfig

func (m *BeaconMockManager) GetConfig() *db.Config

Returns the manager's Beacon config

func (*BeaconMockManager) GetCurrentSlot

func (m *BeaconMockManager) GetCurrentSlot() uint64

Returns the current Beacon chain slot

func (*BeaconMockManager) GetHighestSlot

func (m *BeaconMockManager) GetHighestSlot() uint64

Returns the highest Beacon chain slot (top of the chain head)

func (*BeaconMockManager) GetValidator

func (m *BeaconMockManager) GetValidator(id string) (*db.Validator, error)

Gets a validator by its index or pubkey

func (*BeaconMockManager) GetValidators

func (m *BeaconMockManager) GetValidators(ids []string) ([]*db.Validator, error)

Gets multiple validators by their indices or pubkeys

func (*BeaconMockManager) IncrementSlot

func (m *BeaconMockManager) IncrementSlot()

Increments the Beacon chain slot - use this to have parity with mining a new block on the EL

func (*BeaconMockManager) Node_Syncing

func (*BeaconMockManager) RevertToSnapshot

func (m *BeaconMockManager) RevertToSnapshot(name string) error

Revert to a snapshot of the database state

func (*BeaconMockManager) SetCurrentSlot

func (m *BeaconMockManager) SetCurrentSlot(slot uint64)

Sets the current Beacon chain slot

func (*BeaconMockManager) SetDatabase

func (m *BeaconMockManager) SetDatabase(db *db.Database)

Set the database for the manager directly if you need to custom provision it

func (*BeaconMockManager) TakeSnapshot

func (m *BeaconMockManager) TakeSnapshot(name string)

Take a snapshot of the current database state

func (*BeaconMockManager) Validator_DutiesProposer

func (m *BeaconMockManager) Validator_DutiesProposer(ctx context.Context, indices []string, epoch uint64) (client.ProposerDutiesResponse, error)

func (*BeaconMockManager) Validator_DutiesSync_Post

func (m *BeaconMockManager) Validator_DutiesSync_Post(ctx context.Context, indices []string, epoch uint64) (client.SyncDutiesResponse, error)

Jump to

Keyboard shortcuts

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