feat(infra)(#321): proxy serves trust-base + faucet surfaces verified nametag#326
Open
vrogojin wants to merge 1 commit into
Open
feat(infra)(#321): proxy serves trust-base + faucet surfaces verified nametag#326vrogojin wants to merge 1 commit into
vrogojin wants to merge 1 commit into
Conversation
… surfaces nametag Two related changes that close the loop for self-hosted nametag minting: 1) aggregator-proxy serves the trust base. The compose file bind- mounts ./data/genesis:/etc/aggregator-config:ro into agg-proxy and the nginx config exposes https://<aggregator-domain>/.well-known/trust-base.json as a public alias. Wallets pointed at our aggregator can now download the matching trust base over HTTPS — required for the SDK's verification path to come up without skipVerification=true. The /health location also picks up the pass-through fix from PR #323 so the rich backend response (role, database, sharding) is visible externally — necessary to land both changes against integration/all-fixes together. 2) render-discovery.sh surfaces the nametag. The discovery doc at https://<faucet-domain>/.well-known/faucet.json was showing nametag: null even after a successful mint. The watcher now tails for the nametag_verified log line (emitted by js-faucet AFTER mint+resolve completes) and rewrites identity.json with the verified nametag. The registering_nametag line is NOT used as a signal because it fires BEFORE the mint commits and would surface unverified state. Verified live end-to-end on this host: - faucet logs: aggregator_override_active, nametag_verified - mongo: commitments=1, aggregator_records=1 - relay: NAMETAG_BINDING (kind 30078) event for xaleava landed - discovery: identity.nametag="xaleava" The companion js-faucet PR #3 (env override wiring) and sphere-sdk PR #324 (relay + run-faucet env passthrough) are both still required for the end-to-end flow.
6 tasks
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.
Summary
Closes the loop on self-hosted nametag minting (xaleava-style use case from #321). With the changes in PRs #323 + #324 + js-faucet #3, the faucet can boot against our aggregator but the nametag mint silently failed because:
oracle.getTrustBase()during mintUnicityAggregatorProvider.getTrustBase()returnsnullunless the trust base was loaded atinitialize()!skipVerification && trustBaseLoader— so a wallet that wants to use a self-hosted aggregator HAS to also supply a matching trust-base URLThis PR makes that possible by serving our trust-base from the aggregator proxy itself.
Two changes
1. aggregator-proxy serves
/.well-known/trust-base.jsondocker-compose.ymlbind-mounts./data/genesis:/etc/aggregator-config:rointo agg-proxy.nginx.conf.templateadds a location that aliases the trust-base.json file from that mount. Wallets pointed at this aggregator can now download the matching trust base over HTTPS./healthalso picks up the pass-through fix from #323 (which has to land in the same commit to avoid a textual conflict).2. render-discovery.sh surfaces the verified nametag
The discovery doc was showing
nametag: nulleven after a successful mint. The watcher now tails for thenametag_verifiedlog line (emitted by js-faucet AFTER mint+resolve completes) and rewrites identity.json with the verified nametag.registering_nametagis NOT used as a signal because it fires BEFORE the mint commits — it would surface unverified state.Verified live
NAMETAG_BINDING (kind 30078) event for xaleava verified on our relay.
Companion PRs
Test plan
./run-aggregator.sh --freshmints new genesis; proxy serves the new trust-base on next reloadcurl https://<agg>/.well-known/trust-base.jsonreturns the correct networkId + rootNodeIdSPHERE_TRUSTBASE_URLpointing at that URL andSPHERE_AGGREGATOR_SKIP_VERIFICATION=false, faucet completes nametag mint (1 commitment lands in mongo)nametag: "xaleava"post-mint