-
Notifications
You must be signed in to change notification settings - Fork 707
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
Introduce config param for state version instead using a StateVersion::V0 for extrinsic root derivation #1691
Conversation
88a1810
to
4ef2460
Compare
4ef2460
to
d54ae59
Compare
dd2d9ef
to
9f9902e
Compare
Hey folks, I could use some help in fixing the failing test and I'm not sure if this is related to my changes. Not to say the cliched thing but the following Thanks! |
Will be reviewing the pr next week, but at first glance the CI error does not look related (also not a required one), probably no need to check before reviews (not a 'required' test). |
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.
Yeah. Generally I think this is fine. It will break everybodys runtime, but sadly we can not do better right know. However, I would re-export StarteVersion
from frame_system
to not require people to pull in sp_core
.
40a5130
to
14c894e
Compare
@@ -401,6 +415,9 @@ pub mod pallet { | |||
|
|||
/// The maximum number of consumers allowed on a single account. | |||
type MaxConsumers: ConsumerLimits; | |||
|
|||
/// State verison used to derive extrinsics root. | |||
type ExtrinsicsRootStateVersion: Get<sp_core::storage::StateVersion>; |
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.
No idea yet if doable or fine, but would it be suitable to put this state version as part of RuntimeVersion (type Version) as a new field or a specific api version (as a specific api version, could default to 0 when missing so there would be no need to change existing pallets).
14c894e
to
725068c
Compare
Apologies for the delay. The PR should be updated per review suggestions @bkchr |
@bkchr Bump |
8ba38f7
to
6365073
Compare
@cheme you are correct, adding an |
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
* Replace const parameters * fmt * missed out Maxlocks
Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context,
including:
Adds Extrinsinc root state version as config parameter so that users can pick V0/V1 depending on the use case.
Currently extrinsic root is derived using StateVersion::V0. In order to generate the extrinsic root, we would need to have access to full extrinsic data. We have a use case where, domains extrinsic root need to be derived on consensus runtime and passing all the extrinsic data through Fraud proof will exceed block limit. We are planning to use StateVersion::V1 so that we can just use extrinsic hashes if the extrinsic data is more than 32 bytes.
Config parameter for ExtrinsicRootStateVersion can be passed through runtime and I have set it to StateVersion::V0 so this should not change the extrinsic root derivation for existing projects.
Checklist
T
required)