Skip to content

fix(monitor): show all staked operators in Nodes tab via multicall + test#80

Merged
psofiterol merged 1 commit into
mainfrom
fix/monitor-nodes
Jun 24, 2026
Merged

fix(monitor): show all staked operators in Nodes tab via multicall + test#80
psofiterol merged 1 commit into
mainfrom
fix/monitor-nodes

Conversation

@psofiterol

@psofiterol psofiterol commented Jun 24, 2026

Copy link
Copy Markdown
Member

The Nodes tab only listed a subset of staked operators (e.g. 23 of 41) because get_operators_with_stake() fired one eth_call per operator concurrently via join_all. The public RPC rate-limited a portion of those calls, and the failures were silently swallowed by .ok() — a throttled stakeOf was indistinguishable from zero stake, so those operators were dropped from the list with no error and a nondeterministic count.

Fetch all stakes in a single Multicall3 eth_call instead: one round-trip with no concurrency to rate-limit, and aggregate3() surfaces an individual call failure as Err rather than treating it as zero. Multicall3 is deployed on both Nillion mainnet and testnet.

Change is in the shared blacklight-contract-clients crate, but all callers are in monitor, so only the monitor is affected.

Adds an ignored integration test asserting active-operator count matches the staked count against a live RPC.

…test

The Nodes tab only listed a subset of staked operators (e.g. 23 of 41)
because get_operators_with_stake() fired one eth_call per operator
concurrently via join_all. The public RPC rate-limited a portion of those
calls, and the failures were silently swallowed by .ok() — a throttled
stakeOf was indistinguishable from zero stake, so those operators were
dropped from the list with no error and a nondeterministic count.

Fetch all stakes in a single Multicall3 eth_call instead: one round-trip
with no concurrency to rate-limit, and aggregate3() surfaces an individual
call failure as Err rather than treating it as zero. Multicall3 is deployed
on both Nillion mainnet and testnet.

Change is in the shared blacklight-contract-clients crate, but all callers
are in monitor, so only the monitor is affected.

Adds an ignored integration test asserting active-operator count matches
the staked count against a live RPC.
@psofiterol psofiterol requested a review from jcabrero June 24, 2026 10:20
@psofiterol psofiterol merged commit 9e219f1 into main Jun 24, 2026
1 check passed
@psofiterol psofiterol deleted the fix/monitor-nodes branch June 24, 2026 12:15
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