feat: Directory Attestation Provider#6954
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Summary
Adds the producer side of the verifiable directory: nym-apis now produce and serve signed, quorum-verifiable
DigestSnapshots (the data anAttestedTrustAnchorneeds), plus generic scaffolding for signing/quorum-verifying arbitrary canonical "directory subsets". The producer logic lives in a new signer-agnostic library (nym-directory-attestation) so nym-nodes can later reuse it as a lower trust tier - the tier is purely the client's choice of which signer set it accepts, not a property of the format.What's in it
New shared crate:
common/directory-attestationSigner-agnostic protocol + producer core, deliberately light deps (no client crates), so
nym-validator-clientgains a one-way edge to it and the graph stays a DAG.Directory contract: snapshot cadence
snapshot_intervalstored as a plain on-chainItem(positive, admin-mutable, queryable), not committed into the LtHash digest.nym-directory-client(consumer)usepaths compile unchanged.NymApiAttestationSource<C: NymApiClientExt>- concrete HTTPAttestationSource(per-tier newtype avoids theNymApiClientExt/NymNodeApiClientExtcoherence clash).quorum_subset_digest(K-of-N on the committed hash, distinct-signer counting) +fetch_and_verify_subset(fetch once, recompute, fail closed).AttestedTrustAnchor::verified_directory- reuses the snapshot quorum, fetches bulk data from a source, verifies offline viaverify_directory_offline, and is resilient (skips a source serving bad data for one serving good data; still fail-closed).nym-api producer
DirectoryTrustAnchor(default proven-RPC; never an attested anchor), and signs with the api identity key./v1/directory:snapshot/latest(settle-lagged),snapshot/{height}, paginatedentries/{height}(whole directory), plus subset endpoints (producer-side subset computation deferred - see below).NymApiClientExt(validator-client)Typed methods for the above endpoints (
directory_snapshot_latest/_at,directory_subset_digest/directory_subset, paginatedget_directory_snapshot_data).Notable decisions
Deferred (blocked upstream, noted in the spec)
LightClientAnchorbranch currentlybail!s./subset/*endpoints returnNonefor now).This change is