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

Removing Storage::backing method #978

Merged
merged 4 commits into from
Oct 16, 2023

Conversation

citizen-stig
Copy link
Member

@citizen-stig citizen-stig commented Oct 3, 2023

Description

As it heavily leaks abstraction.

Replace it with fn get_with_proof(&self, key: StorageKey) -> Option<StorageProof<Self::Proof>> which at least does not expose underlying storage.

Testing

Current tests are passing

Docs

No updates in documentation

@citizen-stig citizen-stig self-assigned this Oct 3, 2023
@citizen-stig citizen-stig marked this pull request as ready for review October 3, 2023 13:36
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Merging #978 (121e3fa) into nightly (ff21c4a) will decrease coverage by 0.2%.
Report is 3 commits behind head on nightly.
The diff coverage is 45.4%.

Files Coverage Δ
...mplementations/sov-attester-incentives/src/call.rs 87.0% <100.0%> (-0.1%) ⬇️
module-system/sov-state/src/storage.rs 94.3% <ø> (ø)
module-system/sov-state/src/zk_storage.rs 59.1% <ø> (+0.8%) ⬆️
...plementations/sov-attester-incentives/src/query.rs 58.1% <83.3%> (-22.9%) ⬇️
module-system/sov-state/src/prover_storage.rs 95.1% <80.0%> (-0.2%) ⬇️
...ule-system/sov-modules-api/src/state/scratchpad.rs 88.1% <0.0%> (-3.2%) ⬇️

... and 19 files with indirect coverage changes

Copy link
Member

@preston-evans98 preston-evans98 left a comment

Choose a reason for hiding this comment

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

We do need the get_bond_proof method for optimistic rollups (and in other places), so I would definitely prefer not to remove it. If we don't remove it, what options do we have to unblock you?

@citizen-stig citizen-stig force-pushed the nikolai/remove_backing_from_storage branch from 0be8bd6 to f6e95db Compare October 16, 2023 09:49
@citizen-stig citizen-stig added this pull request to the merge queue Oct 16, 2023
Merged via the queue into nightly with commit c711c09 Oct 16, 2023
@citizen-stig citizen-stig deleted the nikolai/remove_backing_from_storage branch October 16, 2023 18:13
neysofu pushed a commit that referenced this pull request Oct 17, 2023
* [no ci] Experiment with removing `backing`

* Re-arrange

* use `NativeStorage` trait to feature gate

* Clean up
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.

3 participants