Summary
swarm-cli utility rchash currently prints only the sampling duration:
Reserve sampling duration: 180 seconds
That number is not interpretable on its own. Sampling cost scales with how many chunks are in radius, and reserve occupancy is a property of the network at that moment — not something the operator chooses. The same node can produce very different durations at different times, so a comfortable result today does not mean the node can still play when the reserve fills.
Proposal
Report the reserve size the measurement was taken at, extrapolate to a practical upper bound, and state the margin against the sampling window.
Reserve sampling duration: 180 seconds
Reserve size within radius: 2,000,000 chunks
Estimated at 4M chunks: ~360 seconds
Sampling window: ~585 seconds (114 blocks x 5s)
Verdict: OK - est. 62% of the available window
GET /status already returns reserveSizeWithinRadius, and rchash.ts already calls this.bee.getStatus() to obtain committedDepth, so the input needed is one field away.
Where the numbers come from
Sampling is linear in chunk count — pkg/storer/sample.go iterates every chunk in radius via IterateChunksItems — so a linear extrapolation to the upper bound is a reasonable first approximation.
The window is not the commit phase. Sampling is triggered at the start of the claim phase of round N (phaseEvents.On(claim, …) publishes sample), the result is committed in round N+1 (SampleData(round - 1)), and the agent tolerates the sample overrunning into that commit phase. It is cancelled at the start of round N+1's reveal. That gives 76 + 38 = 114 blocks, roughly 9.7 minutes at current Gnosis block times.
A rough upper bound of 4M chunks in radius reflects observed practice; if there is a better figure it should be used instead, or the bound made configurable via a flag.
Why it matters
This is the tool operators are pointed at before staking. A bare duration invites them to stake on an optimistic measurement and later fail to reveal, which freezes stake. Related: ethersphere/bee#4849 and ethersphere/bee-docs#835.
Worth noting the window shrinks proportionally if Gnosis block time changes — under the 2-second blocks proposed in GIP-153 it would fall to roughly 3.8 minutes, which would turn today's comfortable results into failures. A tool that reports margin rather than a raw number would surface that automatically.
Description generated with help of AI.
Summary
swarm-cli utility rchashcurrently prints only the sampling duration:That number is not interpretable on its own. Sampling cost scales with how many chunks are in radius, and reserve occupancy is a property of the network at that moment — not something the operator chooses. The same node can produce very different durations at different times, so a comfortable result today does not mean the node can still play when the reserve fills.
Proposal
Report the reserve size the measurement was taken at, extrapolate to a practical upper bound, and state the margin against the sampling window.
GET /statusalready returnsreserveSizeWithinRadius, andrchash.tsalready callsthis.bee.getStatus()to obtaincommittedDepth, so the input needed is one field away.Where the numbers come from
Sampling is linear in chunk count —
pkg/storer/sample.goiterates every chunk in radius viaIterateChunksItems— so a linear extrapolation to the upper bound is a reasonable first approximation.The window is not the commit phase. Sampling is triggered at the start of the claim phase of round N (
phaseEvents.On(claim, …)publishessample), the result is committed in round N+1 (SampleData(round - 1)), and the agent tolerates the sample overrunning into that commit phase. It is cancelled at the start of round N+1's reveal. That gives 76 + 38 = 114 blocks, roughly 9.7 minutes at current Gnosis block times.A rough upper bound of 4M chunks in radius reflects observed practice; if there is a better figure it should be used instead, or the bound made configurable via a flag.
Why it matters
This is the tool operators are pointed at before staking. A bare duration invites them to stake on an optimistic measurement and later fail to reveal, which freezes stake. Related: ethersphere/bee#4849 and ethersphere/bee-docs#835.
Worth noting the window shrinks proportionally if Gnosis block time changes — under the 2-second blocks proposed in GIP-153 it would fall to roughly 3.8 minutes, which would turn today's comfortable results into failures. A tool that reports margin rather than a raw number would surface that automatically.
Description generated with help of AI.