Skip to content

Conversation

@bkchr
Copy link
Member

@bkchr bkchr commented Nov 21, 2025

This pull request ensures that when decoding an UncheckedExtrinsic from a certain byte string, it also encodes to the same byte string. This is achieved by keeping the original bytes used to decode the call around and then directly encode these.

…as decoded from

This pull request ensures that when decoding an `UncheckedExtrinsic` from a certain byte string, it also encodes to the same byte string.
This is achieved by keeping the original bytes used to decode the `call` around and then directly encode these.
@bkchr bkchr added the T17-primitives Changes to primitives that are not covered by any other label. label Nov 21, 2025
@bkchr
Copy link
Member Author

bkchr commented Nov 21, 2025

/cmd prdoc --bump major --audience runtime_dev

@bkchr bkchr added the A4-backport-stable2512 Pull request must be backported to the stable2512 release branch label Nov 21, 2025
@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/19665842105
Failed job name: fmt

@bkchr
Copy link
Member Author

bkchr commented Nov 25, 2025

/cmd fmt

}

/// Something which holds the actual call and maybe its encoded form.
pub struct CallAndMaybeEncoded<T> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just as comment: We have a DoubleEncoded type that does this, but it in the XCM crate... it is also the other way around by always carrying the encoded version and only sometimes the decoded one.

}

impl<T> From<T> for CallAndMaybeEncoded<T> {
fn from(value: T) -> Self {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to make it a bit backwards compatible since any Call type can be converted to a CallAndMaybeEncoded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A4-backport-stable2512 Pull request must be backported to the stable2512 release branch T17-primitives Changes to primitives that are not covered by any other label.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants