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

Spend down the block budget limit by x% every block #5450

Merged
merged 30 commits into from
Nov 19, 2024

Conversation

jferrant
Copy link
Collaborator

@jferrant jferrant commented Nov 11, 2024

@hstove did substantial work on this PR as well so will need review from two others.
Closes #5433

@jferrant jferrant requested a review from a team as a code owner November 11, 2024 20:33
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
@jferrant jferrant force-pushed the feat/block-budget-spend-down branch from ff93626 to 1443e8c Compare November 11, 2024 20:36
@jferrant
Copy link
Collaborator Author

@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 <jacinta@trustmachines.co>
@jferrant jferrant requested a review from a team as a code owner November 11, 2024 23:50
@jferrant
Copy link
Collaborator Author

jferrant commented Nov 11, 2024

@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.

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 <jacinta@trustmachines.co>
…oft check

Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
jcnelson
jcnelson previously approved these changes Nov 12, 2024
@jferrant jferrant requested a review from hstove November 13, 2024 00:04
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
stackslib/src/chainstate/stacks/miner.rs Outdated Show resolved Hide resolved
testnet/stacks-node/src/tests/nakamoto_integrations.rs Outdated Show resolved Hide resolved
testnet/stacks-node/src/tests/signer/v0.rs Outdated Show resolved Hide resolved
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
@jferrant jferrant force-pushed the feat/block-budget-spend-down branch from 3fbfaa5 to 0896355 Compare November 15, 2024 18:56
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
@jferrant jferrant force-pushed the feat/block-budget-spend-down branch from 0896355 to 95ca231 Compare November 15, 2024 19:15
stackslib/src/chainstate/nakamoto/miner.rs Outdated Show resolved Hide resolved
testnet/stacks-node/src/config.rs Outdated Show resolved Hide resolved
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@hstove hstove left a comment

Choose a reason for hiding this comment

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

LGTM!

@jferrant jferrant requested a review from jcnelson November 18, 2024 23:06
@jcnelson jcnelson self-requested a review November 19, 2024 17:52
@jferrant jferrant enabled auto-merge November 19, 2024 18:10
@jferrant jferrant added this pull request to the merge queue Nov 19, 2024
Merged via the queue into develop with commit a81469f Nov 19, 2024
1 check passed
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants