Testnet Chain Sync Issue

This guide will walk you through how to resolve the issue when your Testnet node has stopped to sync chain data at block #336,000.

Error logs that might have been printed
2022-10-23 01:41:12 Proposing failed: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed
WASM backtrace:

    0: 0x24bfd9 - <unknown>!rust_panic
    1: 0x24bfd2 - <unknown>!std::panicking::rust_panic_with_hook::hd20dbb32ccf2960c
    2: 0x24bc3d - <unknown>!std::panicking::begin_panic_handler::{{closure}}::h6f71c047f903cff6
    3: 0x24bb87 - <unknown>!std::sys_common::backtrace::__rust_end_short_backtrace::hbb6ee37c9cb141a4
    4: 0x24bc85 - <unknown>!rust_begin_unwind
    5: 0x1b2a32 - <unknown>!core::panicking::panic_fmt::ha6d5b6466ab38e11
    6: 0x1b2e05 - <unknown>!core::result::unwrap_failed::h7aa4a6c45486df8b
    7: 0xaa870 - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize<BlockNumber>>::on_initialize::h93502e603e15f2d8
    8: 0x11fe6d - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize<BlockNumber>>::on_initialize::had430e6d91ca4c07
    9: 0x41118 - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize<BlockNumber>>::on_initialize::h58cc151aae952149
   10: 0xe7221 - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize<BlockNumber>>::on_initialize::hedbe5eed270208e6
   11: 0x182c1c - <unknown>!frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade>::initialize_block::h8d01681df137b3e8
   12: 0x102be8 - <unknown>!Core_initialize_block

Currently if your node is running in full-mode (non-archive mode), instead of this step you should follow to section 2. Synchronization from the Genesis Block

The Bifrost Network provides snapshots of the chain data. Snapshots are updated at regular intervals. This allows node operators to spend less time on data synchronization and reduce the load on the network.

  1. Follow the link, and complete the snapshot download & export process.

  2. Return to the process in the operation manual once complete.

2. Synchronization from the Genesis Block

This method does not require downloading snapshots. This section works for both archive and full modes.

1. Block 0 to 336115

For initial synchronization, utilize bifrost-node 1.0.2 up to at least block 336115.

wget "https://github.com/bifrost-platform/bifrost-node/releases/download/v1.0.2/bifrost-node"
wget "https://github.com/bifrost-platform/bifrost-node/releases/download/v1.0.2/bifrost-testnet.json"
chmod +x bifrost-node

mv bifrost-node bifrost-testnet.json <YOUR-BASE-PATH-DIRECTORY>
cd <YOUR-BASE-PATH-DIRECTORY>

# For archive-mode
./bifrost-node --base-path ./ --chain ./bifrost-testnet.json --port 30333 --pruning archive --runtime-cache-size 128
# For full-mode (remove --pruning option)
./bifrost-node --base-path ./ --chain ./bifrost-testnet.json --port 30333 --runtime-cache-size 128

After start running your node, it will start to synchronize chain data from the genesis block as below. (In some cases, error logs might be displayed, but for now, those are fine to ignore)

2. Block 336115 onwards

Once synchronization reaches block 336115, utilize the latest version of bifrost-node.

# After terminate existing bifrost-node

cd <YOUR-BASE-PATH-DIRECTORY>
rm bifrost-node
wget https://github.com/bifrost-platform/bifrost-node/releases/latest/download/bifrost-node
wget https://github.com/bifrost-platform/bifrost-node/releases/latest/download/bifrost-testnet.json
chmod +x bifrost-node

# For archive-mode (the option name for --pruning has changed to --state-pruning)
./bifrost-node --base-path ./ --chain ./bifrost-testnet.json --port 30333 --state-pruning archive --runtime-cache-size 128
# For full-mode (remove --state-pruning option)
./bifrost-node --base-path ./ --chain ./bifrost-testnet.json --port 30333 --runtime-cache-size 128

After restarting your node, in some cases, error logs might be displayed as before, however it is fine to ignore.

3. Complete synchronization

Synchronization is complete once “Syncing” does not appear in the log. Return to the process on the operation manual.

Last updated