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

schemas: PoV compatible changes #1743

Merged
merged 19 commits into from
Nov 13, 2023
Merged

schemas: PoV compatible changes #1743

merged 19 commits into from
Nov 13, 2023

Conversation

aramikm
Copy link
Collaborator

@aramikm aramikm commented Oct 25, 2023

Goal

The goal of this PR is to split schemas and the model into 2 separate storages so that we can limit the size of PoV being accessed from other pallets.

Closes #1742

Checklist

  • Chain spec updated
  • Design doc(s) updated
  • Tests added
  • Benchmarks added
  • Weights updated

@aramikm aramikm changed the title schemas: PoV compatible changes [DRAFT] schemas: PoV compatible changes Oct 25, 2023
@github-actions
Copy link

Running benchmarks and calculating weights. DO NOT MERGE! A new commit will be added upon completion...

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #1743 (a96bc9b) into main (194b1b1) will decrease coverage by 0.41%.
The diff coverage is 77.10%.

@@            Coverage Diff             @@
##             main    #1743      +/-   ##
==========================================
- Coverage   88.00%   87.60%   -0.41%     
==========================================
  Files          51       52       +1     
  Lines        4270     4339      +69     
==========================================
+ Hits         3758     3801      +43     
- Misses        512      538      +26     
Files Coverage Δ
pallets/messages/src/lib.rs 89.05% <100.00%> (ø)
pallets/schemas/src/types.rs 100.00% <ø> (ø)
pallets/stateful-storage/src/lib.rs 86.35% <100.00%> (ø)
common/primitives/src/schema.rs 71.42% <0.00%> (-2.49%) ⬇️
pallets/schemas/src/migration/v2.rs 86.95% <86.95%> (ø)
pallets/schemas/src/lib.rs 77.77% <65.51%> (-9.55%) ⬇️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@github-actions
Copy link

Finished running benchmarks. Updated weights have been committed to this PR branch in commit afe3711.

@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Oct 25, 2023
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented and removed metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Nov 1, 2023
@aramikm aramikm force-pushed the pov_compatible_schemas branch from 61723a0 to 0629206 Compare November 1, 2023 22:48
@github-actions github-actions bot removed metadata-changed Metadata has changed since the latest full release metadata-version-not-incremented Metadata has changed since the latest full release, but the version has not been incremented labels Nov 1, 2023
Copy link

github-actions bot commented Nov 1, 2023

Running benchmarks and calculating weights. DO NOT MERGE! A new commit will be added upon completion...

Copy link

github-actions bot commented Nov 2, 2023

Finished running benchmarks. Updated weights have been committed to this PR branch in commit 344b1a7.

demisx pushed a commit that referenced this pull request Nov 2, 2023
@github-actions github-actions bot added the metadata-changed Metadata has changed since the latest full release label Nov 2, 2023
@aramikm aramikm force-pushed the pov_compatible_schemas branch from 344b1a7 to 965da26 Compare November 2, 2023 01:03
@aramikm aramikm changed the title [DRAFT] schemas: PoV compatible changes schemas: PoV compatible changes Nov 2, 2023
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Nov 3, 2023
@JoeCap08055
Copy link
Collaborator

Looks pretty good. Perhaps add/update e2e tests for all pallets to use the new RPC?

Copy link
Collaborator

@shannonwells shannonwells left a comment

Choose a reason for hiding this comment

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

Looking good now

pallets/schemas/src/tests/other_tests.rs Show resolved Hide resolved
pallets/schemas/src/lib.rs Show resolved Hide resolved
@github-actions github-actions bot added metadata-changed Metadata has changed since the latest full release and removed metadata-changed Metadata has changed since the latest full release labels Nov 10, 2023
@github-actions github-actions bot removed the metadata-changed Metadata has changed since the latest full release label Nov 10, 2023
Copy link

Running benchmarks and calculating weights. DO NOT MERGE! A new commit will be added upon completion...

Copy link
Collaborator

@enddynayn enddynayn left a comment

Choose a reason for hiding this comment

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

👍 fantastic!

Copy link

Finished running benchmarks. Updated weights have been committed to this PR branch in commit 8df2685.

@github-actions github-actions bot added the metadata-changed Metadata has changed since the latest full release label Nov 10, 2023
Copy link
Collaborator

@mattheworris mattheworris left a comment

Choose a reason for hiding this comment

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

Solid.
:shipit:

[Read through code, ran tests,
caveat: I don't have much experience with storage migration, but nothing smells off]

@github-actions github-actions bot removed the metadata-changed Metadata has changed since the latest full release label Nov 10, 2023
This PoV improvement would not affect extrinsic weights in this pallet, but it would directly affect any
pallet that is dependent on **Schemas** pallet. Some of these pallets are **Messages** and
**Stateful-Storage**. After these changes we are expecting see to see around 30-60KiB decrease in PoV
for `MaxEncodedLen` mode.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice

Copy link
Collaborator

@saraswatpuneet saraswatpuneet left a comment

Choose a reason for hiding this comment

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

Nice work!

@github-actions github-actions bot added the metadata-changed Metadata has changed since the latest full release label Nov 13, 2023
@aramikm aramikm merged commit d1111d9 into main Nov 13, 2023
30 checks passed
@aramikm aramikm deleted the pov_compatible_schemas branch November 13, 2023 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metadata-changed Metadata has changed since the latest full release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Schemas optimized for time and PoV
8 participants