-
Notifications
You must be signed in to change notification settings - Fork 679
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
Investigate block fill when mempool is full #3012
Comments
Per @jcnelson, with the following settings: [miner]
first_attempt_time_ms = 5000
subsequent_attempt_time_ms = 180000
microblock_attempt_time_ms = 30000 A miner would start to fill blocks more easily
There's a couple ways we could make use of this information:
[miner]
first_attempt_time_ms = 5000
second_attempt_time_ms = 60000
subsequent_attempt_time_ms = 180000
microblock_attempt_time_ms = 30000 This makes it so that the first attempt is fast, in order to allow miners to continue to progress in flash blocks. The second attempt is slower, but still short enough to make it into most bitcoin blocks, and then subsequent attempts are allowed to take longer. Any thoughts on the best path of those, @jcnelson ? |
Maybe we can optimize the mining code to get more tx's in for a given timeout. |
I think this is addressed as of #3185? |
I also think this can be closed. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
For the past few weeks, there's consistently been high-congestion on the Stacks network -- many transactions are in the mempool, but there's still often Stacks block with ~10 transactions (as well as blocks with 500-2000 transactions: blocks like these are the goal).
Why is this happening?
One hypothesis was that miner's block assembly is not getting the "second attempt" out quickly enough to be included in the bitcoin sortition. With some of the data provided by a miner in discord, that doesn't seem to be the case:
That's only assembling blocks with a handful of transactions even on the second assembly.
The next hypothesis is that block assembly just takes miners a long time. This makes some some logical sense: miners need to iterate over the mempool, evaluate transactions' nonces and account balances before execution, so block assembly actually requires more effort than block validation. There could be different ways to address this, but first we should confirm if this is the case. One way to do this is to use a mock-miner with
subsequent_attempt_time_ms
set to a large number, say two minutes or three minutes. With this, we should be able to see in the logs that the mock miner is assembling very large blocks while the mempool is full. If this is the case, then we know that is the problem. If the mock miner still assembles small blocks while the mempool is full, we know we need to look elsewhere.The text was updated successfully, but these errors were encountered: