-
Notifications
You must be signed in to change notification settings - Fork 671
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
Spend down the block budget limit by x% every block #5450
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Jacinta Ferrant <[email protected]>
ff93626
to
1443e8c
Compare
@obycode also recommends making this a configurable, but also to make it a soft limit and to apply it after all other checks. Will move it to try_mine_tx_with_len in NakamotoBlockBuilder. |
…ly it to Nakamoto tenures Signed-off-by: Jacinta Ferrant <[email protected]>
I tried to make this a soft limit but it seemed to require some pretty ugly messing around with the way we call try_mine_tx_with_len in select_and_apply_transactions and how we use that result before exiting our loop. Still working on fixing this. EDIT: think I got it working. Gotta fix CI and Tests. |
Signed-off-by: Jacinta Ferrant <[email protected]>
…oft check Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
3fbfaa5
to
0896355
Compare
Signed-off-by: Jacinta Ferrant <[email protected]>
0896355
to
95ca231
Compare
@@ -536,7 +536,7 @@ impl NakamotoBlockBuilder { | |||
.mempool_settings | |||
.tenure_cost_limit_per_block_percentage | |||
{ | |||
if percentage < 100 { | |||
if (1..100).contains(&percentage) { |
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.
We could avoid this check altogether if a percentage of 100
in the config becomes a None
instead of Some(100)
.
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.
True, but i kept this additional check in case someone wrote code directly instead of using the raw config file. i.e. we shouldn't attempt to increase the amount of block space nor set it to zero no matter what, I had assumed. But prob better to not fail silently anyway.. maybe convert this to an assert here in case there is a poorly written test? I.e. assert!((1..100).contains(percentage), "BUG: Invalid block budget percentage {percentage}") ?
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
Signed-off-by: Jacinta Ferrant <[email protected]>
@hstove did substantial work on this PR as well so will need review from two others.
Closes #5433