Skip to main content

Module warmup

Module warmup 

Source
Expand description

S5 — Warmup screen (docs/PLAN.md § 8.S5).

Surfaces the 25–60 minute cold-start opacity (bee#4746) — the interval where Bee is internally bootstrapping but the operator sees nothing actionable. Renders an elapsed counter plus a checklist of warmup steps driven by:

The component remains useful after warmup completes: every step latches to Done and the elapsed counter freezes, so operators can see a “definition of done” of the bootstrap process even on a healthy node.

Render delegates to the pure Warmup::view_for so the snapshot tests in tests/s5_warmup_view.rs can pin every step’s state without launching a TUI or dealing with wall-clock jitter.

Structs§

Warmup
WarmupStep
One row of the warmup checklist.
WarmupView
Aggregated view fed to renderer and snapshot tests. The elapsed counter is part of the view (as a Duration) but tracked in the component because it depends on the component’s first observation of is_warming_up=true. Tests pass deterministic values.

Enums§

StepState
One step of the bootstrap checklist.

Constants§

DEPTH_STABILITY_WINDOW
Number of consecutive depth observations that must agree for the “kademlia depth stable” step to flip Done. Five ticks at the 1 s cadence ≈ five seconds, long enough to ride out the depth churn during peer bootstrap without dragging a steady node down.
PEER_BOOTSTRAP_TARGET
Heuristic peer-bootstrap target. Bee doesn’t publish a single “we’re done discovering peers” threshold — different versions converge anywhere from 30 to 100. We use 50 as a representative midpoint so the bar reaches Done on a typical mainnet node.
RESERVE_TARGET_CHUNKS
Bee’s reserve size at depth (pkg/storer/storer.go). The reserve fill step uses this as the denominator for the percentage line.