feat: NMv3: unmetered ephemeral client sessions - #7078
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
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 Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
90f2d7d to
6f5b33e
Compare
Lets an authorised network monitor agent open a gateway client session without holding ecash ticketbooks, which is what makes v3 gateway liveness testing possible. A session whose registration handshake authenticates an ed25519 identity announced on-chain for an authorised agent is unmetered and persists nothing: no shared-key row, no bandwidth entry, no inbox push.
Changes
nym-authorised-network-monitors- holdsAuthorisedMonitorIdentities, the identity-keyed set derived from the contract's authorised-agent set. Shared because its reader (the gateway) sits outside the node that folds the set; the two IP-keyed structures stay where their readers are.AuthorisedAgentsView, the sole writer to all three derived structures, instead of two hand-maintained copies of that logic. Key parsing moved to the boundary (AuthorisedAgent::parse_announced).BandwidthStorageManagergains aPersisted/Ephemeraldiscriminator. An ephemeral manager holds neither a storage handle nor a client id, so "no reads or writes" is structural rather than a discipline; it seeds a synthetic allowance that cannot expire. Spending a credential against one is a newError::UnmeteredSession.ClientDetails.idis nowOption<i64>(absent = never registered);grants_ephemeral_sessionisolates the policy;finalise_registrationpicks the session shape after the handshake and skipsregister_cliententirely for a monitor.Notes for reviewers
1.2.3.4vs::ffff:1.2.3.4) used to collapse onto one canonical noise-map key at startup, silently dropping one.This change is