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

Patient block-commits by default #5821

Open
obycode opened this issue Feb 10, 2025 · 0 comments
Open

Patient block-commits by default #5821

obycode opened this issue Feb 10, 2025 · 0 comments
Assignees
Milestone

Comments

@obycode
Copy link
Contributor

obycode commented Feb 10, 2025

Currently, the relayer submits a block commit as soon as it detects either:
1. A new burn block.
2. A new highest tenure.

However, committing immediately upon seeing a new burn block—before confirming whether a tenure change block follows—is risky. If a tenure change block arrives afterward, the miner’s commit will confirm the wrong tenure, making it impossible to mine a valid Stacks block.

This risk can sometimes be rewarded:
• The miner’s commit might be the only one in a flash block, making it more likely to win, though the ATC-C rules reduce this probability
• If the previous miner failed to produce a tenure change block before the next Bitcoin block, the commit could still be valid.
• Even if a tenure change block is mined, the commit could remain valid due to the bad timing reorg allowance.

However, in the common case, the miner must quickly replace-by-fee (RBF) the early commit with a new one referencing the correct tenure. If this RBF fails, the miner’s PoX payments are wasted.

Proposed Change

Modify the default behavior to be more patient by waiting a configurable delay (e.g., ~30s) after detecting a new burn block before submitting a block commit. This delay allows time for a tenure change block to arrive, reducing the chance of committing to the wrong tenure.

With a well-functioning network, if no tenure change block is seen within ~30s, it’s unlikely to be mined at all, so submitting the block commit at that point should be safe.

@github-project-automation github-project-automation bot moved this to Status: 🆕 New in Stacks Core Eng Feb 10, 2025
@aldur aldur added this to the 3.1.0.0.6 milestone Feb 11, 2025
@aldur aldur moved this from Status: 🆕 New to Status: 📋 Backlog in Stacks Core Eng Feb 11, 2025
@aldur aldur assigned kantai and unassigned obycode Feb 11, 2025
@kantai kantai moved this from Status: 📋 Backlog to Status: 💻 In Progress in Stacks Core Eng Feb 12, 2025
@aldur aldur assigned obycode and unassigned kantai Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Status: 💻 In Progress
Development

No branches or pull requests

3 participants