In this guide you will learn how to partake in the global snapshot, respectively genesis snapshot creation for the legacy and Chrysalis Phase 2 IOTA network. The goal is to generate a global snapshot for the legacy network which acts as a cut-off point for when only migration bundles/transactions are allowed, and a genesis snapshot for the new network which contains the already burned/migrated funds from the 7-day-migration window.
- A GitHub account and git
- A synchronized legacy Hornet node (running version < 0.x.x)
getLedgerStateAPI command must be permitted. Add an entry to
httpAPI.permitRemoteAccessin case this API command is not added yet (restart your node afterwards).
- The API port must be accessible
- Golang version 1.16.x (https://golang.org/)
Make sure you've Go installed by issuing
go versionon your command line.
git clone https://github.com/iotaledger/chrysalis-tools.git
go build(this should generate a
./verify -node="https://your-node-uri" -genesis-snapshot-file-network-id="chrysalis-mainnet" -genesis-snapshot-file-network-id-alt="as-network"
- The program will now fetch the current ledger state of your defined legacy Hornet node, compute its Blake2b-256 hash and generate the global snapshot for the legacy and genesis snapshot for the new network. Example output:
2021/04/28 12:05:22 querying legacy node for info... 2021/04/28 12:05:22 legacy node state: lsmi/lsm 3705194/3705194 2021/04/28 12:05:22 fetching ledger state at 3705194, this might take a while...go grab a coffee... 2021/04/28 12:05:27 total ledger entries: 340692 2021/04/28 12:05:29 legacy ledger state integrity hash: 8900ac80edffe4eed9f6f55dfe32d775c18d789351c7dddfa4a4c815a0fa7116 2021/04/28 12:05:29 migration: addrs count 7949, tokens total 661557732260355 2021/04/28 12:05:29 migration (alternative): addrs count 7950, tokens total 724118708261378 2021/04/28 12:05:29 generating genesis snapshot files... 2021/04/28 12:05:29 treasury allocation with genesis_snapshot.bin: 2117972551017406 tokens 2021/04/28 12:05:29 treasury allocation with genesis_snapshot_alt.bin: 2055411575016383 tokens 2021/04/28 12:05:29 misc info: 2021/04/28 12:05:29 eligible for migration: addrs 225329, tokens total 2055405216227457
- Generate the sha256 hashes of the generated snapshot
sha256sum genesis_snapshot.bin genesis_snapshot_alt.bin global_snapshot.csv; Example output:
$ sha256sum genesis_snapshot.bin genesis_snapshot_alt.bin global_snapshot.csv 65be1a80a6895d17a492db3dd55babf1d57557dbaa40da6e1d0ed5937ceb6662 genesis_snapshot.bin 39bd5308a1e9fb57503f6d15b90206ae434f581807ef0e29cf2e66de64165c5b genesis_snapshot_alt.bin 8f48388423cc706bf5f7707735fd99a5d89efbb966a8e2a0b82ff3529cf33f7f global_snapshot.csv
- Copy the entire program output, and the sha256 hashes to the corresponding issue on
iotaledgerHornet fork repository.
Loading the global snapshot ensures that your legacy Hornet node adds the genesis transaction (999...) as a solid entry point: this is important as the Coordinator will issue the next milestone after the global snapshot index on top of it. Your node will not lose the data it already has.
- Await for confirmation that the global snapshot was taken successfully by looking into the validation issue on the Hornet repository or Discord.
- Stop your legacy Hornet node and download the binary or docker image of the Hornet build which only supports migration-bundles. With this "migration-bundles-only" version, your Hornet node will also no longer peer to nodes which do not run the same version.
snapshots.global.pathpoint to the global snapshot file (i.e
snapshots.global.indexdefine the index of the milestone at which the global snapshot was taken. (this should correspond to what
legacy node statewas from the program output, i.e.
3705194from the example output above).
"global"(note the quotes as the value is a string).
- Restart your legacy Hornet with the additional
--forceGlobalSnapshotflag (this will instruct your Hornet node to load the global snapshot despite the fact that it already has a database).