Skip to main content

Module webtorrent_seeder

Module webtorrent_seeder 

Source
Expand description

Qualia-native WebTorrent seeder — HTTP web seeds for Permissive Commons .q42 volumes and legacy .c.q42 ontology artifacts.

This is Commons ICN transport, not a dump of every Q42 file. Unified .q42 volumes are classified before they enter the registry: Sanctuary, medical, bilateral, mixed, and unmarked personal volumes are refused. They travel on SocialWebNet (pairwise DID / WireGuard) or stay local.

Browser WebTorrent clients leech via the ws= magnet parameter pointing at /torrent/webseed/{info_hash}. One file, one SHA-1 info-hash. A Q42 volume set publishes the root plus each child as its own magnet.

Structs§

RegisterSeedRequest
SeedRecord
SeederBandwidthPolicy
SeederTelemetry
UnregisterSeedRequest

Functions§

build_magnet_uri
Builds a magnet:?xt=urn:btih: URI with display name and a ws= webseed pointing at the local daemon.
deprecate_seed
Marks the seed deprecated; true when it existed.
ensure_magnet_webseed
Returns magnet unchanged when it already carries a ws= webseed; otherwise builds one via build_magnet_uri.
get_bandwidth_policy
Current bandwidth policy.
list_active_seeds
All currently active (non-deprecated) seed records.
lookup_seed
SeedRecord for info_hash, or None.
normalize_info_hash
Trims and lowercases a btih info-hash string.
record_bytes_served
Accumulates served bytes for info_hash in telemetry.
record_full_download
Increments the full-download counter for info_hash.
register_seed
Validates the file exists, classifies unified .q42 volumes as Commons/Sanctuary by commons_asserted, and records the seed.
set_bandwidth_policy
Replaces the global seeder bandwidth policy.
sha1_file
Streams path through SHA-1 (8 KiB blocks) and returns lowercase hex.
sync_from_workbench
Reload active seeds from {storage}/Index/workbench.jsonl on daemon boot.
telemetry
Snapshot of global seeder telemetry.
unregister_seed
Removes the seed for info_hash; true when it existed.