stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 672 forks source link

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

Closed jferrant closed 2 days ago

jferrant commented 1 week ago

@hstove did substantial work on this PR as well so will need review from two others. Closes https://github.com/stacks-network/stacks-core/issues/5433

jferrant commented 1 week ago

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

jferrant commented 1 week ago

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