This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Companion for pallet-mmr: generate historical proofs #6061
Merged
gavofyork
merged 12 commits into
paritytech:master
from
serban300:generate_historical_proof
Oct 2, 2022
Merged
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
13d12e3
BEEFY: generate historical proofs
serban300 cfa92a5
Merge remote-tracking branch 'upstream/master' into generate_historic…
serban300 cd626b0
cargo update -p sp-io
serban300 b6f99e7
Properly set max proof size for runtimes
KiChjang e1d781d
Properly set max proof size for mocks
KiChjang 5af5576
cargo fmt
KiChjang 6a56721
Set appropriate UMP service total proof size weight
KiChjang 64f2623
Disable zombienet-tests-parachains-disputes CI
KiChjang 12aa8df
Add comment explaining weight math
KiChjang 3510ea9
Use MAX_POV_SIZE for max proof size
KiChjang 78154fe
Cast to u64
KiChjang dbff5f8
Remove comment
KiChjang 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
There are no files selected for viewing
Large diffs are not rendered by default.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,8 +68,9 @@ pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(1); | |
| /// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used | ||
| /// by Operational extrinsics. | ||
| pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); | ||
| /// We allow for 2 seconds of compute with a 6 second average block time. | ||
| pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2); | ||
| /// The storage proof size is not limited so far. | ||
| pub const MAXIMUM_BLOCK_WEIGHT: Weight = | ||
| WEIGHT_PER_SECOND.saturating_mul(2).set_proof_size(u64::MAX); | ||
|
|
||
| const_assert!(NORMAL_DISPATCH_RATIO.deconstruct() >= AVERAGE_ON_INITIALIZE_RATIO.deconstruct()); | ||
|
|
||
|
|
@@ -128,14 +129,14 @@ macro_rules! impl_runtime_weights { | |
| weights.base_extrinsic = $runtime::weights::ExtrinsicBaseWeight::get(); | ||
| }) | ||
| .for_class(DispatchClass::Normal, |weights| { | ||
| weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT); | ||
| weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT.set_ref_time(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time())); | ||
| }) | ||
| .for_class(DispatchClass::Operational, |weights| { | ||
| weights.max_total = Some(MAXIMUM_BLOCK_WEIGHT); | ||
| // Operational transactions have an extra reserved space, so that they | ||
| // are included even if block reached `MAXIMUM_BLOCK_WEIGHT`. | ||
| weights.reserved = Some( | ||
| MAXIMUM_BLOCK_WEIGHT - NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT, | ||
| MAXIMUM_BLOCK_WEIGHT - Weight::from_ref_time(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT.ref_time()), | ||
|
||
| ); | ||
| }) | ||
| .avg_block_initialization(AVERAGE_ON_INITIALIZE_RATIO) | ||
|
|
||
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as below.