Documentation ¶
Overview ¶
Package interop contains deterministic utilities for generating genesis states and keys.
Index ¶
- func DepositDataFromKeys(privKeys []*bls.SecretKey, pubKeys []*bls.PublicKey) ([]*ethpb.Deposit_Data, [][]byte, error)
- func DeterministicallyGenerateKeys(startIndex, numKeys uint64) ([]*bls.SecretKey, []*bls.PublicKey, error)
- func GenerateDepositsFromData(depositDataItems []*ethpb.Deposit_Data, trie *trieutil.SparseMerkleTrie) ([]*ethpb.Deposit, error)
- func GenerateGenesisState(genesisTime, numValidators uint64) (*pb.BeaconState, []*ethpb.Deposit, error)
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.