-
Notifications
You must be signed in to change notification settings - Fork 10
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
v16: Add unstable metadata v16 #82
Conversation
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
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.
Nice!
frame-metadata/src/v16.rs
Outdated
/// The type of the outermost Extra enum. | ||
pub extra_ty: T::Type, | ||
/// The signed extensions in the order they appear in the extrinsic. | ||
pub signed_extensions: Vec<SignedExtensionMetadata<T>>, |
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.
pub signed_extensions: Vec<SignedExtensionMetadata<T>>, | |
pub transaction_extensions: Vec<SignedExtensionMetadata<T>>, |
Do we want to rename it directly?
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.
Yep, we can do it now since its quite a small change :D Thanks for pointing this out 🙏 Have also renamed the struct SignedExtensionMetadata
-> struct TransactionExtensionMetadata
frame-metadata/src/v16.rs
Outdated
)] | ||
pub struct ExtrinsicMetadata<T: Form = MetaForm> { | ||
/// Extrinsic version. | ||
pub version: u8, |
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.
Maybe we could return a Vec<u8>
that represents all the available versions.
frame-metadata/src/v16.rs
Outdated
/// The type of the `Runtime`. | ||
pub ty: <PortableForm as Form>::Type, |
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.
For what is this needed? I mean this type is just some dummy type.
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.
After briefly looking into subxt I didn't find any usage of this type 🤔 I believe we expose it in our metadata APIs and keep around, have removed it for now
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>
serialize Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This PR adds the metadata V16 to the frame-metadata crate, under the
unstable
feature flag.The u32 ID of the metadata V16 is currently
u32::MAX
to mark the metadata as unstable.This PR paves the way towards collecting the metadata in substrate and enables the extraction of the metadata via the runtime API calls.
cc @paritytech/subxt-team