-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PoV Reclaim (Clawback) Node Side #1462
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit
Hold shift + click to select a range
01b858a
Transfer substrate clawback to monorepo
skunert 9c21d3c
Clawback cumulus monorepo transfer
skunert f71f137
debugging: Implement SignedExtension
skunert a30abde
Recorder Experiment
skunert 0370360
Merge branch 'master' into skunert/clawback
skunert 84eb1e7
Make recorder impl compile
skunert 649ec11
Imports
skunert b17e91c
Simplify
skunert da5fe57
Merge branch 'master' into clawbac-simplified
skunert dfefa16
Simplify
skunert 177d2dd
Clean up and implement externalities
skunert aeee135
Rename clawback -> reclaim
skunert d70f3c3
Merge branch 'master' into clawbac-simplified
skunert 42688a3
Cleanup
skunert d9ee3e3
Remove debug logs
skunert 678bb97
Implement `trie_nodes_recorded_for_key`
skunert 08fab5e
Improve validate_block bench
skunert 9ebc861
Move client parameter to config
skunert a303061
Merge branch 'master' into clawbac-simplified
skunert 99ccf64
Remove unwanted changes
skunert 783e0f3
Add some tests for recorder
skunert 8726f78
Add cache to test
skunert f44111f
Improve tests and rename Recorder
skunert d57e689
Remove last debugging relicts
skunert 5b317fd
Fix name in validate_block implementation
skunert 2793696
Reset trie-cache between runs
skunert 652d1d8
Improve benchmarks
skunert 00c734a
".git/.scripts/commands/fmt/fmt.sh"
961f750
CI fixes
skunert 15f8c5d
Reintroduce extension
skunert 0a30b70
Use recorder in validate_block
skunert a1d7db5
Move recorder into static mut
skunert 4abdc43
Use `Execution_Extensions` to register the extensions
skunert 61193c9
Merge branch 'master' into pov-reclaim
skunert 77fbed6
Unchange `proof_size`
skunert 7057770
Zepter & CI
skunert 9e195ce
CI
skunert bd2219f
Add some test for the host function
skunert fb09e49
Merge branch 'master' into pov-reclaim
skunert b51bf3a
Adjust recorder to match new trie-db version
skunert 480d990
Apply suggestions from code review
skunert bb5ecb1
Review comments
skunert f2a5720
Merge branch 'master' into pov-reclaim
skunert 4e3cd31
Review comments
skunert 91ffa72
Remove size estimation and make proof optional
skunert a7fe651
Move extension to sp-trie crate
skunert a367f06
Improve docs & format features
skunert 3701a7a
Sorry clippy
skunert 795e68e
Remove reference to private struct.
skunert fe46117
Merge branch 'master' into pov-reclaim
skunert 57976f6
Apply suggestions from code review
skunert 7bda9cc
Use environmental crate instead of `static mut`
skunert fa22eb4
Review comments
skunert 0de221a
Merge branch 'master' into pov-reclaim
skunert 44a76cd
Merge branch 'master' into pov-reclaim
skunert 7ef514e
".git/.scripts/commands/fmt/fmt.sh"
bb0489e
Move to substrate
skunert 205c34d
u32->u64
skunert 2e0c9e0
Merge branch 'master' into pov-reclaim
skunert ae410c7
fmt
skunert 14be797
Adjust naming to differentiate from trait
skunert 4d6f547
Review comments
skunert 89e59dd
Merge branch 'master' into pov-reclaim
skunert cdb04ce
Move back to cumulus
skunert 416a507
Instantiate extension only in block builder and import
skunert 8014f90
Fix compilation & clippy
skunert c69cf59
".git/.scripts/commands/fmt/fmt.sh"
21b388a
Remove sp-trie from rpc-spec-v2
skunert c4b0e05
Remove usages of host function
skunert 0df1c6b
Merge branch 'master' into pov-reclaim
skunert 8739e61
Update lib.rs
skunert a7ea2a5
Fix map_or
skunert c33a27c
Merge branch 'master' into pov-reclaim
skunert 37ebd47
Merge branch 'master' into pov-reclaim
skunert be98bf2
Merge branch 'master' into pov-reclaim
skunert 115db20
Use u64::MAX as proof recording disabled signal
skunert f0a8699
Merge branch 'master' into pov-reclaim
skunert ea917d8
Merge branch 'master' into pov-reclaim
skunert 1035709
Add crate description
skunert 711e1f1
Remove some unwanted proof recordings
skunert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Reintroduce extension
- Loading branch information
commit 15f8c5dbf5e1be057bc2d27a9d1a8d8b3f4a2ff6
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| [package] | ||
| name = "sp-proof-size-ext" | ||
| version = "4.0.0-dev" | ||
| authors.workspace = true | ||
| edition.workspace = true | ||
| license = "Apache-2.0" | ||
| homepage = "https://substrate.io" | ||
| repository.workspace = true | ||
| description = "A crate which contains an externalities extension to fetch the proof size." | ||
|
|
||
| [package.metadata.docs.rs] | ||
| targets = ["x86_64-unknown-linux-gnu"] | ||
|
|
||
| [dependencies] | ||
| sp-externalities = { path = "../externalities", default-features = false} | ||
| sp-trie = { path = "../trie", default-features = false} | ||
| sp-runtime = { path = "../runtime", default-features = false} | ||
|
|
||
| [features] | ||
| default = ["std"] | ||
| std = [ | ||
| "sp-externalities/std", | ||
| "sp-trie/std", | ||
| "sp-runtime/std", | ||
| ] |
skunert marked this conversation as resolved.
Show resolved
Hide resolved
skunert marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| // This file is part of Substrate. | ||
|
|
||
| // Copyright (C) Parity Technologies (UK) Ltd. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| use sp_trie::ProofSizeProvider; | ||
|
|
||
| #[cfg(feature = "std")] | ||
| sp_externalities::decl_extension! { | ||
| /// The proof size extension to fetch the current storage proof size | ||
| /// in externalities. | ||
| pub struct ProofSizeExt(Box<dyn ProofSizeProvider + 'static + Sync + Send>); | ||
| } | ||
|
|
||
| #[cfg(feature = "std")] | ||
| impl ProofSizeExt { | ||
| pub fn new<T: ProofSizeProvider + Sync + Send + 'static>(recorder: T) -> Self { | ||
| ProofSizeExt(Box::new(recorder)) | ||
| } | ||
|
|
||
| pub fn current_storage_proof_size(&self) -> u32 { | ||
| self.0.estimate_encoded_size() as u32 | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.