Skip to content

Blockchain Errors and Analysis

Chris Li edited this page Apr 10, 2023 · 1 revision

1

Collator logs:

2022-02-09 22:37:24 [Parachain] Could not find the header of the genesis block in the database! block_hash=0xa4f281e44002281ba17de363fae686604a8cc4c861d0e145ff724c89da8e49b1

Solution:

  • generate the genesis-state and genesis-wasm from docker image (not another build image a la ./target/release/etc

2

Collator logs:

2022-02-09 03:29:19 [Parachain] ⚠️ PolkadotXcm declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0)`
2022-02-09 03:29:19 [Parachain] ✅ no migration for XcmpQueue
2022-02-09 03:29:19 [Parachain] ✅ no migration for Valve
2022-02-09 03:29:19 [Parachain] ✅ no migration for AuraExt

Solution: Not an issue.

3

Local build logs, after cargo build --release:

     Compiling sp-npos-elections v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.13#fcc54a72)
  error: cannot find macro `vec` in this scope
    --> /Users/irsal-oak/.cargo/git/checkouts/substrate-7e08433d4c370a21/fcc54a7/primitives/npos-elections/src/phragmms.rs:52:20
     |
  52 |     let mut winners = vec![];
     |                       ^^^
     |
     = note: consider importing one of these items:
             codec::alloc::vec
             crate::sp_std::vec
             scale_info::prelude::vec
             sp_std::vec

Solution: adding default-features = false for a certain package in Cargo.toml

4

Local build logs, after parachain is connected to relay after Sudo > slots.forcelease()

2022-02-11 15:40:06 [Parachain] 🙌 Starting consensus session on top of parent 0xc4750dd078d14662054563343d8e5845b0e824c4846b856e9130aac72f6fd3a2
2022-02-11 15:40:06 [Parachain] Ran out of free WASM instances
2022-02-11 15:40:06 [Parachain] Ran out of free WASM instances
2022-02-11 15:40:06 [Parachain] Ran out of free WASM instances
2022-02-11 15:40:07 [Parachain] ⌛️ Discarding proposal for slot 137051900; block production took too long

Solution:

  • restart node

5

Local build UI, when submitting extrinsic, get error: 1010: Invalid Transaction: Transaction has a bad signature. This is just because your Polkadot.js app in your browser has cached some outdated signatures. You will need to just close all of your browsers tabs for Polkadot.js and reopen them (not refresh). You do not need to restart your chain for this.

6

FATAL: Unable to initialize the API: createType(CurrencyId):: Cannot construct unknown type CurrencyId You are missing the types.json file in the developer settings of the console.

7

Bootnode with peer id … is on a different chain (our genesis: 0x… theirs: 0x…) If you compiled the node binary older than v3.0.1 then you will have to initialize the chain with the chain spec file, since the WASM builds are not deterministic. Just do --chain chain_spec_mainnet_raw.json.

The new node has genesis bytecode embedded and no longer needs manual imports of the chain spec file. https://github.com/paritytech/substrate/pull/10550

8

Error: Service(Keystore(Io(Os { code: 13, kind: PermissionDenied, message: “Permission denied” }))) Make sure --base-path is set to a folder you have appropriate permissions for. Either update the permissions of your account to access the validator folder (documentation default) or change --base-path to somewhere else (ie. your home folder).

9

Weird database errors Whenever you run into some sort of database error, purge-cache subcommand is your friend. You can do a fresh sync after the purge, and things should just work.

10

Updating the parachain from the same id 2000 and relay instead of spinning up a new relay chain.

Downgrade parachain / parthread from relay: parasSudoWrapper.sudoScheduleParaCleanup(id)

Create parathread again: parasSudoWrapper.sudoScheduleParaInitialize(id, genesis) BUT set parachain to false

11

Bootnode becomes faulty and drops all peers.

2022-03-30 17:14:47 [Relaychain] 💤 Idle (11 peers), best: #427773 (0x2aa6…5f91), finalized #427771 (0x6719…8e52), ⬇ 2.1kiB/s ⬆ 6.1kiB/s
2022-03-30 17:14:48 [Relaychain] ✨ Imported #427774 (0x32f9…304e)
2022-03-30 17:14:48 [Parachain] Block import error: State Database error: Too many sibling blocks inserted
2022-03-30 17:14:48 [Parachain] 💔 Error importing block 0x5c4edbf23624cae199ae3cb1553f23675c8be34fa7e13f12c5b595d1691d425e: consensus error: Import failed: State Database error: Too many sibling blocks inserted
2022-03-30 17:14:49 [Parachain] Block import error: State Database error: Too many sibling blocks inserted
2022-03-30 17:14:49 [Parachain] 💔 Error importing block 0x5c4edbf23624cae199ae3cb1553f23675c8be34fa7e13f12c5b595d1691d425e: consensus error: Import failed: State Database error: Too many sibling blocks inserted
2022-03-30 17:14:52 [Parachain] 💤 Idle (1 peers), best: #92971 (0xcd41…88a5), finalized #92971 (0xcd41…88a5), ⬇ 142.5kiB/s ⬆ 3.7kiB/s
2022-03-30 17:14:52 [Parachain] ❌ Error while dialing /dns/telemetry.polkadot.io/tcp/443/x-parity-wss/%2Fsubmit%2F: Custom { kind: Other, error: Timeout }
2022-03-30 17:14:52 failed to associate send_message response to the sender

Resolution: Terminated bootnode and pointed to a new one.

12

Issue: parachain testnet stalls Short-term Resolution: restart node and set --state-cache-size=0 Long-term Resolution: wait on parity to fix execution state caching

Thread 'tokio-runtime-worker' panicked at 'Transaction will be valid in the future', /usr/local/cargo/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388
This is a bug. Please report it at:
	https://github.com/OAK-Foundation/OAK-blockchain/issues/new
2022-03-31 14:49:56 [Parachain] panicked at 'Transaction will be valid in the future', /cargo-home/git/checkouts/substrate-7e08433d4c370a21/22d40c7/frame/executive/src/lib.rs:388:17
2022-03-31 14:49:56 [Parachain] Block prepare storage changes error: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed
WASM backtrace:
    0: 0x27d1fd - <unknown>!rust_begin_unwind
    1: 0x3065 - <unknown>!core::panicking::panic_fmt::h6314b5c91abe7349
    2: 0x1cb1a1 - <unknown>!core::panicking::panic_display::he05f224608b8ed32
    3: 0x1ca325 - <unknown>!frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade>::execute_block::h83b441af8f66ac73
    4: 0xc3088 - <unknown>!Core_execute_block
    
2022-03-31 14:49:56 [Parachain] 💔 Error importing block 0xfbb2708df7d5400d85c457a311892c697b5eafac113aa09730b73918525c2aaa: consensus error: Import failed: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed
WASM backtrace:
    0: 0x27d1fd - <unknown>!rust_begin_unwind
    1: 0x3065 - <unknown>!core::panicking::panic_fmt::h6314b5c91abe7349
    2: 0x1cb1a1 - <unknown>!core::panicking::panic_display::he05f224608b8ed32
    3: 0x1ca325 - <unknown>!frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade>::execute_block::h83b441af8f66ac73
    4: 0xc3088 - <unknown>!Core_execute_block
Clone this wiki locally