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

Wrong encoding of call data when runtime apis moved to separate file #11012

Open
Roznovjak opened this issue Oct 15, 2024 · 0 comments
Open

Wrong encoding of call data when runtime apis moved to separate file #11012

Roznovjak opened this issue Oct 15, 2024 · 0 comments
Labels
Bug Tracks issues causing errors or unintended behavior, critical to fix for reliability. P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first.

Comments

@Roznovjak
Copy link

After moving runtime apis to a separate file, we couldn't submit any TX from the polkadot js app. The issue was also with queryInfo as described here #10994. When compared encoded call data produced by the app and the runtime, call data from the app contained one additional zero byte.

  • encoded signed TX from the polkadot js app: 0xfd0184 00 d435...
  • the same TX encoded using the runtime: 0xf50184 d435...
    That zero byte is placed after the EXTRINSIC_FORMAT_VERSION and before the account data.
    It looks like the call data produced by the app can't be decoded and all TXs fail with the following error:

1002: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed WASM backtrace: error while executing at wasm backtrace: 0: 0x72cb39 - <unknown>!rust_begin_unwind 1: 0xc741 - <unknown>!core::panicking::panic_fmt::hfc6cd7a9f4893967 2: 0x5aa0f9 - <unknown>!TaggedTransactionQueue_validate_transaction: RuntimeApi, Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` instruction executed\nWASM backtrace:\nerror while executing at wasm backtrace:\n 0: 0x72cb39 - <unknown>!rust_begin_unwind\n 1: 0xc741 - <unknown>!core::pa…

  • GH repository with the runtime producing the error, WITH runtime apis moved to a separate file.
  • GH repository with the runtime NOT producing the error, WITHOUT runtime apis moved to a separate file.
    For testing, we were using zombienet.

Metadata produced by both runtimes are identical.

@TarikGul TarikGul added Bug Tracks issues causing errors or unintended behavior, critical to fix for reliability. P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first. labels Oct 30, 2024
@TarikGul TarikGul moved this to P4 - Needs Investigation in Polkadot-js general project board Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Tracks issues causing errors or unintended behavior, critical to fix for reliability. P4 - Needs Investigation Requires analysis to determine cause or feasibility. Not fully understood, needs research first.
Projects
Status: P4 - Needs Investigation
Development

No branches or pull requests

2 participants