테스트넷 체인 동기화 이슈

이 가이드는 테스트넷 노드가 블록 #336,000에서 체인 데이터 동기화를 멈췄을 때 문제를 해결하는 방법을 안내합니다.

아래와 같은 에러가 발생할 경우 대응책
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

1. 스냅샷 데이터를 통한 동기화 (권장)

현재 노드가 풀 모드(일반 모드)로 실행 중인 경우, 이 단계 대신 다음 섹션으로 이동 바랍니다.

바이프로스트 네트워크는 체인 데이터 스냅샷을 제공합니다. 스냅샷은 정기적으로 업데이트됩니다. 이를 통해 노드 운영자는 데이터 동기화에 소요되는 시간을 줄이고 네트워크 부하를 경감할 수 있습니다.

  1. 링크를 따라 스냅샷 다운로드 및 내보내기 프로세스를 완료합니다.

  2. 완료되면 운영 매뉴얼의 해당 프로세스로 돌아가 프로세스를 완료합니다.

2. 제네시스 블록부터의 동기화

이 방법은 스냅샷 다운로드를 요구하지 않습니다. 이 섹션에서는 아카이브와 풀노드 모두 적용되는 해결방안입니다.

1. Block 0 to 336115

처음 동기화에서, node 1.0.2 버전을 사용해 336,115 블록까지 동기화합니다.

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

노드 실행을 시작하면 아래와 같이 제네시스 블록부터 체인 데이터를 동기화하기 시작합니다. (경우에 따라 에러 로그가 표시될 수 있지만, 현재로서는 무시해도 무관합니다.)

Until the number following ‘best’ goes higher than 336115.

2. 블록 336,115 이후

336,115 블록까지 동기화 되었으면 최신버전의 노드를 사용해서 나머지 블록을 동기화합니다.

# 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

노드를 재시작 한 후, 몇가지 에러가 생길 수 있으나 무시해도 무관합니다.

3. 동기화 완료

동기화가 완료되면 "Syncing" 이라는 메시지가 더이상 로그에 출력되지 않습니다. 이제 운영 매뉴얼로 돌아가 나머지 프로세스를 완료합니다.

Last updated