Skip to content
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

add extrinsic_state_version to RuntimeVersion and bump CoreApi version to 5 #1968

Closed

Conversation

vedhavyas
Copy link
Contributor

@vedhavyas vedhavyas commented Oct 20, 2023

Description

  • What does this PR do?
    Adds extrinsic_state_version field to RuntimeVersion so that projects can pick V0/V1 depending on the use case.
  • Why are these changes needed?
    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.
  • How were these changes implemented and what do they affect?
    Field extrinsic_state_version is added to RuntimeVersion struct and CoreApi version is bumped to 5. CoreApi version < 5 always leads to StateVersion::V0 while CoreApi verision >= 5 can let projects to pick ether V0 or V1

Checklist

  • My PR includes a detailed description as outlined in the "Description" section above
  • My PR follows the labeling requirements of this project (at minimum one label for T
    required)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@tomaka
Copy link
Contributor

tomaka commented Oct 23, 2023

Since it would modify Polkadot/Kusama, this change needs an RFC: https://github.com/polkadot-fellows/RFCs

@vedhavyas
Copy link
Contributor Author

I have opened RFC here - polkadot-fellows/RFCs#42

Thanks for the heads up @tomaka

@nazar-pc
Copy link
Contributor

The changes are simple, so I did a rebase on latest master

@nazar-pc nazar-pc force-pushed the include_extrinsic_state_version branch 4 times, most recently from b980518 to 6853e2b Compare January 15, 2024 09:40
@nazar-pc nazar-pc force-pushed the include_extrinsic_state_version branch from 6853e2b to ee5cf7d Compare January 15, 2024 10:16
@tomaka
Copy link
Contributor

tomaka commented Jan 15, 2024

Note that the PR no longer matches what the RFC says.

@nazar-pc
Copy link
Contributor

Hm, true.
Ved will have another PR open that implements latest proposal, likely later this week.

@bkchr bkchr closed this Mar 20, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Mar 26, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Mar 27, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
serban300 pushed a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
bkchr pushed a commit that referenced this pull request Apr 10, 2024
@bkchr
Copy link
Member

bkchr commented Apr 23, 2024

@vedhavyas do you still want to open a pr based on the RFC?

@vedhavyas
Copy link
Contributor Author

@bkchr yes, I'm working on this right now. Should have a PR soon

@vedhavyas vedhavyas deleted the include_extrinsic_state_version branch April 23, 2024 11:09
@vedhavyas
Copy link
Contributor Author

@bkchr The PR should be up here - #4257

TomaszWaszczyk pushed a commit to TomaszWaszczyk/polkadot-sdk that referenced this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants