Documentation ¶
Index ¶
- func GenerateKeys(algo crypto.SigningAlgorithm, n int, seeds [][]byte) ([]crypto.PrivateKey, error)
- func GenerateMachineAccountKey(seed []byte) (crypto.PrivateKey, error)
- func GenerateNetworkingKey(seed []byte) (crypto.PrivateKey, error)
- func GenerateNetworkingKeys(n int, seeds [][]byte) ([]crypto.PrivateKey, error)
- func GenerateNodeInfos(consensus, collection, execution, verification, access int) []model.NodeInfo
- func GenerateStakingKey(seed []byte) (crypto.PrivateKey, error)
- func GenerateStakingKeys(n int, seeds [][]byte) ([]crypto.PrivateKey, error)
- func ReadRootProtocolSnapshot(bootDir string) (*inmem.Snapshot, error)
- func RunWithSporkBootstrapDir(t testing.TB, ...)
- func WriteInternalFiles(nodeInfos []model.NodeInfo, bootDir string) (string, string, error)
- func WriteMachineAccountFiles(chainID flow.ChainID, nodeInfos []bootstrap.NodeInfo, write WriteJSONFileFunc) error
- func WritePartnerFiles(nodeInfos []model.NodeInfo, bootDir string) (string, string, error)
- func WriteStakingNetworkingKeyFiles(nodeInfos []bootstrap.NodeInfo, write WriteJSONFileFunc) error
- type WriteJSONFileFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeys ¶
func GenerateKeys(algo crypto.SigningAlgorithm, n int, seeds [][]byte) ([]crypto.PrivateKey, error)
func GenerateMachineAccountKey ¶
func GenerateMachineAccountKey(seed []byte) (crypto.PrivateKey, error)
func GenerateNetworkingKey ¶
func GenerateNetworkingKey(seed []byte) (crypto.PrivateKey, error)
func GenerateNetworkingKeys ¶
func GenerateNetworkingKeys(n int, seeds [][]byte) ([]crypto.PrivateKey, error)
func GenerateNodeInfos ¶
func GenerateStakingKey ¶
func GenerateStakingKey(seed []byte) (crypto.PrivateKey, error)
func GenerateStakingKeys ¶
func GenerateStakingKeys(n int, seeds [][]byte) ([]crypto.PrivateKey, error)
func WriteInternalFiles ¶
WriteInternalFiles writes the internal private node info into `bootDir/private-root-information/` also writes a map containing each of the nodes stakes mapped to the node's networking address
func WriteMachineAccountFiles ¶
func WriteMachineAccountFiles(chainID flow.ChainID, nodeInfos []bootstrap.NodeInfo, write WriteJSONFileFunc) error
WriteMachineAccountFiles writes machine account key files for a set of nodeInfos. Assumes that machine accounts have been created using the default execution state bootstrapping. Further assumes that the order of nodeInfos is the same order that nodes were staked during execution state bootstrapping.
Only applicable for transient test networks.
func WritePartnerFiles ¶
WritePartnerFiles writes the all partner public node info into `bootDir/partners/public-root-information/` also writes a map containing each of the nodes stakes mapped to the NodeID
func WriteStakingNetworkingKeyFiles ¶
func WriteStakingNetworkingKeyFiles(nodeInfos []bootstrap.NodeInfo, write WriteJSONFileFunc) error
WriteStakingNetworkingKeyFiles writes staking and networking keys to private node info files.
Types ¶
type WriteJSONFileFunc ¶
WriteJSONFileFunc is a function which writes a file during bootstrapping. It accepts the path for the file (relative to the bootstrapping root directory) and the value to write. The function must marshal the value as JSON and write the result to the given path.