Defer attested tier to beacon-relay (trust-relay stays wallet-only)#12
Merged
Conversation
Coverage reportThresholds: 80% line · 78% region (condition) ✅ Coverage meets the required threshold. Summary |
Reverses the M3a attestation-result upgrade path. trust-relay no longer verifies beacon-relay attestation results or mints attested-tier tokens, and no longer emits tier/att (reserved for a future additive reintroduction; absence of tier means wallet tier). beacon-relay owns attested-session state and resolves tier from its own Redis via the wallet-tier token sub plus the device-key proof it already requires. Records the decision in ADR 0004 and marks the affected parts of ADR 0002 as superseded. Updates TOKEN-SPEC (reserved claims, RS checklist, attestation section), ARCHITECTURE (single-SIWE onboarding flow, no tier in token), and the docs index. The wallet-tier session prerequisite for attestation is retained as beacon-relay's admission control (binds attested session to token sub).
db44aac to
227f1b9
Compare
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
Reverses the M3a plan of having trust-relay verify beacon-relay attestation results and mint attested-tier tokens. After review, beacon-relay is the only consumer of the session tier today (downstream sinks/rewards oracle read beacon-produced event metadata, not the token; trust-relay's own logic does not use tier). So this PR keeps trust-relay wallet-only and defers attestation/tier ownership entirely to beacon-relay.
This is a docs/decision-only change: the branch is reset to the pre-M3a base, so no attestation code lands in trust-relay.
What changes
tier/attclaimssub+ device-key proof)reqwestdependencyDesign decisions (answers to the open questions)
/v2/attest/*and binds the attested session to the tokensub(wallet_address == sub). Proves wallet control at attestation time, protects the paymaster, adds no round-trip (onboarding is one SIWE).401+WWW-Authenticate: Bearer error="insufficient_user_authentication", acr_values, max_age.tier/attare reserved for a future additive reintroduction if an independent consumer ever needs cross-service tier visibility.Docs
docs/adr/0004-defer-attested-claims-to-beacon-relay.md;docs/adr/0002marked superseded in part (§2 sole-issuer and identity-revocation rows remain).TOKEN-SPEC.md,ARCHITECTURE.md,docs/README.mdupdated to the wallet-only / beacon-owned-tier model.Follow-up
Test plan
cargo fmt --check,cargo build,cargo clippy -- -D warningsclean (code identical to merged base).