Skip to content

Upstream the core library layer: s5_registry, s5_blobs, s5_fs_v2 (+ deps) - #10

Merged
redsolver merged 4 commits into
mainfrom
core-libs
Jul 3, 2026
Merged

redsolver merged 4 commits into
mainfrom
core-libs

Conversation

@redsolver

Copy link
Copy Markdown
Contributor
  • s5_registry: BroadcastingRegistry fans registry writes out to in-process
    subscribers; RegistryServer serves those subscriptions over iroh; RegistryAcl
    gates per-key read/write.
  • s5_blobs: split the blob ALPN into ALPN_PUBLIC (anonymous reads) and
    ALPN_ACL (F02 channel-bound challenge), selected per server via ServerMode;
    BlobAcl gates reads per ALPN.
  • s5_fs_v2: content-defined file chunking (FileChunkingStrategy / FixedChunker),
    snapshot copy (shallow rebuild / deep re-encode), import stats + per-chunk
    cache, and the chunked import/export pipeline.
  • chore(deps): 12 non-breaking workspace bumps to match dev (anyhow, tokio,
    minicbor, blake3, ...). The breaking majors (iroh rc.0->1.0, redb 3->4,
    irpc 0.15->0.17) are deferred to the follow-up node PR, which is written for
    them.

Both ACL traits (registry + blobs) also collapse a redundant Dyn*Acl erasure
trait into a single #[async_trait] trait.

The small touches to s5_node / s5_fuse / ingest are throwaway bridges so the
current node keeps compiling against the new libs; they're replaced wholesale
by the node PR.

redsolver added 4 commits July 3, 2026 03:02
Upstream the s5_registry evolution from the dev workspace.

- BroadcastingRegistry wraps any RegistryApi and fans registry writes out to
  in-process subscribers (subscribe_events -> broadcast::Receiver), so watchers
  and peers see updates without polling.
- RegistryServer serves those subscriptions over iroh (connect_to_peer /
  subscribe), streaming RegistryEvent for a SubscribeRequest key set.
- RegistryAcl (a single async_trait, dyn-compatible) gates which keys a peer
  may read or write.

RegistryServer::new now takes the concrete Arc<BroadcastingRegistry> (it needs
subscribe_events), so the s5_node registry-server wiring wraps its registry in
BroadcastingRegistry::wrap. That one-line bridge is behaviorally neutral for the
current node (it never pushed events; see the TODO at the call site) and is
superseded when the full node lands.

Depends only on s5_core; no workspace-dep or version changes.

Assisted-by: claude-opus-4-8
…BlobAcl

Upstream the s5_blobs evolution from the dev workspace.

- Split the single ALPN into ALPN_PUBLIC (anonymous public reads, no challenge)
  and ALPN_ACL (F02 channel-bound challenge required), selected per BlobsServer
  instance via ServerMode. Client gains connect_with_alpn / connect_with_addr /
  connect_to_peer_public plus the F02 handshake helpers.
- BlobAcl gates reads per ALPN (allow_public_read / allow_acl_read /
  allow_acl_principal); PermitAllBlobAcl is the world-readable default.
- Collapse the BlobAcl + DynBlobAcl two-trait dance into one #[async_trait]
  BlobAcl (dyn-compatible directly), matching s5_registry.

The s5_node blobs wiring registers the server on ALPN_PUBLIC with
ServerMode::Public (the current node serves public reads only); the ACL path
lands with the full node. Test bridges adopt the new connect_with_addr /
ALPN_PUBLIC API.

Assisted-by: claude-opus-4-8
Upstream the s5_fs_v2 evolution from the dev workspace.

- chunking: FileChunkingStrategy + FixedChunker split a file byte stream into
  leaf blobs (Xet CDC default / fixed-size / whole-file). It rides on
  TraversalContext as a file-structure policy, orthogonal to the per-blob
  leaf/node encoding pipelines (see the TODO there).
- copy: snapshot copy (shallow rebuild under dest keys / deep re-encode) — the
  D21 sharing primitive.
- import_stats + ChunkCache: import throughput counters and a per-chunk
  plaintext cache for chunked export.
- pipeline / snapshot / persist: chunked import + export; import_bytes takes a
  SemanticMeta arg.

Consumer bridges (superseded when the full node/fuse/ingest land): ingest,
s5_fuse, and the s5_node tests adopt the new import_bytes arity and the
TraversalContext.chunking field.

Assisted-by: claude-opus-4-8
Match the dev workspace's dependency versions (the non-breaking bumps) and add
the two blobs server-feature deps (dashmap, futures-util). `cargo update`
refreshes the lock to the in-semver latest.

Bumped: anyhow 1.0.102, blake3 1.8.5, bytes 1.12, futures 0.3.32, json-patch
4.2, log 0.4.33, minicbor 2.2.2, thiserror 2.0.18, tokio 1.52.3, tokio-util
0.7.18, tracing 0.1.44, zeroize 1.9.

The breaking majors (iroh rc.0 -> 1.0, redb 3 -> 4, irpc 0.15 -> 0.17) are
deferred to the node-cluster PR, where dev's node is already written for them.

Assisted-by: claude-opus-4-8
@redsolver
redsolver merged commit 1e53eb7 into main Jul 3, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant