AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
133 stars 80 forks source link

Chopsticks not compatible with Moonbeam RT260X Runtimes #575

Closed albertov19 closed 9 months ago

albertov19 commented 10 months ago

Moonbeam-based networks upgraded to RT260X and now Chopsticks is not compatible with any of them. For example, the error I get when I launch Chopsticks pointing to Moonbeam is:

npx @acala-network/chopsticks@latest -c moonbeam

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)
This is using Chopsticks version `0.9.3`
albertov19 commented 10 months ago

It seems that with the flag --allow-unresolved-imports true it works :)

ermalkaleci commented 10 months ago

moonbeam's new runtime has functions unknown to smoldot

wuzhong-zhu commented 10 months ago

🙏🙏🙏wow cool! Thanks!!!

On Thu, 30 Nov 2023 at 11:22 PM, Ermal Kaleci @.***> wrote:

moonbeam's new runtime has functions unknown to smoldot

— Reply to this email directly, view it on GitHub https://github.com/AcalaNetwork/chopsticks/issues/575#issuecomment-1833988893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AESF5NL5C2B3JO4GWDRHSCDYHCQBZAVCNFSM6AAAAABABETXVCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZTHE4DQOBZGM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

albertov19 commented 9 months ago

@xlc @ermalkaleci It seems that --allow-unresolved-imports true does not work with the xcm feature of Chopsticks. Do you know any alternative?

ermalkaleci commented 9 months ago

584

ermalkaleci commented 9 months ago

new beta will be released in a few minutes

albertov19 commented 9 months ago

Thank you @ermalkaleci - I'll keep the issue open to ensure the compatibility issues are solved for Moonbeam-based networks

ermalkaleci commented 9 months ago

@albertov19 0.9.4-6 should work

albertov19 commented 9 months ago

Hey @ermalkaleci it seems that is not working as expected with "@acala-network/chopsticks": "0.9.4-6" :

Any clues?

Was running NPX with @latest and not @beta

qiweiii commented 9 months ago

@acala-network/chopsticks@latest is version 0.9.3

npx @acala-network/chopsticks@0.9.4-6 xcm -r polkadot -p hydradx -p moonbeam will work

ermalkaleci commented 9 months ago

@albertov19 use beta

albertov19 commented 9 months ago

@qiweiii I'm using the beta version as suggested by @ermalkaleci because of a Moonbeam specific issue (check comments above)

@ermalkaleci per my previous message I'm using beta, version ^0.9.4-6. Is there anything specific you want me to look into?

ermalkaleci commented 9 months ago

your npx command says latest which is 0.9.3 use npx @acala-network/chopsticks@beta xcm -r polkadot -p moonbeam

ermalkaleci commented 9 months ago
Screenshot 2023-12-07 at 12 31 03 PM
albertov19 commented 9 months ago

AHHH crap!!!!!! Need more sleep! haha thanks and sorry for the dumb mistake 😄 - Working like a charm. Thanks again

albertov19 commented 9 months ago

I wanted to reopen this until the fix is done in the smoldot thing

ermalkaleci commented 9 months ago

better open an issue on smoldot