interopcoldstart

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: 15 Imported by: 0

Documentation

Overview

Package interopcoldstart allows for spinning up a deterministic-genesis local chain without the need for eth1 deposits useful for local client development and interoperability testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GenesisTime   uint64
	NumValidators uint64
	BeaconDB      db.HeadAccessDatabase
	DepositCache  cache.DepositCache
	GenesisPath   string
}

Config options for the interop service.

type Service

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

Service spins up an client interoperability service that handles responsibilities such as kickstarting a genesis state for the beacon node from cli flags or a genesis.ssz file.

func NewService

func NewService(ctx context.Context, cfg *Config) *Service

NewService is an interoperability testing service to inject a deterministically generated genesis state into the beacon chain database and running services at start up. This service should not be used in production as it does not have any value other than ease of use for testing purposes.

func (*Service) AllDepositContainers

func (s *Service) AllDepositContainers(ctx context.Context) []*zondpb.DepositContainer

func (*Service) AllDeposits

func (_ *Service) AllDeposits(_ context.Context, _ *big.Int) []*zondpb.Deposit

AllDeposits mocks out the deposit cache functionality for interop.

func (*Service) ChainStartEth1Data

func (_ *Service) ChainStartEth1Data() *zondpb.Eth1Data

ChainStartEth1Data mocks out the powchain functionality for interop.

func (*Service) ClearPreGenesisData

func (_ *Service) ClearPreGenesisData()

ClearPreGenesisData --

func (*Service) DepositByPubkey

func (_ *Service) DepositByPubkey(_ context.Context, _ []byte) (*zondpb.Deposit, *big.Int)

DepositByPubkey mocks out the deposit cache functionality for interop.

func (*Service) DepositsNumberAndRootAtHeight

func (_ *Service) DepositsNumberAndRootAtHeight(_ context.Context, _ *big.Int) (uint64, [32]byte)

DepositsNumberAndRootAtHeight mocks out the deposit cache functionality for interop.

func (*Service) FinalizedDeposits

func (_ *Service) FinalizedDeposits(ctx context.Context) (cache.FinalizedDeposits, error)

FinalizedDeposits mocks out the deposit cache functionality for interop.

func (*Service) InsertPendingDeposit

func (s *Service) InsertPendingDeposit(ctx context.Context, d *zondpb.Deposit, blockNum uint64, index int64, depositRoot [32]byte)

func (*Service) NonFinalizedDeposits

func (_ *Service) NonFinalizedDeposits(_ context.Context, _ int64, _ *big.Int) []*zondpb.Deposit

NonFinalizedDeposits mocks out the deposit cache functionality for interop.

func (*Service) PendingContainers

func (s *Service) PendingContainers(ctx context.Context, untilBlk *big.Int) []*zondpb.DepositContainer

func (*Service) PendingDeposits

func (s *Service) PendingDeposits(ctx context.Context, untilBlk *big.Int) []*zondpb.Deposit

func (*Service) PreGenesisState

func (_ *Service) PreGenesisState() state.BeaconState

PreGenesisState returns an empty beacon state.

func (*Service) PrunePendingDeposits

func (s *Service) PrunePendingDeposits(ctx context.Context, merkleTreeIndex int64)

func (*Service) PruneProofs

func (s *Service) PruneProofs(ctx context.Context, untilDepositIndex int64) error

func (*Service) Start

func (s *Service) Start()

Start initializes the genesis state from configured flags.

func (*Service) Status

func (_ *Service) Status() error

Status always returns nil.

func (*Service) Stop

func (_ *Service) Stop() error

Stop does nothing.

Jump to

Keyboard shortcuts

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