Migration E2E Testing (TestNet)

1

Untar the snapshot file (replace with your downloaded filename)

tar -xvf <testnet-snapshot-file>.tar -C $HOME/morse-testnet-snapshot
cd $HOME/morse-testnet-snapshot
2

Export Morse TestNet State

Set the snapshot height and date (replace with actual values):

export TESTNET_SNAPSHOT_HEIGHT="176966"
export TESTNET_SNAPSHOT_DATE="2025-05-09"
export MORSE_TESTNET_STATE_EXPORT_PATH="./morse_state_export_${TESTNET_SNAPSHOT_HEIGHT}_${TESTNET_SNAPSHOT_DATE}.json"

Export the state (update --datadir if your snapshot path is different):

pocket --datadir="$HOME/morse-testnet-snapshot" util export-genesis-for-reset "$TESTNET_SNAPSHOT_HEIGHT" pocket > "$MORSE_TESTNET_STATE_EXPORT_PATH"
3

Export Morse MainNet State

Follow steps 1–2 in the State Transfer Playbook to retrieve and export the Morse MainNet snapshot:

https://dev.poktroll.com/explore/morse_migration/state_transfer_playbook

4

Merge Morse MainNet & TestNet States

Merge the Morse MainNet and TestNet state exports into a single file:

export MSG_IMPORT_MORSE_ACCOUNTS_PATH="./msg_import_morse_accounts_m${MAINNET_SNAPSHOT_HEIGHT}_t${TESTNET_SNAPSHOT_HEIGHT}.json"

pocketd tx migration collect-morse-accounts \
  "$MORSE_MAINNET_STATE_EXPORT_PATH" "$MSG_IMPORT_MORSE_ACCOUNTS_PATH" \
  --merge-state="$MORSE_TESTNET_STATE_EXPORT_PATH"
  • Replace ${MAINNET_SNAPSHOT_HEIGHT} and ${TESTNET_SNAPSHOT_HEIGHT} with your actual values.

  • Result: msg_import_morse_accounts_m<MAINNET_SNAPSHOT_HEIGHT>_t<TESTNET_SNAPSHOT_HEIGHT>.json is ready for import.

5

Complete the State Transform Process

Resume the State Transfer Playbook from step 3.1 to complete state transformation:

https://dev.poktroll.com/explore/morse_migration/state_transfer_playbook#31-optional-on-shannon-testnet-and-mandatory-on-shannon-mainnet

Was this helpful?