GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(id): currency.rate_authorisation + revoke types and fold (#3800) by dezren39 · Pull Request #3888 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 minutes. View limit details
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: e955216d9d
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .filter(|(_, body)| body.authorisation_id == authorisation_id) | ||
| .filter(|(author, body)| body.validate(author).is_ok()) | ||
| .max_by_key(|(_, body)| body.version)?; | ||
| let issuer = live.1.issuer_id; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Bind version selection to the expected issuer
When objects from multiple signers are folded, another signer can reuse an existing authorisation_id, set issuer_id to their own key, and publish a higher version. This passes validate and replaces the original LP's authorisation; the subsequent revoke filter also switches to the new signer, so even a revoked authorisation becomes Live. Matching the body issuer to its own event author does not establish ownership of the existing ID. Require an expected issuer (or an issuer-scoped authorisation key) and filter by it before selecting the highest version.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in ea1f298 (queue task 5789, lane E): fold_authorisation now takes an expected_issuer and filters version selection to objects whose event author is that issuer before choosing the highest version — a foreign signer reusing the authorisation_id can no longer displace the original issuer's authorisation, and revokes are likewise bound to the expected issuer. Regression test: foreign_signer_cannot_hijack_authorisation_id. Currency tests 9/9 pass on laptop.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| .filter(|(author, _)| *author == issuer) | ||
| .filter(|(_, body)| body.authorisation_id == authorisation_id) | ||
| .filter(|(_, body)| body.revoked_version_from <= live.1.version) | ||
| .min_by_key(|(_, body)| body.revoked_version_from); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Preserve the earliest effective covering revocation
When multiple issuer-signed revokes cover the selected version, choosing the smallest revoked_version_from can discard an earlier effective revocation. For example, for version 2, a revoke from version 2 effective at time 100 and another from version 1 effective at time 200 produce a folded effective_at of 200, although version 2 was already revoked at 100. Consumers using the returned timestamp cannot enforce the correct cutoff because the earlier revoke has been discarded. Select the earliest effective covering revoke, with a deterministic tie-breaker.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Fixed in ea1f298 (queue task 5789, lane E): covering-revoke selection now picks the earliest effective_at (deterministic tie-break: smallest revoked_version_from) instead of the smallest revoked_version_from, so an earlier effective revocation is never discarded. Regression test: earliest_effective_covering_revoke_wins (from=2 @ t=100 vs from=1 @ t=200 folds effective_at=100). Currency tests 9/9 pass on laptop.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…voke (#3800) Codex findings on PR #3888: (P1) fold_authorisation now takes expected_issuer and filters version selection to that issuer before choosing the highest version, so a foreign signer reusing an authorisation_id cannot hijack the fold; (P2) covering revoke selection picks the earliest effective_at (tie-break smallest revoked_version_from) instead of the smallest revoked_version_from. Adds regression tests for both; currency tests 9/9 on laptop.
…authorisation # Conflicts: # pkgs/id/src/lib.rs
Main added ChainExt.note: currency.rs sign helpers now set note: None, and the merge had silently dropped note: None from an idset.rs test literal (restored; file matches main again).
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
id(currency): RateAuthorisation + revoke schema types and fold in pkgs/id (Phase 1 of #2290)
There was an error while loading. Please reload this page.