Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
NachoPal opened this issue Mar 12, 2024 · 8 comments · Fixed by #713
Closed

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

NachoPal opened this issue Mar 12, 2024 · 8 comments · Fixed by #713

Comments

@NachoPal
Copy link

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

@ermalkaleci
Copy link
Collaborator

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

@NachoPal
Copy link
Author

You mean to add

allow-unresolved-imports: true

in the config.yaml, right?

Unfortunately that didn't work

@ermalkaleci
Copy link
Collaborator

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

@ermalkaleci
Copy link
Collaborator

@tomaka do we need to implement this on smoldot?

@tomaka
Copy link

tomaka commented Mar 12, 2024

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.

@ermalkaleci
Copy link
Collaborator

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

@ermalkaleci
Copy link
Collaborator

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

@ermalkaleci
Copy link
Collaborator

ermalkaleci commented Mar 26, 2024

smol-dot/smoldot#1742

@ermalkaleci ermalkaleci linked a pull request Mar 26, 2024 that will close this issue
sebastianmontero added a commit to sebastianmontero/chopsticks that referenced this issue Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants