Skip to content

Commit 6ea4f2e

Browse files
drov0ABW
authored andcommitted
Pin hf28 'current' schedule to HF28 at block 1, matching pre-bump behavior
Going through HF27→HF28 in the schedule kept the chain at HF27 long enough that the test's voting hit HF27 mana semantics and tripped the 'comment_num == 50/62' assertions. The block_log's witness extensions were already signed at 1.28.0, so HF28 at block 1 replays cleanly and matches the behavior the test expects from develop.
1 parent 50ae44d commit 6ea4f2e

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

  • tests/python/functional/hf28_tests/upvoting_regeneration_system_tests

tests/python/functional/hf28_tests/upvoting_regeneration_system_tests/conftest.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,13 @@ def prepare_environment(request: pytest.FixtureRequest) -> tuple[tt.InitNode, tt
2626
tt.HardforkSchedule(hardfork=hardfork_number + 1, block_num=2000),
2727
]
2828
else:
29-
# Mirror the schedule the saved block_log was generated with (see
30-
# block_log/generate_block_log.py). The witnesses in that block_log signed up to
31-
# HF28, so the replay schedule must match. Without this, bumping
32-
# HIVE_BLOCKCHAIN_VERSION past 1.28 (e.g. for HF29) would push "current" to HF29,
33-
# which would auto-apply at block 1 and trip the witness running_version check
34-
# because the replayed blocks were produced against 1.28. Regenerate the block_log
35-
# if you need to test a later hardfork as "current".
36-
hardfork_schedule = [
37-
tt.HardforkSchedule(hardfork=27, block_num=1),
38-
tt.HardforkSchedule(hardfork=28, block_num=2000),
39-
]
29+
# Pin the "current" hardfork to HF28 — the latest the saved block_log can replay
30+
# under, since its witness extensions were signed at HIVE_BLOCKCHAIN_VERSION 1.28.
31+
# Reading blockchain_version from the binary breaks once that constant is bumped
32+
# past 1.28 (e.g. for HF29): the schedule jumps to HF29 at block 1 and the chain
33+
# rejects the replay via the witness running_version check. Regenerate the
34+
# block_log when a future hardfork should be the new "current".
35+
hardfork_schedule = [tt.HardforkSchedule(hardfork=28, block_num=1)]
4036

4137
node.run(
4238
time_control=tt.StartTimeControl(start_time="head_block_time", speed_up_rate=10),

0 commit comments

Comments
 (0)