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

Improve the error information when using wrong type in signed extensions (ChargeAssetTxPayment) #4267

Open
2 tasks done
IkerAlus opened this issue Apr 24, 2024 · 0 comments
Open
2 tasks done
Labels
I5-enhancement An additional feature request. I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@IkerAlus
Copy link

IkerAlus commented Apr 24, 2024

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Motivation

Once the Asset conversion pallet is live in Asset Hub runtimes, the signed extension ChargeAssetTxPayment allows to pay fees with an asset which has a liquidity pool created vs DOT by passing (optionally) the XCM location of the corresponding asset as a param of the signed extension. Before this feature was live, this worked by simply passing an integer as asset ID, Option(u32), in the mentioned signed extension. Hence if users were not aware of the change and they submit a transaction where the asset ID param of the ChargeAssetTxPayment signed extension is an integer it will fail during verification in the transaction pool and return the following error message from the node:

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: 0x3d6012 - <unknown>!rust_begin_unwind 1: 0x20ca - <unknown>!core::panicking::panic_fmt::h0d63004982a68afd 2: 0x32f7aa - <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: 0x3d6012 - <unknown>!rust_begin_unwind\n 1: 0x20ca - <unknown>!core::pa…

Several users encountered this issue when Polkadot Asset Hub was upgrade to 1.2 runtime, and it was not straightforward to find the root cause.

Request

Capture the wrong type usage during transaction verification in the transaction pool and return a relevant error message from the node.

@IkerAlus IkerAlus added the I5-enhancement An additional feature request. label Apr 24, 2024
@github-actions github-actions bot added the I10-unconfirmed Issue might be valid, but it's not yet known. label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

No branches or pull requests

1 participant