Generate Test Configuration
Bootstrap and initialize a new Iota network:
iota genesis --working-dir <working_directory> -f --with-faucet --num-validators <number_of_validators> --local-migration-snapshots <path_to_startdust_snapshot_file.bin>
Command flags:
- (Optional)
--from-config
: start genesis with a given config file. Read the file that was written by--write-config
command. - (Optional)
--write-config
: build a genesis config, write it to the specified path, and exit. Example of written config:
---
ssfn_config_info: ~
validator_config_info: ~
parameters:
chain_start_timestamp_ms: 1737646154723
protocol_version: 1
allow_insertion_of_extra_objects: true
epoch_duration_ms: 86400000
accounts:
- address: "0x3529ec0ab25aa843942715194dd4eee1fc1d5c83dfef28e839838fa0f0b36aa0"
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- address: "0x42d8c182eb1f3b2366d353eed4eb02a31d1d7982c0fd44683811d7036be3a85e"
gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- gas_amounts:
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
- 30000000000000000
migration_sources:
- Local: stardust_object_snapshot.bin
- (Optional)
--working-dir
: path to the directory that contains configurations files. - (Optional)
--force
: a flag used to forces overwriting existing configuration. Default value isfalse
. - (Optional)
--epoch-duration-ms
: epoch duration in ms to be set in the genesis config, the default is86400000
(24h). - (Optional)
--benchmark-ips
: a list of IP addresses used to generate a genesis configuration optimized for benchmarking. If no persisted configuration file or compatible keystore exists, the provided ips will be used to create a benchmark-specific genesis configuration, including a keystore for gas keys. This enables streamlined bootstrapping of a network for testing purposes. If a configuration already exists, the--force
flag is required to regenerate the setup. - (Optional)
--with-faucet
: a flag used to creates an extra faucet configuration for iota persisted runs. Default value isfalse
. - (Optional)
--num-validators
: set the number of validators in the network; since becoming a validator requires a certain amount of staked coins, this commands makes so that a delegator will stake 1.5 million IOTA for each validator. Default value is4
. - (Optional)
--local-migration-snapshots
: path to the local based stardust snapshot. - (Optional)
--remote-migration-snapshots
: path to the remote based stardust snapshot. A remote snapshot is one that is downloaded from the specified URL, e.g.https://api.devnet.iota.cafe
. - (Optional)
--delegator
: the delegator is an existing address in the migrated state that holds IF funds which will be partially used for the genesis distribution of validator stakes and gas tokens on the new network; when building a genesis for a local network, a single delegator is used with default allocations for all validators instead of a Delegator Map.