interop

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: GPL-3.0 Imports: 16 Imported by: 46

Documentation

Overview

Package interop contains deterministic utilities for generating genesis states and keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DepositDataFromKeys

func DepositDataFromKeys(privKeys []bls.SecretKey, pubKeys []bls.PublicKey) ([]*ethpb.Deposit_Data, [][]byte, error)

DepositDataFromKeys generates a list of deposit data items from a set of BLS validator keys.

func DeterministicallyGenerateKeys

func DeterministicallyGenerateKeys(startIndex, numKeys uint64) ([]bls.SecretKey, []bls.PublicKey, error)

DeterministicallyGenerateKeys creates BLS private keys using a fixed curve order according to the algorithm specified in the Ethereum beacon chain specification interop mock start section found here: https://github.com/ethereum/eth2.0-pm/blob/a085c9870f3956d6228ed2a40cd37f0c6580ecd7/interop/mocked_start/README.md

func GenerateDepositsFromData

func GenerateDepositsFromData(depositDataItems []*ethpb.Deposit_Data, trie *trieutil.SparseMerkleTrie) ([]*ethpb.Deposit, error)

GenerateDepositsFromData a list of deposit items by creating proofs for each of them from a sparse Merkle trie.

func GenerateGenesisState

func GenerateGenesisState(ctx context.Context, genesisTime, numValidators uint64) (*pb.BeaconState, []*ethpb.Deposit, error)

GenerateGenesisState deterministically given a genesis time and number of validators. If a genesis time of 0 is supplied it is set to the current time.

func GenerateGenesisStateFromDepositData added in v1.0.0

func GenerateGenesisStateFromDepositData(
	ctx context.Context, genesisTime uint64, depositData []*ethpb.Deposit_Data, depositDataRoots [][]byte,
) (*pb.BeaconState, []*ethpb.Deposit, error)

GenerateGenesisStateFromDepositData creates a genesis state given a list of deposit data items and their corresponding roots.

Types

This section is empty.

Jump to

Keyboard shortcuts

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