Skip to content

fix(node): look up owned shard filters by address, not by filter - #653

Open
blacks1ne wants to merge 1 commit into
QuilibriumNetwork:v2.1.0.25from
blacks1ne:fix/shard-info-owned-filters
Open

fix(node): look up owned shard filters by address, not by filter#653
blacks1ne wants to merge 1 commit into
QuilibriumNetwork:v2.1.0.25from
blacks1ne:fix/shard-info-owned-filters

Conversation

@blacks1ne

@blacks1ne blacks1ne commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

GetShardInfo with include_all: false returned nothing on a prover holding twenty-seven allocations — prover shards printed "No allocated shards" while prover status listed all twenty-seven.

The registry has two lookups and both take a bare &[u8]: get_provers is keyed by confirmation filter, get_prover_info by address. This site passed the local address to get_provers, which misses the filter cache and returns empty, so the owned set was always empty and every shard was filtered away.

The owned set is now built from get_prover_info, matching GetNodeInfo's liveness predicate so the two surfaces agree allocation for allocation — including ExpiredEpoch, which status shows as re-confirm! and which comes back the moment the prover re-registers.

Verified on a live prover: before the fix prover shards printed "No allocated shards"; after it, twenty-seven, an exact set match against the twenty-seven allocations in prover status with nothing on either side. The include_all: true view is unchanged at ninety-one.

Four unit tests cover it. They need a filter-keyed registry stub: the shared TestProverRegistry::get_provers ignores its filter argument, which is why the existing suite could not distinguish the wrong call from the right one.

Base: 4eaf1f79

`GetShardInfo(include_all: false)` built its owned-filter set with
`ProverRegistry::get_provers(&self_address)`. That lookup is keyed by
confirmation filter — `SharedProverRegistry::get_provers` indexes
`filter_cache` — so an address never matches, the set was always empty,
and every shard was filtered out of the response. `qclient node prover
shards` printed "No allocated shards" on a node whose `node prover
status` listed twenty-seven live allocations.

`GetNodeInfo` already builds the same view from the address-keyed
`get_prover_info`; `owned_filters` is that, extracted. It also takes
`GetNodeInfo`'s liveness predicate, which admits `ExpiredEpoch` — an
Active data-shard allocation that missed this epoch's re-confirm is
recoverable, not gone, and `status` reports it as `re-confirm!`. Using
the stricter `is_live` would have left the two commands disagreeing over
exactly the allocation an operator has to act on.

`ShardDetail.is_allocated` was always false for the same reason. The
TUI was unaffected because it ORs that flag with a set it rebuilds from
`GetNodeInfo`, which is why only the non-TUI command showed the fault.

The test carries its own registry stub:
`quil_engine::test_support::TestProverRegistry::get_provers` ignores its
filter argument and returns every prover, so under that stub the wrong
call and the right one are indistinguishable.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@blacks1ne
blacks1ne force-pushed the fix/shard-info-owned-filters branch from 1e77bd4 to d7403a8 Compare September 9, 2026 12:13
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