The benchmark is written as:

     one_extrinsic {
        let caller: <T as frame_system::Config>::AccountId = make_account::<T>(1);

            <T as crate::Config>::Currency::deposit_creating(&caller, 10_000_000_u32.into()).peek(),
        // ..

    }: _(/* .. */)
    verify {
        // ..

where <T as crate::Config>::Currency is instance of pallet_balances

When running cargo test bench_one_extrinsic --features runtime-benchmarks the test is completed.

But where running the actual benchmark ./collator benchmark pallet .. The statement fails with

 left: `0`,
 right: `10000000`', /../src/benchmarking.rs:164:9    
Error: Input("Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\n\n    0: 0x4cbb85 - <unknown>!rust_begin_unwind\n")

1 Answer 1


Check your actual runtime's ExistentialDeposit.

10_000_000_u32 might not be enough to create an account.

And people usually use 0 in mocking.

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.