-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
TransactionExtension
tuple of tuple transparent for implication (
#7028) Currently `(A, B, C)` and `((A, B), C)` change the order of implications in the transaction extension pipeline. This order is not accessible in the metadata, because the metadata is just a vector of transaction extension, the nested structure is not visible. This PR make the implementation for tuple of `TransactionExtension` better for tuple of tuple. `(A, B, C)` and `((A, B), C)` don't change the implication for the validation A. This is a breaking change but only when using the trait `TransactionExtension` the code implementing the trait is not breaking (surprising rust behavior but fine). --------- Co-authored-by: command-bot <> Co-authored-by: Bastian Köcher <[email protected]>
- Loading branch information
Showing
7 changed files
with
279 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
title: 'Fix implication order in implementation of `TransactionExtension` for tuple' | ||
doc: | ||
- audience: | ||
- Runtime Dev | ||
- Runtime User | ||
description: |- | ||
Before this PR, the implications were different in the pipeline `(A, B, C)` and `((A, B), C)`. | ||
This PR fixes this behavior and make nested tuple transparant, the implication order of tuple of | ||
tuple is now the same as in a single tuple. | ||
|
||
For runtime users this mean that the implication can be breaking depending on the pipeline used | ||
in the runtime. | ||
|
||
For runtime developers this breaks usage of `TransactionExtension::validate`. | ||
When calling `TransactionExtension::validate` the implication must now implement `Implication` | ||
trait, you can use `TxBaseImplication` to wrap the type and use it as the base implication. | ||
E.g. instead of `&(extension_version, call),` you can write `&TxBaseImplication((extension_version, call))`. | ||
|
||
crates: | ||
- name: sp-runtime | ||
bump: major | ||
- name: pallet-skip-feeless-payment | ||
bump: major | ||
- name: frame-system | ||
bump: major |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.