Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // use defaults from iota.go. ProtocolParamsBase = iotago.NewV3SnapshotProtocolParameters( iotago.WithNetworkOptions("default", iotago.PrefixTestnet), ) // use defaults from iota.go. ProtocolParamsDocker = iotago.NewV3SnapshotProtocolParameters( iotago.WithNetworkOptions(fmt.Sprintf("docker-%d", time.Now().Unix()), iotago.PrefixTestnet), iotago.WithTimeProviderOptions(5, time.Now().Unix(), 10, 13), iotago.WithLivenessOptions(10, 15, 3, 6, 8), ) // use defaults from iota.go. ProtocolParamsFeature = iotago.NewV3SnapshotProtocolParameters( iotago.WithNetworkOptions(fmt.Sprintf("feature-%d", time.Now().Unix()), iotago.PrefixTestnet), iotago.WithTimeProviderOptions(666666, time.Now().Unix()-100_000, 10, 13), ) )
View Source
var ( AccountsDockerFunc = func(protoParams iotago.ProtocolParameters) []snapshotcreator.AccountDetails { return []snapshotcreator.AccountDetails{ { AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b"))), Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b"))), Amount: mock.MinValidatorAccountAmount(protoParams), IssuerKey: iotago.Ed25519PublicKeyHashBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x293dc170d9a59474e6d81cfba7f7d924c09b25d7166bcfba606e53114d0a758b")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 5, StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protoParams), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protoParams)), }, { AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x05c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064"))), Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x05c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064"))), Amount: mock.MinValidatorAccountAmount(protoParams), IssuerKey: iotago.Ed25519PublicKeyHashBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x05c1de274451db8de8182d64c6ee0dca3ae0c9077e0b4330c976976171d79064")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 5, StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protoParams), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protoParams)), }, { AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x1e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648"))), Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x1e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648"))), Amount: mock.MinValidatorAccountAmount(protoParams), IssuerKey: iotago.Ed25519PublicKeyHashBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x1e4b21eb51dcddf65c20db1065e1f1514658b23a3ddbf48d30c0efc926a9a648")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 5, StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protoParams), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protoParams)), }, { AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0xc9ceac37d293155a578381aa313ee74edfa3ac73ee930d045564aae7771e8ffe"))), Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0xc9ceac37d293155a578381aa313ee74edfa3ac73ee930d045564aae7771e8ffe"))), Amount: mock.MinValidatorAccountAmount(protoParams), IssuerKey: iotago.Ed25519PublicKeyHashBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0xc9ceac37d293155a578381aa313ee74edfa3ac73ee930d045564aae7771e8ffe")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 5, StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protoParams), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protoParams)), }, { AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270"))), Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270"))), Amount: mock.MinIssuerAccountAmount(protoParams), IssuerKey: iotago.Ed25519PublicKeyHashBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x997be92a22b1933f36e26fba5f721756f95811d6b4ae21564197c2bfa4f28270")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 5, Mana: iotago.Mana(mock.MinIssuerAccountAmount(protoParams)), }, } } AccountsFeatureFunc = func(protoParams iotago.ProtocolParameters) []snapshotcreator.AccountDetails { return []snapshotcreator.AccountDetails{ { AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x01fb6b9db5d96240aef00bc950d1c67a6494513f6d7cf784e57b4972b96ab2fe"))), Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x01fb6b9db5d96240aef00bc950d1c67a6494513f6d7cf784e57b4972b96ab2fe"))), Amount: mock.MinValidatorAccountAmount(protoParams), IssuerKey: iotago.Ed25519PublicKeyHashBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x01fb6b9db5d96240aef00bc950d1c67a6494513f6d7cf784e57b4972b96ab2fe")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 5, StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protoParams), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protoParams)), }, { AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x83e7f71a440afd48981a8b4684ddae24434b7182ce5c47cfb56ac528525fd4b6"))), Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x83e7f71a440afd48981a8b4684ddae24434b7182ce5c47cfb56ac528525fd4b6"))), Amount: mock.MinValidatorAccountAmount(protoParams), IssuerKey: iotago.Ed25519PublicKeyHashBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x83e7f71a440afd48981a8b4684ddae24434b7182ce5c47cfb56ac528525fd4b6")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 5, StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protoParams), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protoParams)), }, { AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0xac628986b2ef52a1679f2289fcd7b4198476976dea4c30ae34ff04ae52e14805"))), Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0xac628986b2ef52a1679f2289fcd7b4198476976dea4c30ae34ff04ae52e14805"))), Amount: mock.MinValidatorAccountAmount(protoParams), IssuerKey: iotago.Ed25519PublicKeyHashBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0xac628986b2ef52a1679f2289fcd7b4198476976dea4c30ae34ff04ae52e14805")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 5, StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protoParams), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protoParams)), }, { AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0xc9ceac37d293155a578381aa313ee74edfa3ac73ee930d045564aae7771e8ffe"))), Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0xc9ceac37d293155a578381aa313ee74edfa3ac73ee930d045564aae7771e8ffe"))), Amount: mock.MinValidatorAccountAmount(protoParams), IssuerKey: iotago.Ed25519PublicKeyHashBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0xc9ceac37d293155a578381aa313ee74edfa3ac73ee930d045564aae7771e8ffe")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 5, StakingEndEpoch: iotago.MaxEpochIndex, FixedCost: 1, StakedAmount: mock.MinValidatorAccountAmount(protoParams), Mana: iotago.Mana(mock.MinValidatorAccountAmount(protoParams)), }, { AccountID: blake2b.Sum256(lo.PanicOnErr(hexutil.DecodeHex("0x670a1a20ddb02a6cec53ec3196bc7d5bd26df2f5a6ca90b5fffd71364f104b25"))), Address: iotago.Ed25519AddressFromPubKey(lo.PanicOnErr(hexutil.DecodeHex("0x670a1a20ddb02a6cec53ec3196bc7d5bd26df2f5a6ca90b5fffd71364f104b25"))), Amount: mock.MinIssuerAccountAmount(protoParams), IssuerKey: iotago.Ed25519PublicKeyHashBlockIssuerKeyFromPublicKey(ed25519.PublicKey(lo.PanicOnErr(hexutil.DecodeHex("0x670a1a20ddb02a6cec53ec3196bc7d5bd26df2f5a6ca90b5fffd71364f104b25")))), ExpirySlot: iotago.MaxSlotIndex, BlockIssuanceCredits: iotago.MaxBlockIssuanceCredits / 5, Mana: iotago.Mana(mock.MinIssuerAccountAmount(protoParams)), }, } } BasicOutputsDocker = []snapshotcreator.BasicOutputDetails{ { Address: lo.Return2(iotago.ParseBech32("rms1xqqz7e8e69uej86s2s4srcp5lgzrkx25qwr4hpnha7h3j66pezyq85qpqg55v3ur")), Amount: 1_000_000_000_000_000, Mana: 1_000_000_000_000_000, }, } BasicOutputsFeature = []snapshotcreator.BasicOutputDetails{ { Address: lo.Return2(iotago.ParseBech32("rms1xqqy3txhvnmzv53kgm2ueu30splfd5ct02cqvnehpdn04qgeskv9a3qpqgrhlhv3")), Amount: 1_000_000_000_000_000, Mana: 1_000_000_000_000_000, }, } )
View Source
var ( SnapshotOptionsBase = []options.Option[snapshotcreator.Options]{ snapshotcreator.WithDatabaseVersion(protocol.DatabaseVersion), snapshotcreator.WithFilePath("snapshot.bin"), snapshotcreator.WithProtocolParameters(ProtocolParamsBase), snapshotcreator.WithAddGenesisRootBlock(true), } SnapshotOptionsDocker = []options.Option[snapshotcreator.Options]{ snapshotcreator.WithFilePath("docker-network.snapshot"), snapshotcreator.WithProtocolParameters(ProtocolParamsDocker), snapshotcreator.WithAccounts(AccountsDockerFunc(ProtocolParamsDocker)...), snapshotcreator.WithBasicOutputs(BasicOutputsDocker...), } // SnapshotOptionsFeature is a preset for the feature network. SnapshotOptionsFeature = []options.Option[snapshotcreator.Options]{ snapshotcreator.WithFilePath("docker-network.snapshot"), snapshotcreator.WithProtocolParameters(ProtocolParamsFeature), snapshotcreator.WithAccounts(AccountsFeatureFunc(ProtocolParamsFeature)...), snapshotcreator.WithBasicOutputs(BasicOutputsFeature...), } )
Functions ¶
func GenerateFromYaml ¶
Types ¶
type BasicOutputYaml ¶
type BlockIssuerYaml ¶
type ConfigYaml ¶
type ConfigYaml struct { Name string `yaml:"name"` FilePath string `yaml:"filepath"` Validators []ValidatorYaml `yaml:"validators"` BlockIssuers []BlockIssuerYaml `yaml:"blockIssuers"` BasicOutputs []BasicOutputYaml `yaml:"basicOutputs"` }
type ValidatorYaml ¶
Click to show internal directories.
Click to hide internal directories.