interopcoldstart

package
v0.3.10 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

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  *depositcache.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 NewColdStartService

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

NewColdStartService 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) AllDeposits

func (s *Service) AllDeposits(ctx context.Context, beforeBlk *big.Int) []*ethpb.Deposit

AllDeposits mocks out the deposit cache functionality for interop.

func (*Service) ChainStartDeposits

func (s *Service) ChainStartDeposits() []*ethpb.Deposit

ChainStartDeposits mocks out the powchain functionality for interop.

func (*Service) ChainStartEth1Data

func (s *Service) ChainStartEth1Data() *ethpb.Eth1Data

ChainStartEth1Data mocks out the powchain functionality for interop.

func (*Service) ClearPreGenesisData added in v0.3.2

func (s *Service) ClearPreGenesisData()

ClearPreGenesisData --

func (*Service) DepositByPubkey

func (s *Service) DepositByPubkey(ctx context.Context, pubKey []byte) (*ethpb.Deposit, *big.Int)

DepositByPubkey mocks out the deposit cache functionality for interop.

func (*Service) DepositsNumberAndRootAtHeight

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

DepositsNumberAndRootAtHeight mocks out the deposit cache functionality for interop.

func (*Service) PreGenesisState added in v0.3.0

func (s *Service) PreGenesisState() *stateTrie.BeaconState

PreGenesisState returns an empty beacon state.

func (*Service) Start

func (s *Service) Start()

Start initializes the genesis state from configured flags.

func (*Service) Status

func (s *Service) Status() error

Status always returns nil.

func (*Service) Stop

func (s *Service) Stop() error

Stop does nothing.

Jump to

Keyboard shortcuts

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