Expand description
Core check engine for bee-check.
The CLI in main.rs and (in future) the bee-check-web SPA both
consume the same Report shape produced here. See SPEC.md for
the JSON shape.
Structs§
- Chunk
Probe - Chunk
Vantage - Gateway
Result - HEAD-probe of a public Swarm gateway. The gateway resolves the reference end-to-end through forwarding Kademlia; a 2xx means “anyone could retrieve this through this gateway right now”, independent of any specific Bee node the user controls.
- Report
- Reseed
Request - Stamp
Status - Result of the
--reseed --stamp <id>pre-flight check. Mirrors ipfs-check’s “stale records” hint in spirit: surface upstream-data problems before doing the operation. - Vantage
Result
Enums§
- Output
Format - Parsed
Input - Output of
parse_input. - Resolution
- Records the input → reference resolution when the user supplied a mutable handle (currently: Swarm feeds). Added in 0.3.
- Status
- Outcome enum reported per vantage and aggregated for the whole check.
Constants§
- DEFAULT_
GATEWAY - Default public gateway used when no
--gatewayflag is supplied.api.gateway.ethswarm.orgis the Foundation-operated forwarding gateway that returns proper 404s for unknown references (unlikegateway.ethswarm.org, which currently fronts a static page that 200s everything).
Functions§
- check_
gateways - Probe public Swarm gateways via
HEAD {gateway}/bzz/{ref}in parallel. Mirrors the BYO-Bee philosophy: gateway results complement (don’t replace) the vantage probes and aggregate into the same top-levelstatus. - check_
multi_ vantage - Probe
/stewardship/{ref}across all vantages in parallel. Alongside the retrievability call, fetches/addresses(overlay) and/health(Bee version) so the rendered report can surface which neighborhood the probe came from. These ancillary calls are best-effort: failure leavesoverlay/bee_versionunset rather than failing the whole vantage. - check_
stamp - Pre-flight check before
--reseed: look upGET /stamps/{id}on the target Bee and surface usable/expiry concerns. Mirrors the spirit of ipfs-check’s “stale records” UX hint — flag freshness problems before doing the operation. - drill_
down - Walk the manifest at
report.reference, probe each leaf chunk viaGET /chunks/{addr}from every vantage, and attach the result to the report. When the per-vantage overlay is known (already fetched incheck_multi_vantage), eachChunkVantagealso carries the proximity between that vantage and the chunk. - merge_
gateways - Append gateway results to an existing report and re-aggregate the top-level status. Splits the gateway probe from the main check so the SPA can show partial progress.
- parse_
input - Parse a positional input. Accepts either:
- render_
report - render_
stamp_ status - Human-readable summary of a stamp pre-flight check, suitable for
stderr before a
--reseedoperation. - reseed
- resolve_
feed - Resolve a
feed:OWNER:TOPICinput to its current chunk reference.bee_urlis the first Bee vantage; the feed lookup goes through it. Returns the resolved reference and aResolutionrecord describing what was done.