Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
c992d67
Basic weights builder.
tomusdrw Jun 23, 2020
52e2033
Fixing WiP
tomusdrw Jun 24, 2020
350976e
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Jun 25, 2020
01b9aea
Make the tests work.
tomusdrw Jul 1, 2020
201a5ba
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Jul 1, 2020
6c2676d
Fix weights in node/runtime.
tomusdrw Jul 2, 2020
390a359
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Jul 6, 2020
4e11daf
WiP.
tomusdrw Jul 6, 2020
f914485
Update pallets with new weights parameters.
tomusdrw Jul 6, 2020
17ce9a3
Validate returns a Result now.
tomusdrw Jul 7, 2020
44e5981
Count mandatory weight separately.
tomusdrw Jul 7, 2020
141fbfb
DRY
tomusdrw Jul 7, 2020
3f0a2e9
BREAKING: Updating state root, because of the left-over weight-tracki…
tomusdrw Jul 8, 2020
782cc72
Update tests affected by Mandatory tracking.
tomusdrw Jul 8, 2020
8185cb1
Fixing tests.
tomusdrw Jul 9, 2020
1525c76
Fix defaults for simple_max
tomusdrw Jul 9, 2020
9441b00
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Jul 9, 2020
9f3a541
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Jul 10, 2020
2ab1f18
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Jul 16, 2020
f09c6f3
Update frame/system/src/weights.rs
tomusdrw Jul 17, 2020
eb84c74
Rework the API a bit.
tomusdrw Jul 23, 2020
edab564
Fix compilation & tests.
tomusdrw Jul 23, 2020
738ac18
Merge remote-tracking branch 'origin/td-weight-parameters-refactor' i…
tomusdrw Jul 23, 2020
319ee5c
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Jul 23, 2020
da4ff09
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Jul 27, 2020
95e249c
Apply suggestions from code review
tomusdrw Jul 28, 2020
22ef5d3
Add extra docs & rename few things.
tomusdrw Jul 28, 2020
cad3d96
Fix whitespace in ASCII art.
tomusdrw Jul 28, 2020
22fa090
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Jul 28, 2020
eb75ba3
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Jul 30, 2020
98fdb4a
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Jul 31, 2020
a2359eb
Update frame/system/src/limits.rs
tomusdrw Aug 5, 2020
bea4dd0
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Aug 5, 2020
31706c6
Fix max_extrinsic calculations.
tomusdrw Aug 6, 2020
fa3203c
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Aug 18, 2020
e197126
Fix conflicts.
tomusdrw Aug 18, 2020
804bee5
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Aug 20, 2020
f4da99a
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Aug 28, 2020
233a5ff
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Sep 9, 2020
da260bd
Fix compilation.
tomusdrw Sep 9, 2020
91366d9
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Sep 21, 2020
1e1bcf7
Fix new code.
tomusdrw Sep 21, 2020
9b7d331
re-remove generic asset
shawntabrizi Sep 22, 2020
6176f8e
Merge branch 'master' into td-weight-parameters-refactor
gnunicorn Sep 22, 2020
0a138ac
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Sep 23, 2020
b69b3e5
Fix usage.
tomusdrw Sep 23, 2020
d6e7776
Update state root.
tomusdrw Sep 23, 2020
2d8875f
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Sep 28, 2020
6e8ff1d
Update proxy.
tomusdrw Sep 28, 2020
b12359d
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Nov 17, 2020
45c6fe6
Fix tests.
tomusdrw Nov 17, 2020
543891f
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Nov 25, 2020
44946a8
Move weights validity to integrity_test
tomusdrw Nov 27, 2020
2cf0631
Remove redundant BlockWeights.
tomusdrw Nov 27, 2020
6f00731
Add all/non_mandatory comment
tomusdrw Nov 27, 2020
7a8b774
Add test.
tomusdrw Nov 27, 2020
8bc7ca5
Remove fn block_weights
tomusdrw Dec 2, 2020
d115561
Make the macro prettier.
tomusdrw Dec 2, 2020
f18cbab
Fix some docs.
tomusdrw Dec 2, 2020
6e4c35c
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Dec 2, 2020
b4c293c
Merge branch 'master' into td-weight-parameters-refactor
tomusdrw Dec 2, 2020
e2ee2b9
Make max_total behave more predictabily.
tomusdrw Dec 3, 2020
953f845
Add BlockWeights to metadata.
tomusdrw Dec 3, 2020
4854b95
Merge branch 'master' into td-weight-parameters-refactor
shawntabrizi Dec 7, 2020
ddc57b0
fix balances test
gui1117 Dec 8, 2020
ab0ba02
Fix utility test.
tomusdrw Dec 8, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix whitespace in ASCII art.
  • Loading branch information
tomusdrw committed Jul 28, 2020
commit cad3d961245bf5256d8c44a9eab45271724a7c60
42 changes: 21 additions & 21 deletions frame/system/src/limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ pub struct WeightsPerClass {
/// is executed. This cost is tracked as `Mandatory` dispatch class.
///
/// | | `max_block` | |
Copy link
Contributor

Choose a reason for hiding this comment

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

now this is awesome docs :D

/// | | | |
/// | | | |
/// | | | |
/// | | | |
/// | | | |
/// | | | #| `on_initialize`
/// | #| `base_block` | #|
/// |NOM| |NOM|
/// ||\_ Mandatory
/// |\__ Operational
/// \___ Normal
/// |NOM| |NOM|
/// ||\_ Mandatory
/// |\__ Operational
/// \___ Normal
///
/// The remaining capacity can be used to dispatch extrinsics. Note that each dispatch class
/// is being tracked separately, but the sum can't exceed `max_block` (except for `reserved`).
Expand All @@ -156,11 +156,11 @@ pub struct WeightsPerClass {
/// -- `Mandatory` limit (unlimited)
/// | # | | |
/// | # | `Ext3` | - - `Operational` limit
/// |# | `Ext2` |- - `Normal` limit
/// |# | `Ext2` |- - `Normal` limit
/// | # | `Ext1` | # |
/// | #| `on_initialize` | ##|
/// | #| `base_block` |###|
/// |NOM| |NOM|
/// |NOM| |NOM|
///
/// It should be obvious now that it's possible for one class to reach it's limit (say `Normal`),
/// while the block has still capacity to process more transactions (`max_block` not reached,
Expand All @@ -172,27 +172,27 @@ pub struct WeightsPerClass {
/// out lower-priority `Operational` transactions. In such cases you might add a `reserved` capacity
/// for given class.
/// _
/// # \
/// # `Ext8` - `reserved`
/// # \
/// # `Ext8` - `reserved`
/// # _/
/// | # | `Ext7 | - - `Operational` limit
/// |# | `Ext6` | |
/// |# | `Ext5` |-# - `Normal` limit
/// |# | `Ext5` |-# - `Normal` limit
/// |# | `Ext4` |## |
/// | #| `on_initialize` |###|
/// | #| `base_block` |###|
/// |NOM| |NOM|
/// |NOM| |NOM|
///
/// In the above example, `Ext4-6` fill up the block almost up to `max_block`. `Ext7` would not fit
/// if there wasn't the extra `reserved` space for `Operational` transactions. Note that `max_total`
/// limit applies to `reserved` space as well (i.e. the sum of weights of `Ext7` & `Ext8` mustn't
/// exceed it). Setting `reserved` to `None` allows the extrinsics to always get into the block up
/// to their `max_total` limit. If `max_total` is set to `None` as well, all extrinsics witch
/// dispatchables of given class will always end up in the block (recommended for `Mandatory`
/// dispatch class).
/// In the above example, `Ext4-6` fill up the block almost up to `max_block`. `Ext7` would not fit
/// if there wasn't the extra `reserved` space for `Operational` transactions. Note that `max_total`
/// limit applies to `reserved` space as well (i.e. the sum of weights of `Ext7` & `Ext8` mustn't
/// exceed it). Setting `reserved` to `None` allows the extrinsics to always get into the block up
/// to their `max_total` limit. If `max_total` is set to `None` as well, all extrinsics witch
/// dispatchables of given class will always end up in the block (recommended for `Mandatory`
/// dispatch class).
///
/// As a consequence of `reserved` space, total consumed block weight might exceed `max_block`
/// value, so this parameter should rather be thought of as "target block weight" than a hard limit.
/// As a consequence of `reserved` space, total consumed block weight might exceed `max_block`
/// value, so this parameter should rather be thought of as "target block weight" than a hard limit.
#[derive(RuntimeDebug, Clone)]
pub struct BlockWeights {
/// Base weight of block execution.
Expand Down