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

Interrupt miner when Stacks tip changes #5751

Open
obycode opened this issue Jan 27, 2025 · 0 comments
Open

Interrupt miner when Stacks tip changes #5751

obycode opened this issue Jan 27, 2025 · 0 comments
Labels
optimization Update speed, efficiency, or quality of a feature.

Comments

@obycode
Copy link
Contributor

obycode commented Jan 27, 2025

This is an optimization to improve the time it takes to mine the first valid block in a tenure. When mining a tenure, the miner thread should get interrupted when the tip advances. The way it currently works, at the beginning of a tenure, the miner will often start mining its first block before it sees the last block of the previous tenure. If that last block is accepted and the miner's tip advances, the miner finishes building the block and proposing it to the signers any way. Instead, the miner should stop building its current block, or stop waiting for signatures, since it knows that it will be rejected by 70+% of the signers for not confirming that last block. It can then quickly build a new block atop the new tip.

@obycode obycode added the optimization Update speed, efficiency, or quality of a feature. label Jan 27, 2025
@github-project-automation github-project-automation bot moved this to Status: 🆕 New in Stacks Core Eng Jan 27, 2025
@aldur aldur changed the title Interrupt miner when tip changes Interrupt miner when Stacks tip changes Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimization Update speed, efficiency, or quality of a feature.
Projects
Status: Status: 🆕 New
Development

No branches or pull requests

1 participant