AcalaNetwork/chopsticks

Called `Result::unwrap()` on an `Err` value: VirtualMachine(...

NachoPal opened this issue · 8 comments

I am getting the following error when I try to deploy latest AssetHub Rococo runtime built from polkadot-sdk master.

panicked at src/task.rs:131:6:
called `Result::unwrap()` on an `Err` value: VirtualMachine(UnresolvedFunctionImport { function: "ext_storage_proof_size_storage_proof_size_version_1", module_name: "env" })

Stack:

Error
    at imports.wbg.__wbg_new_abda76e883ba8a5f (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/executor/dist/esm/chopsticks_executor.js:801:19)
    at wasm://wasm/00b1e282:wasm-function[1108]:0x191195
    at wasm://wasm/00b1e282:wasm-function[1334]:0x1997cf
    at wasm://wasm/00b1e282:wasm-function[1221]:0x1967ac
    at wasm://wasm/00b1e282:wasm-function[115]:0xb9075
    at wasm://wasm/00b1e282:wasm-function[632]:0x16b359
    at wasm://wasm/00b1e282:wasm-function[1476]:0x19aeb1
    at __wbg_adapter_48 (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/executor/dist/esm/chopsticks_executor.js:384:10)
    at real (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/executor/dist/esm/chopsticks_executor.js:366:22)
    at node:internal/process/task_queues:140:7



node:internal/event_target:1096
  process.nextTick(() => { throw err; });
                           ^
Error [RuntimeError]: unreachable
    at wasm://wasm/00b1e282:wasm-function[1108]:0x1912ab
    at wasm://wasm/00b1e282:wasm-function[1334]:0x1997cf
    at wasm://wasm/00b1e282:wasm-function[1221]:0x1967ac
    at wasm://wasm/00b1e282:wasm-function[115]:0xb9075
    at wasm://wasm/00b1e282:wasm-function[632]:0x16b359
    at wasm://wasm/00b1e282:wasm-function[1476]:0x19aeb1
    at __wbg_adapter_48 (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/executor/dist/esm/chopsticks_executor.js:384:10)
    at real (file:///Users/nacho/Desktop/PARITY/Repos/chopsticks/executor/dist/esm/chopsticks_executor.js:366:22)
    at node:internal/process/task_queues:140:7
    at AsyncResource.runInAsyncScope (node:async_hooks:206:9)

Chain-spec:
ah-rococo-new.json

try with allow-unresolved-imports. seems like a new host function is added unrecognised by smoldot

You mean to add

allow-unresolved-imports: true

in the config.yaml, right?

Unfortunately that didn't work

Your runtime includes storage_proof_size::HostFunctions. Is this part of standard build?

@tomaka do we need to implement this on smoldot?

In principle, no, smoldot doesn't really need a change, and allow_unresolved_functions: true should work.
There was a lengthy discussion about this function, and in principle it is used only when parachain blocks are authored or verified by the relay chain.
Maybe it would make sense to implement it in smoldot and return an error if the function is called.

return an error will not help. if allow_unresolved_functions: true didn't help then it's been called

westend-asset-hub is updated and now won't produce blocks because of this