feat: add host-owned IPNS deployments - #664
Merged
Merged
Conversation
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.
Architecture
Wetware now owns IPNS semantics and identity:
Kubo is transport and routing only. Kubo does not hold the Wetware private key.
IPNS uses the existing deployment pipeline:
The change does not add a parallel deployment pipeline.
Identity
~/.ww/identityis both the Wetware host/network identity and the default IPNS publication identity."ww"signing key for Wetware-owned publication."ww"keys remain untouched.Following
IPNS Stem following uses signed raw records and a durable rollback watermark.
Epoch.Epoch.deployment::Epoch.seqremains host-local and never derives from the IPNS sequence.Runtime EOL
The signed record EOL is an authority deadline.
stem::ipns::Sourceraces routing retrieval and retry against the EOL deadline. Network backoff cannot extend authority past signed validity.Durable watermark
Follower state stores the raw signed IPNS record under private host state:
Publisher state uses the corresponding private path:
Writes use restrictive permissions, atomic replacement, and durable synchronization. Wetware persists the accepted raw record before Source emission and before publication PUT. The ordering floor survives record expiry.
The trusted-state threat model assumes one process per private state directory. The implementation does not defend against malicious local filesystem rollback.
Publication
Wetware signs records locally with
~/.ww/identityand publishes them with:The publisher preserves sequence continuity across restart and failure:
The last behavior is deliberate. A newer record signed by the same key but selecting another value can indicate another writer, stale local configuration, or key compromise. Wetware fails clearly instead of silently reasserting local state.
Republisher
Wetware owns the republisher lifecycle because Kubo does not hold the host private key. The current policy mirrors practical Kubo behavior:
Same-value republishing retains the sequence and extends EOL.
Routing V1 / Kubo
Raw record transport uses:
The media type is
application/vnd.ipfs.ipns-record.Kubo 0.33 requires:
ipfs config --json Gateway.ExposeRoutingAPI trueKubo must restart after the configuration change. Routing V1 runs on the Gateway listener, normally
http://localhost:8080, not the administrative RPC listener on port 5001.The client handles Kubo 0.33-style 404 missing-record responses and newer successful
text/plainno-record responses. Other unexpected successful media types remain malformed.Interoperability
Live Rust/Wetware to Kubo verification covered these properties:
Live Kubo/Boxo to Rust verification covered these record forms:
rust-ipns dependency
Wetware temporarily pins commit
02c5ae7bf3f9568c7dbbb1308ae9299cfc7ba2d9fromhttps://github.com/wetware/rust-ipfs.The reviewed change is pending in dariusc93/rust-ipfs#503. The pin must be replaced by an upstream release that contains the reviewed V2-only fix when such a release becomes available.
Migration
ww perform installcreates only the host identity and reports the derived default IPNS name."ww"signing key.ww perform updateconfigures the host-derived name and Routing V1 endpoint."ww"keys are ignored but not deleted.Deferred work
This PR does not include:
Routing.publish;capnp/stem.capnpcleanup;Validation
The changelog includes the Phase 3-IPNS behavior and migration requirements.
The following commands passed:
Additional verification passed: