Skip to content

remote-store: real Swarm backend via a Bee node#477

Open
mfw78 wants to merge 1 commit into
feat/m5-ghcr-image-alignfrom
feat/m5-swarm-remote-store
Open

remote-store: real Swarm backend via a Bee node#477
mfw78 wants to merge 1 commit into
feat/m5-ghcr-image-alignfrom
feat/m5-swarm-remote-store

Conversation

@mfw78

@mfw78 mfw78 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

What

Implements the nexum:host/remote-store interface against a real Swarm backend: a RemoteStore handle (crates/nexum-runtime/src/host/remote_store_bee.rs) wrapping a bee-rs HTTP client, wired through ComponentsBuilder/Components/HostState alongside the existing chain/store/logs seams. upload/download hit Bee's /bytes API; read-feed/write-feed hit the single-owner feed API, stripping/prepending the canonical timestamp prefix and signing writes with the configured feed key. A new [remote_store] config table (api, optional postage_batch, optional feed_key) drives it; absent config or an absent batch/key degrades individual operations to unsupported rather than failing boot. RemoteStoreError projects onto Fault by HTTP status (429 to rate-limited, 402/403 to denied, timeout to timeout, 404/malformed to not-found/internal).

Why

All four remote-store functions were stubs returning Unsupported. Content-addressed module and adapter distribution (doc 03) and the M4 infrastructure remit need a real Bee-backed implementation.

Testing

cargo test -p nexum-runtime covers the new remote_store_bee unit suite (wiremock-backed: upload/download happy paths and misses, feed read/write incl. missing batch/key, malformed reference, disabled handle, bad config at boot) and the config table's parse + feed-key redaction test; existing supervisor/test_utils fixtures updated for the new remote component slot.

AI Assistance

Implemented with Claude Code assistance; reviewed by a human before merge.

Closes #151

Replace the four unsupported remote-store stubs with a Bee-backed
backend behind the component seam: a shared RemoteStore handle built
from the new [remote_store] engine table (API URL, postage batch,
feed-signing key), threaded through Components and every module store.
Uploads and feed updates are stamped with the configured batch; feed
updates are signed host-side. Faults classify by failure: missing
configuration is unsupported, malformed guest input invalid-input, a
lookup miss unavailable, HTTP 429 rate-limited, 402/403 denied, and a
transport timeout timeout. An absent table leaves every call
unsupported so guests can probe-then-skip.
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