This guide outlined how to take part in the global snapshot, respectively genesis snapshot creation for the legacy, and Chrysalis Phase 2 IOTA network. The goal was to generate a global snapshot for the legacy network which acted as a cut-off point for when only migration bundles/transactions were allowed, and a genesis snapshot for the new network which contained 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 would fetch the then 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/37051942021/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: 3406922021/04/28 12:05:29 legacy ledger state integrity hash: 8900ac80edffe4eed9f6f55dfe32d775c18d789351c7dddfa4a4c815a0fa71162021/04/28 12:05:29 migration: addrs count 7949, tokens total 6615577322603552021/04/28 12:05:29 migration (alternative): addrs count 7950, tokens total 7241187082613782021/04/28 12:05:29 generating genesis snapshot files...2021/04/28 12:05:29 treasury allocation with genesis_snapshot.bin: 2117972551017406 tokens2021/04/28 12:05:29 treasury allocation with genesis_snapshot_alt.bin: 2055411575016383 tokens2021/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.bin39bd5308a1e9fb57503f6d15b90206ae434f581807ef0e29cf2e66de64165c5b genesis_snapshot_alt.bin8f48388423cc706bf5f7707735fd99a5d89efbb966a8e2a0b82ff3529cf33f7f global_snapshot.csv
- Copy the entire program output, and the sha256 hashes to the corresponding issue on
iotaledgerHornet fork repository.
Loading the global snapshot ensured that your legacy Hornet node added the genesis transaction (999...) as a solid entry point: this was important as the Coordinator would issue the next milestone after the global snapshot index on top of it. Your node would not lose the data it already had.
- 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).