Address Swap Map

Address Swap is a process used during the creation of a Stardust Objects snapshot from a Hornet snapshot. This process ensures that assets (including IOTA tokens) in the Hornet snapshot are reallocated to new addresses specified in a CSV Address Swap Map.

During the migration process, the system checks whether the owner address of each output is present in the Address Swap Map. If it is, the address is replaced with the corresponding destination address specified in the map.

To ensure correctness, the ledger state is verified after the migration. This involves double-checking that all swapped addresses are correctly updated for every output.

The validation process occurs after all outputs have been processed. During this step, the system confirms that every address in the Address Swap Map has been swapped at least once. If any address remains unswapped, an error is returned, ensuring the integrity of the migration process.

Address Swap Map CSV format:

This must be a CSV file with two columns, where an entry contains in the first column an Bech32 format present in the Hornet full-snapshot and in the second column an IotaAddress that will be used for the swap.

  • Columns: Origin: The address in the Hornet snapshot from which assets are taken. Type - bech32. Destination: The new address where assets are allocated in the Stardust Object snapshot. Type - IotaAddress.
  • Constraints: Origin addresses must exist in the Hornet snapshot. Destination addresses must be valid IOTA addresses.
Origin,Destination
iota1qp8h9augeh6tk3uvlxqfapuwv93atv63eqkpru029p6sgvr49eufyz7katr,0xa12b4d6ec3f9a28437d5c8f3e96ba72d3c4e8f5ac98d17b1a3b8e9f2c71d4a3c
iota1qp7h2lkjhs6tk3uvlxqfjhlfw34atv63eqkpru356p6sgvr76eufyz1opkh,0x42d8c182eb1f3b2366d353eed4eb02a31d1d7982c0fd44683811d7036be3a85e

How to use Address Swap:

  1. Prepare Address Swap Map CSV file.
  2. Invoke the iota-genesis-builder command: Use the following command to execute the process:
iota-genesis-builder iota --address-swap-map-path address_swap.csv ...