interop

package
v1.0.0-alpha.6.9 Latest Latest
Warning

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

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

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 Eth2.0-Specs 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(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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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