remote-store: real Swarm backend via a Bee node#477
Open
mfw78 wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements the
nexum:host/remote-storeinterface against a real Swarm backend: aRemoteStorehandle (crates/nexum-runtime/src/host/remote_store_bee.rs) wrapping abee-rsHTTP client, wired throughComponentsBuilder/Components/HostStatealongside the existing chain/store/logs seams.upload/downloadhit Bee's/bytesAPI;read-feed/write-feedhit 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, optionalpostage_batch, optionalfeed_key) drives it; absent config or an absent batch/key degrades individual operations tounsupportedrather than failing boot.RemoteStoreErrorprojects ontoFaultby HTTP status (429 to rate-limited, 402/403 to denied, timeout to timeout, 404/malformed to not-found/internal).Why
All four
remote-storefunctions were stubs returningUnsupported. Content-addressed module and adapter distribution (doc 03) and the M4 infrastructure remit need a real Bee-backed implementation.Testing
cargo test -p nexum-runtimecovers the newremote_store_beeunit 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 newremotecomponent slot.AI Assistance
Implemented with Claude Code assistance; reviewed by a human before merge.
Closes #151