test-driver: align fork-choice Hive step validation - #1055
Conversation
|
Done: PR #1055 is open for the fork-choice Hive failures. PR: #1055 Validation completed locally:
Full build/test note: this container has Zig 0.15.2 on PATH while zeam now requires Zig 0.16.0. I attempted to fetch Zig 0.16.0 side-by-side under |
|
Testing update with Zig 0.16.0 completed. Toolchain used:
Passed locally:
Full test attempted:
Result:
Useful partial results before the transitive
So the prior Zig-version blocker is fixed: PR #1055 was tested with Zig 0.16.0. The remaining local full-suite blocker is missing |
ch4r10t33r
left a comment
There was a problem hiding this comment.
LGTM.
Production change is a clean overflow guard: std.math.mul(data.slot, INTERVALS_PER_SLOT) catch -> AttestationTooFarInFuture, so a near-u64.max attestation slot is rejected gracefully instead of panicking/wrapping.
The rest is the Hive fork-choice HTTP test driver (not production code): honor tickToSlot=false (stationary clock + saturating future-horizon reject), honor hasProposal on tick steps, and validate aggregated gossip before mutating fork-choice (empty bits, out-of-registry participants, fixture-declared sig/proof failures), storing accepted payloads with .gossip attribution instead of .block_payload. Logic mirrors production's verifyAggregatedAttestation gates and the local spectest runner; indices computed once and freed. Test-harness only, cannot affect the running node.
CI fully green (build + test both platforms, gen-fixtures, provers, docker) — confirms the new driver code compiles and no spectest regression, which the author could not verify locally.
Summary
Fixes the zeam-specific failures from Hive lean-spec-tests-fork-choice run:
https://hive.leanroadmap.org/suite.html?suiteid=1784614222-c06cf50d0d1f10e59de4a259d1c33263.json&suitename=lean-spec-tests-fork-choice&client=zeam_devnet5
The run reported 9 zeam_devnet5 failures:
test_block_future_horizon/test_block_at_clock_horizon_edge_importedtest_block_future_horizon/test_block_beyond_future_horizon_rejectedtest_block_future_horizon/test_block_one_past_horizon_rejectedtest_early_block_arrival/test_block_ahead_of_store_clock_is_importedtest_gossip_aggregated_empty_participants/test_gossip_aggregated_attestation_empty_participants_rejectedtest_gossip_aggregated_registry_and_signature/test_aggregated_attestation_participant_outside_registry_rejectedtest_gossip_aggregated_registry_and_signature/test_aggregated_attestation_proof_verification_failure_rejectedtest_gossip_attestation_validation/test_attestation_slot_near_uint64_max_rejectedtest_tick_acceptance_branches/test_interval_0_acceptance_with_proposal_recomputes_headFix
tickToSlot=false, matching the local spectest runner. This keeps the driver clock stationary for early block arrival fixtures and rejects blocks beyondMAX_FUTURE_SLOT_TOLERANCE.hasProposal/has_proposal, so proposal-bound acceptance at slot boundaries can recompute head..gossipattribution instead of.block_payload.u64.maxslots, returningAttestationTooFarInFutureinstead of letting request handling become HTTP 400.Validation
zig fmt --check pkgs/cli/src/test_driver.zig pkgs/node/src/forkchoice.zigzig build --fetch --summary nonegit diff --checkFull build/test not run in this container: PATH has Zig 0.15.2 while the repo requires Zig 0.16.0. I attempted to fetch Zig 0.16.0 side-by-side under
/tmp, but the download was too slow for this Telegram turn.