Skip to main content

Module mesh_swarm_state

Module mesh_swarm_state 

Source
Expand description

Per-node swarm state held by crate::mesh_artifact::ArtifactExchange (ADR-099 section 6, card mesh-placement-25): bandwidth caps, banned peers, measured link speeds, the revocation list, the seeding record and the cache hook.

Structs§

GrantInfo
What allows one content hash to be seeded: the verified package that lists it and that package’s signers.
ManifestPolicy
The default: every package that lists the hash must have been signed redistributable = true and have no Cognitum provenance (OptIn); any other grant vetoes the hash for every package, for every audience.
ServePeer
An authenticated (or not) peer asking to be served.

Enums§

Audience
Who a redistribution decision is for.
GrantOrigin
Where a package’s licence stands, from its signed manifest.

Traits§

RedistributionPolicy
Decides whether the grants for a content hash allow handing it to an audience. The one policy point: seeding, advertisement and serving all go through crate::mesh_artifact::ArtifactExchange’s grant check, which asks this. It is fixed when the exchange is built (crate::mesh_artifact_types::ExchangeConfig::redistribution); there is no way to swap it afterwards.