Skip to content

fix(test): seed shard allocations for the storage-attestation e2e - #617

Open
blacks1ne wants to merge 1 commit into
QuilibriumNetwork:v2.1.0.25from
blacks1ne:blacks1ne/fix-storage-attestation-test-allocation
Open

fix(test): seed shard allocations for the storage-attestation e2e#617
blacks1ne wants to merge 1 commit into
QuilibriumNetwork:v2.1.0.25from
blacks1ne:blacks1ne/fix-storage-attestation-test-allocation

Conversation

@blacks1ne

Copy link
Copy Markdown
Contributor

Base: 2b96656e

worker_active_storage_attestation times out after 90s — the shard never produces a frame.

TestProver::to_prover_info builds a ProverInfo with an empty allocations vector. prove_next_state's effective-Active proposing gate asks

info.allocations.iter().any(|a| a.confirmation_filter == self.filter
    && a.effective_status(anchor_gfn) == EffectiveStatus::Active)

which is vacuously false on an empty vector, so every view nullifies with NoVote.

The gate is behind if anchor_gfn > 0. Every other CW test leaves the global anchor at genesis and skips it; this is the only one that seeds a global frame (StorageHarness::seeded(1000)), which is what makes it live. The committee checks upstream of it still pass because TestProverRegistry::get_active_provers ignores the filter and the allocations entirely — so the fixture admits provers to a committee they hold no allocation on, a shape production cannot build.

The test and to_prover_info both date from 961297ec; the gate arrived later in 324ffb3b. It stayed invisible because the E0063 break (#613) stopped the target compiling at all, and CI does not run on this branch (#616).

Fix: seed each member an Active allocation on the shard filter, confirmed for the anchor's epoch.

On epoch: its doc calls 0 a "genesis/grandfather sentinel", but effective_status has no epoch == 0 case. Genesis appears not to need one — genesis provers are seeded with the empty filter, which returns Active before the epoch comparison is reached — so the comment reads as stale rather than as describing missing code. Not touched here.

cargo nextest run -p quil-engine --test e2e_consensus → 14/14 pass; worker_active_storage_attestation 1.229s, previously a 90s timeout.

Out of scope: the gate itself, and the CW/PoRep attestation follow-up noted in the test's own comment.

`TestProver::to_prover_info` builds a `ProverInfo` with an empty
`allocations` vector. `prove_next_state`'s effective-Active proposing gate
requires an allocation matching the shard filter whose `effective_status` at
the frame's anchor is Active, so the `.any()` is vacuously false and every
view nullifies with NoVote — the shard never produces a frame and the test
times out after 90s.

The gate is guarded by `anchor_gfn > 0`. Every other CW test leaves the
global anchor at genesis and skips it; this is the only one that seeds a
global frame (`StorageHarness::seeded(1000)`), which is what makes the gate
live. The committee checks upstream of it still pass because
`TestProverRegistry::get_active_provers` ignores the filter and the
allocations entirely, so the fixture admits provers to a committee they hold
no allocation on — a shape production cannot build.

Seed each member an Active allocation on the shard filter, confirmed for the
anchor's epoch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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