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 #6323 to stable2412: add transaction source in transaction extension API. #6473

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

gui1117
Copy link
Contributor

@gui1117 gui1117 commented Nov 14, 2024

add transaction source in the transaction extension API.

Transaction extension is introduced in stable2412 so better not to break again later.

@gui1117 gui1117 requested a review from a team as a code owner November 14, 2024 02:09
@gui1117 gui1117 added the A3-backport Pull request is already reviewed well in another branch. label Nov 14, 2024
@paritytech-review-bot paritytech-review-bot bot requested a review from a team November 14, 2024 02:10
Copy link

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.

…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)
@gui1117 gui1117 force-pushed the gui-tx-ext-stage-2-part-1-backport-2412 branch from 1f77021 to f2fd080 Compare November 15, 2024 01:36
@gui1117 gui1117 changed the title backport https://github.com/paritytech/polkadot-sdk/pull/6323 to stable2412 backport #6323 to stable2412: add transaction source in transaction extension API. Nov 18, 2024
@EgorPopelyaev EgorPopelyaev merged commit 5824ce0 into stable2412 Nov 19, 2024
189 of 198 checks passed
@EgorPopelyaev EgorPopelyaev deleted the gui-tx-ext-stage-2-part-1-backport-2412 branch November 19, 2024 08:25
EgorPopelyaev pushed a commit that referenced this pull request Nov 19, 2024
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.

---------

Signed-off-by: georgepisaltu <[email protected]>
Co-authored-by: Guillaume Thiolliere <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
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.

3 participants