Skip to content

schemas: PoV compatible changes#1743

Merged
aramikm merged 19 commits into
mainfrom
pov_compatible_schemas
Nov 13, 2023
Merged

schemas: PoV compatible changes#1743
aramikm merged 19 commits into
mainfrom
pov_compatible_schemas

Conversation

@aramikm

@aramikm aramikm commented Oct 25, 2023

Copy link
Copy Markdown
Collaborator

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
Copy Markdown

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

@codecov

codecov Bot commented Oct 25, 2023

Copy link
Copy Markdown

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
Copy Markdown

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
@github-actions

github-actions Bot commented Nov 1, 2023

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Nov 2, 2023

Copy link
Copy Markdown

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
Comment thread designdocs/schema_v2.md
Comment thread pallets/schemas/src/lib.rs
Comment thread pallets/schemas/src/lib.rs Outdated
Comment thread pallets/schemas/src/lib.rs
@JoeCap08055

Copy link
Copy Markdown
Collaborator

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

@shannonwells shannonwells left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looking good now

Comment thread pallets/schemas/src/tests/other_tests.rs
Comment thread pallets/schemas/src/lib.rs
@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
@github-actions

Copy link
Copy Markdown

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

@enddynayn enddynayn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍 fantastic!

Comment thread designdocs/schema_v2.md Outdated
@github-actions

Copy link
Copy Markdown

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

@mattheworris mattheworris left a comment

Copy link
Copy Markdown
Collaborator

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
Comment thread designdocs/schema_v2.md
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
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice

@saraswatpuneet saraswatpuneet left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice work!

Comment thread pallets/schemas/src/lib.rs
@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
@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