fix(monitor): show all staked operators in Nodes tab via multicall + test#80
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Nodes tab only listed a subset of staked operators (e.g. 23 of 41) because
get_operators_with_stake()fired oneeth_callper operator concurrently viajoin_all. The public RPC rate-limited a portion of those calls, and the failures were silently swallowed by.ok()— a throttledstakeOfwas 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_callinstead: one round-trip with no concurrency to rate-limit, andaggregate3()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-clientscrate, 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.