4

Recently I started getting the following error thrown in the on_initialize hook of the aura pallet:

2023-12-08 14:24:54 [Parachain] panicked at 'Slot must increase', /.cargo/git/checkouts/substrate-7e08433d4c370a21/5bfdbab/frame/aura/src/lib.rs:93:17    
2023-12-08 14:24:54 [Parachain] err=Error { inner: Proposing

Caused by:
    0: Error at calling runtime api: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed
       WASM backtrace:
       error while executing at wasm backtrace:
           0: 0x396e55 - <unknown>!rust_begin_unwind
           1: 0x3ce0 - <unknown>!core::panicking::panic_fmt::hc28e19cd76cf33c1
           2: 0x149ebb - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize<BlockNumber>>::on_initialize::hdf027e453fe3dfa0
           3: 0x2275e1 - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize<BlockNumber>>::on_initialize::h97a3ad9ef00b8c44
           4: 0x14a5f9 - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize<BlockNumber>>::on_initialize::hfe37df7f2e5b478f
           5: 0x1f6ac3 - <unknown>!frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade>::initialize_block::hb2d583d1bf08c166
           6: 0x1dbc7e - <unknown>!Core_initialize_block
    1: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed
       WASM backtrace:
       error while executing at wasm backtrace:
           0: 0x396e55 - <unknown>!rust_begin_unwind
           1: 0x3ce0 - <unknown>!core::panicking::panic_fmt::hc28e19cd76cf33c1
           2: 0x149ebb - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize<BlockNumber>>::on_initialize::hdf027e453fe3dfa0
           3: 0x2275e1 - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize<BlockNumber>>::on_initialize::h97a3ad9ef00b8c44
           4: 0x14a5f9 - <unknown>!<(TupleElement0,TupleElement1) as frame_support::traits::hooks::OnInitialize<BlockNumber>>::on_initialize::hfe37df7f2e5b478f
           5: 0x1f6ac3 - <unknown>!frame_executive::Executive<System,Block,Context,UnsignedValidator,AllPalletsWithSystem,COnRuntimeUpgrade>::initialize_block::hb2d583d1bf08c166

This is the only collator running and it is still producing blocks, the error happens frequently, but not always, so block production hasn't stopped. Recently I upgraded the node version to polkadot 1.3.0, but the runtime has not changed. Does anyone know what might be causing it?

UPDATE:

It was suggested that the issue might be due to the fact that only one collator was running, so I started another collator, I now have 2 collators producing blocks, but both are presenting the same issue.

I've simulated the network using zombinet on my local computer and the collator does not have this issue.

Also, I forgot to mention that the parachain is running in rococo.

The solution mentioned by Valentin worked.

To be able to test it on zombinet using the polkadot v1.6.0 the following configuration is required:

[relaychain.genesis.runtimeGenesis.patch.configuration.config]
scheduling_lookahead = 2

[relaychain.genesis.runtimeGenesis.patch.configuration.config.async_backing_params]
max_candidate_depth = 3
allowed_ancestry_len = 2
2
  • Did you managed to solve this, I'm experiencing the same issue Commented Jan 26 at 13:04
  • No, I haven't, still looking for a solution
    – Sebastian
    Commented Jan 26 at 15:37

1 Answer 1

2

Problem

I stumbled upon the same issue yesterday and it turns out it has to do with a missing configuration for async backing on the parachain side.

Rococo has async backing enabled and it needs some things to be implemented on the parachain that if they are not present, this error occurs. The reason why you are not seeing the error on zombienet is because by default Rococo has this features disabled. If you want to enable them you need to add this to your zombienet configuration file.

[relaychain]
chain = "rococo-local"
default_command = "./bin-v1.3.0/polkadot"

[relaychain.genesis.runtime.configuration.config]
scheduling_lookahead = 2

[relaychain.genesis.runtime.configuration.config.async_backing_params]
max_candidate_depth = 3
allowed_ancestry_len = 2

    [[relaychain.nodes]]
    name = "alice"
    validator = true

    [[relaychain.nodes]]
    name = "bob"
    validator = true

[[parachains]]
....

Now you should also see the error present in the logs of the parachain collator on zombienet after the block production starts.

How to solve

The solution is relatively simple, you just need to implement the missing configuration for async backing on your parachain node (no need to enable async backing just have the configuration ready). For this just follow steps 1 and 2 of the Upgrade Parachain for Asynchronous Backing Compatibility Guide

3
  • When I add the relaychain.genesis configuration items to the zombinet config file, the network fails to start, I get the following error: "Error parsing spec file: expected value at line 199 column 5" do you know why might this be?
    – Sebastian
    Commented Jan 29 at 18:39
  • What version of rococo are you using?? It has to be 1.3.0 or higher Commented Jan 30 at 19:56
  • I'm using version 1.6.0
    – Sebastian
    Commented Jan 31 at 0:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.