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

Backport #6418 to stable2412 #6496

Merged
merged 5 commits into from
Nov 19, 2024
Merged

Backport #6418 to stable2412 #6496

merged 5 commits into from
Nov 19, 2024

Conversation

georgepisaltu
Copy link
Contributor

This PR is a backport of #6418.

For context, TransactionExtension, introduced in #3685, is part of the stable2412 release, and this PR brings important fixes and quality of life improvements. Doing the backport now allows us to not break the interface later.

Opened against #6473 as the changes in the original PR were made on top of the changes in this backport.

gui1117 and others added 3 commits November 15, 2024 10:36
…tionExtension::validate` (#6323)

## Meta

This PR is part of 4 PR:
* #6323
* #6324
* #6325
* #6326

## Description

One goal of transaction extension is to get rid or unsigned
transactions.
But unsigned transaction validation has access to the
`TransactionSource`.

The source is used for unsigned transactions that the node trust and
don't want to pay upfront.
Instead of using transaction source we could do: the transaction is
valid if it is signed by the block author, conceptually it should work,
but it doesn't look so easy.

This PR add `TransactionSource` to the validate function for transaction
extensions

(cherry picked from commit 8e3d929)
…UncheckedExtrinsic` (#6418)

Follow up to #3685
Partially fixes #6403

The main PR introduced bare support for the new extension version byte
as well as extension weights and benchmarking.

This PR:
- Removes the redundant extension version byte from the signed v4
extrinsic, previously unused and defaulted to 0.
- Adds the extension version byte to the inherited implication passed to
`General` transactions.
- Whitelists the `pallet_authorship::Author`, `frame_system::Digest` and
`pallet_transaction_payment::NextFeeMultiplier` storage items as they
are read multiple times by extensions for each transaction, but are hot
in memory and currently overestimate the weight.
- Whitelists the benchmark caller for `CheckEra` and `CheckGenesis` as
the reads are performed for every transaction and overestimate the
weight.
- Updates the umbrella frame weight template to work with the system
extension changes.
- Plans on re-running the benchmarks at least for the `frame_system`
extensions.

---------

Signed-off-by: georgepisaltu <george.pisaltu@parity.io>
Co-authored-by: command-bot <>
Co-authored-by: gui <gui.thiolliere@gmail.com>
@georgepisaltu georgepisaltu added the A3-backport Pull request is already reviewed well in another branch. label Nov 15, 2024
@georgepisaltu georgepisaltu requested review from acatangiu, cheme and a team as code owners November 15, 2024 13:11
@georgepisaltu
Copy link
Contributor Author

/cmd prdoc --audience runtime_dev --bump patch

Copy link

github-actions bot commented Nov 15, 2024

This pull request is amending an existing release. Please proceed with extreme caution,
as to not impact downstream teams that rely on the stability of it. Some things to consider:

  • Backports are only for 'patch' or 'minor' changes. No 'major' or other breaking change.
  • Should be a legit fix for some bug, not adding tons of new features.
  • Must either be already audited or not need an audit.
Emergency Bypass

If you really need to bypass this check: add validate: false to each crate
in the Prdoc where a breaking change is introduced. This will release a new major
version of that crate and all its reverse dependencies and basically break the release.

gui1117
gui1117 previously approved these changes Nov 18, 2024
lexnv
lexnv previously approved these changes Nov 18, 2024
Base automatically changed from gui-tx-ext-stage-2-part-1-backport-2412 to stable2412 November 19, 2024 08:25
@EgorPopelyaev EgorPopelyaev dismissed stale reviews from lexnv and gui1117 November 19, 2024 08:25

The base branch was changed.

@EgorPopelyaev EgorPopelyaev merged commit 229b326 into stable2412 Nov 19, 2024
191 of 197 checks passed
@EgorPopelyaev EgorPopelyaev deleted the george-backport-6418 branch November 19, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A3-backport Pull request is already reviewed well in another branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants