Skip to content

Fail sidechain proposals that can no longer reach the activation threshold#372

Open
1440000bytes wants to merge 2 commits into
LayerTwo-Labs:masterfrom
1440000bytes:fix/proposal-max-fails-early-failure
Open

Fail sidechain proposals that can no longer reach the activation threshold#372
1440000bytes wants to merge 2 commits into
LayerTwo-Labs:masterfrom
1440000bytes:fix/proposal-max-fails-early-failure

Conversation

@1440000bytes
Copy link
Copy Markdown
Contributor

@1440000bytes 1440000bytes commented Jun 4, 2026

BIP300 lists four conditions under which a sidechain proposal fails. The code only implemented the two max-age cutoffs; it omitted the two MAX_FAILS early-failure conditions.

// FIXME: Do we need to check that the vote_count is below the threshold, or is it
// enough to check that the max age was exceeded?

A proposal should fail as soon as it has accumulated enough non-ack blocks that it can no longer reach the activation threshold in its remaining window (max_fails = max_age - threshold; 201 for unused, 13150 for used). Otherwise a doomed proposal lingers until its max age and because handle_m1 ignores a re-proposal of any still-existing proposal, two enforcers can diverge on whether a sidechain activates during that window.

Fix

Fail a proposal when age > max_fails && (age - vote_count) >= max_fails, derived from the existing thresholds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants