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

UnresolvedFunctionImport for Moonbeam Runtimes #1561

Closed
albertov19 opened this issue Jan 8, 2024 · 3 comments · Fixed by #1573
Closed

UnresolvedFunctionImport for Moonbeam Runtimes #1561

albertov19 opened this issue Jan 8, 2024 · 3 comments · Fixed by #1573

Comments

@albertov19
Copy link

According to -> AcalaNetwork/chopsticks#575

When using Moonbeam in the latest version of Chopsticks, and setting allow-unresolved-imports to false, you get:

npx @acala-network/chopsticks@latest -c moonbeam --allow-unresolved-imports false
Logs:

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

Stack:

Error
    at imports.wbg.__wbg_new_abda76e883ba8a5f (/home/purestake/.npm/_npx/81ad9c881cb83600/node_modules/@acala-network/chopsticks-executor/dist/cjs/chopsticks_executor.js:729:19)
    at wasm://wasm/009743be:wasm-function[728]:0x12aaea
    at wasm://wasm/009743be:wasm-function[886]:0x13420c
    at wasm://wasm/009743be:wasm-function[802]:0x12eaca
    at wasm://wasm/009743be:wasm-function[105]:0xa92ae
    at wasm://wasm/009743be:wasm-function[355]:0x10e846
    at wasm://wasm/009743be:wasm-function[937]:0x134a9e
    at __wbg_adapter_46 (/home/purestake/.npm/_npx/81ad9c881cb83600/node_modules/@acala-network/chopsticks-executor/dist/cjs/chopsticks_executor.js:407:10)
    at real (/home/purestake/.npm/_npx/81ad9c881cb83600/node_modules/@acala-network/chopsticks-executor/dist/cjs/chopsticks_executor.js:391:22)
    at node:internal/process/task_queues:141:7



node:internal/event_target:777
  process.nextTick(() => { throw err; });
                           ^
Error [RuntimeError]: unreachable
    at wasm://wasm/009743be:wasm-function[728]:0x12ac13
    at wasm://wasm/009743be:wasm-function[886]:0x13420c
    at wasm://wasm/009743be:wasm-function[802]:0x12eaca
    at wasm://wasm/009743be:wasm-function[105]:0xa92ae
    at wasm://wasm/009743be:wasm-function[355]:0x10e846
    at wasm://wasm/009743be:wasm-function[937]:0x134a9e
    at __wbg_adapter_46 (/home/purestake/.npm/_npx/81ad9c881cb83600/node_modules/@acala-network/chopsticks-executor/dist/cjs/chopsticks_executor.js:407:10)
    at real (/home/purestake/.npm/_npx/81ad9c881cb83600/node_modules/@acala-network/chopsticks-executor/dist/cjs/chopsticks_executor.js:391:22)
    

Chopsticks devs suggested that Moonbeam's new runtime has functions unknown to smoldot

@tomaka
Copy link
Contributor

tomaka commented Jan 8, 2024

This indeed needs fixing in smoldot, but I want to point out that allow_unresolved_functions: true is fundamentally the correct setting when it comes to parachains, as parachains are free to add their own custom host functions.

@librelois
Copy link

@tomaka I get the same error even with allow_unresolved_functions: true.

@librelois
Copy link

librelois commented Jan 8, 2024

@tomaka @albertov19 the host function PanicHandler::abort_on_panic is never called by our runtime because it's disabled by the rust feature disable_panic_handler.
So, for some reasons the chopsticks parameter allow-unresolved-imports: true is not taken into account, the problem may come as much from chopsticks as from smoldot.

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