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

TransactionExtension, ExtrinsicV5 #5976

Merged
merged 73 commits into from
Oct 2, 2024
Merged

TransactionExtension, ExtrinsicV5 #5976

merged 73 commits into from
Oct 2, 2024

Conversation

TarikGul
Copy link
Member

@TarikGul TarikGul commented Sep 6, 2024

ref: paritytech/polkadot-sdk#3685

ExtrinsicV4

  • Signed Transactions Work
  • Unsigned Transaction Work
  • No breaking Changes
    • Ensure there are no breaking changes in the current extrinsic construction workflow. This should only be checked off when this PR is ready to be merged.

ExtrinsicV5

  • Signed Transactions Work
    • All payloads are hashed with blake2b
    • Encodes signing payload correctly
    • Decodes signing payload correctly
    • Constructs and injects signatures correctly
    • Correctly sets the preamble
    • Correctly sets the Transaction Extension Version
    • Tests
  • General Transaction Work
    • Decode
    • Encode
    • Compatibility with ExtrinsicBase
  • Bare Transaction Work

Tested Manually

  • Succesfully build and send a TX from scratch using createType with Preamble and Version options
  • Succesfully build and send a TX from scratch using createType WITHOUT Preamble and Version options
  • Submission through api.tx works
  • Apps can decode all tx's in explorer
  • Substrate-api-sidecar decodes blocks correctly

@bee344
Copy link
Member

bee344 commented Sep 20, 2024

Something strange happens when I submit a general throught txwrapper: In the terminal I get

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: 0x6894f9 - rococo_runtime.wasm!rust_begin_unwind
    1: 0x12111 - rococo_runtime.wasm!core::panicking::panic_fmt::h791724d28dc2b8fe
    2: 0x5ac45a - rococo_runtime.wasm!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: 0x6894f9 - rococo_runtime.wasm!rust_begin_unwind\\n    1: 0x12111 - rococo_runtime.wasm!core::panicking::panic_fmt::h791724d28dc2b8fe\\n    2: 0x5ac45a - rococo_runtime.wasm!TaggedTransactionQueue_validate_transaction\")"
    at /home/bee344/Documentos/parity/txwrapper-core/packages/txwrapper-examples/lib/txwrapper-examples/common/util.js:33:19
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async main (/home/bee344/Documentos/parity/txwrapper-core/packages/txwrapper-examples/lib/txwrapper-examples/polkadot/src/polkadot.js:110:26)

But when I submit the same hex through apps author.submitExtrinsic I get

1011: Unknown Transaction Validity: UnknownTransaction::NoUnsignedValidator

No idea why though.

Tested with https://github.com/paritytech/txwrapper-core/tree/anp-test-transaction-ext . Last two commits work with the last two commits here, but for some reason general doesn't work with signed and viceversa

@gui1117
Copy link

gui1117 commented Sep 20, 2024

AFAICT NoUnsignedValidator is only possible to be returned by bare extrinsic.

@bkontur
Copy link
Contributor

bkontur commented Oct 2, 2024

probably, related to this, see comment: paritytech/polkadot-sdk#3685 (review)

@TarikGul
Copy link
Member Author

TarikGul commented Oct 2, 2024

probably, related to this, see comment: paritytech/polkadot-sdk#3685 (review)

Yup this will be released today, so we should be able to push this forward to zombienet after!

@TarikGul
Copy link
Member Author

TarikGul commented Oct 2, 2024

Small merging update - we found a small issue with how api.tx handles the calls. Looking into it (still planning on release today)

@TarikGul TarikGul merged commit c146727 into master Oct 2, 2024
4 checks passed
@TarikGul TarikGul deleted the tg-v5-ext branch October 2, 2024 19:17
@bkontur
Copy link
Contributor

bkontur commented Oct 3, 2024

probably, related to this, see comment: paritytech/polkadot-sdk#3685 (review)

cool, looks like this is working so far,
could you please also release api-cli with this change https://github.com/polkadot-js/tools/tree/master/packages/api-cli ?

@TarikGul
Copy link
Member Author

TarikGul commented Oct 3, 2024

probably, related to this, see comment: paritytech/polkadot-sdk#3685 (review)

cool, looks like this is working so far, could you please also release api-cli with this change https://github.com/polkadot-js/tools/tree/master/packages/api-cli ?

Yup, jumping into it now :)

github-merge-queue bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Oct 4, 2024
Relates to: #5916
Relates to: polkadot-js/api#5976

---------

Co-authored-by: Javier Viola <javier@parity.io>
github-merge-queue bot pushed a commit to paritytech/polkadot-sdk that referenced this pull request Oct 4, 2024
Relates to: #5916
Relates to: polkadot-js/api#5976

---------

Co-authored-by: Javier Viola <javier@parity.io>
@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Oct 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants