-
Notifications
You must be signed in to change notification settings - Fork 767
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
metadata/v15: Collect transaction extensions by versions into custom metadata #6755
Conversation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
types Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
All GitHub workflows were cancelled due to failure one of the required jobs. |
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
CustomValueMetadata { | ||
ty: meta_type::<TrasactionExtensionsByVersion>(), | ||
value: transaction_extensions_by_version.encode(), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is enough, this encode the transaction extension indices used for each version.
But the v15 metadata extensions doesn't contains all the extensions.
If we have 2 version. v15 metadata will contains the first version only.
so we need to add in custom metadata all the other transaction extension, or just all the transaction extensions same as v16.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, this will no longer work when we include new transactions in the next version.
We collect the same transaction extensions (signed extensions), but that will not be the case in the future. I'll introduce the transaction extensions as well, thanks for pointing this out 🙏
Introducing a new transaction extension versioning (ie version 1) should happen after the metadata V16 is stabilized (pending on pallet view functions at the moment). Therefore this is not needed in this form, we'll revisit it at a later time |
This PR collects the
transaction_extensions_by_version
type information into the metadata V15 custom types.This ensures the V15 contains enough information to work with multiple transaction extensions. The meaning of this field is identical to the one collected by the V16 unstable. It includes indexes of extrinsics from the
signed_extension
field of the extrinsic metadata.Exposed Metadata
The decoded value is
Decoded: {0: [0, 1, 2, 3, 4, 5, 6, 7, 8]}
.cc @paritytech/subxt-team