Skip to content

Interrupt miner when Stacks tip changes #5751

Closed
@obycode

Description

@obycode

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lockedoptimizationUpdate speed, efficiency, or quality of a feature.

    Type

    No type

    Projects

    Status

    Status: ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions