feat: support custom transaction extension values - #2273
Open
DenzelPenzel wants to merge 3 commits into
Open
Conversation
DenzelPenzel
force-pushed
the
denzelpenzel/custom-transaction-extension-values
branch
from
August 13, 2026 22:40
66a7dba to
0d59be4
Compare
DenzelPenzel
force-pushed
the
denzelpenzel/custom-transaction-extension-values
branch
from
August 14, 2026 14:52
249fd60 to
9d1ea0b
Compare
DenzelPenzel
force-pushed
the
denzelpenzel/custom-transaction-extension-values
branch
from
August 14, 2026 14:56
9d1ea0b to
ce9a555
Compare
DenzelPenzel
marked this pull request as ready for review
August 14, 2026 15:39
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow callers to provide metadata-aware values for custom transaction extensions without implementing a new
Config:The value is encoded against the extension type from runtime metadata. This fixes signing on chains such as Paseo Asset Hub, where
RestrictOriginscontains a barebool.Fixes #2265.
Implementation
Breaking changes
DefaultTransactionExtensions<T>and itsParamstype changed from public tuple aliases to structs with private fields, so that custom extension values can be carried alongside the known ones. The tuples live on under new names:KnownDefaultTransactionExtensions<T>andKnownDefaultExtrinsicParams<T>.Code which configures transactions via the builder and passes the params through opaquely is source-compatible and produces byte-identical transactions. Code which relied on the tuple shape of the params migrates as follows:
DefaultExtrinsicParams::from_known(tuple)params.5 = ...params.known_mut().5 = ...¶ms.7¶ms.known().7Given the above, this should land in 0.51 rather than a 0.50.x patch.
Notes
cargo fmtfix for two test asserts that landed unformatted on master.