Testing the Genesis creation locally
There are two ways to create a genesis:
- Manually via the iota genesis-ceremony commands. In order to launch a live production network this setup is needed, since then one can control several validators joining, allocations, etc. A genesis ceremony is a coordinated process involving multiple participants (nodes, validators, etc) to create and finalize the genesis creation.
- Automatically via the iota genesis command, which outputs a config directory suitable for running a local network. It's useful for local testing, debugging purposes.
All this means that, the genesis created through the iota genesis command can be used just for testing purposes because it doesn't provide ways to configure some parameters like custom validators and their stakes.
Creation Genesis locally flow:
- The Hornet snapshot is a file containing information about a Stardust ledger which can be used to represent a migrated state. Thus, a genesis can be build without this file, and be considered "without migration", or it can include this file and be used to start a network with some predetermined
Objects
.
iota-genesis-builder -- --disable-global-snapshot-verification iota --snapshot-path <path_to_hornet_snapshot_file.bin> --target-network <network_name>
For detailed instructions, refer to the Stardust Object Snapshot Generation.
- Generate a test configuration directory containing all necessary settings for running a local network, including validator information, and local migration snapshots. The number of validators can be customized as required.
iota genesis --working-dir <working_directory> -f --with-faucet --num-validators <number_of_validators> --local-migration-snapshots <path_to_startdust_snapshot_file.bin>
For more information, consult the Test Configuration Generation.
- Launch the network locally using the generated configuration. This step initializes the network with the specified settings and validators.
iota start --network.config <working_directory>
Additional details are available in the Local Network Run.