Skip to content

consensus_sim: pin no-contest fee case to before HF16 - #216

Merged
On1x merged 1 commit into
masterfrom
fix/pm-no-contest-test-clock
Oct 31, 2026
Merged

On1x merged 1 commit into
masterfrom
fix/pm-no-contest-test-clock

Conversation

@On1x

@On1x On1x commented Oct 31, 2026

Copy link
Copy Markdown
Member

Master CI went red right after the HF16 activation: run 41149337768, job Testnet config + consensus_sim (1 validators), 1 of 173 cases — pm_no_contest_fee_three_states, 4 assertions.

Cause. The case derived its virtual start from fc::time_point::now(). From 2026-10-31T00:00:00Z on, that start is already past the HF16 activation time, so process_hardforks applied HF15 at block 15 and HF16 at block 16 during setup (visible in the job log). Market 0 — "announced BEFORE the fork" — was therefore announced under the fork and frozen:

assertion expected got
m0.no_contest_fee_frozen false true
m0.no_contest_fee 0 1u
insurance delta 9u 2u (1u + 1u + 0)
no_contest_slashed delta 9u 2u

This is exactly the wall-clock trap pm_lifecycle_start() was pinned for; test_pm_no_contest_fee.cpp was added later and kept now().

Fix. Pin the start two days before CHAIN_HARDFORK_16_TIME — after HF15, before HF16, room for the settle grace window — keeping the existing HF14 clamp. Both bounds are compile-time constants, so the pair stays ordered at any real date.

Note: the original goal this run was the HF16 acceptance gate, and that part is fine — 0 occurrences of No QC for head across 173 cases. This PR only removes the unrelated red.

🤖 Generated with Claude Code

pm_no_contest_fee_three_states derived its virtual start from
fc::time_point::now(). After 2026-10-31T00:00:00Z that start is past the
HF16 activation time, so process_hardforks applied HF15 at block 15 and
HF16 at block 16 during setup: market 0, meant to be announced BEFORE the
fork, was announced under it and came out frozen. Master CI (run
41149337768, 1 of 173) failed with frozen=true, fee=1u and insurance
delta 2u instead of the expected 9u — the same wall-clock trap
pm_lifecycle_start() was pinned for.

Pin the start two days before CHAIN_HARDFORK_16_TIME (after HF15, before
HF16, room for the settle grace), keeping the existing HF14 clamp.
@On1x
On1x merged commit 3209c24 into master Oct 31, 2026
7 checks passed
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.

1 participant