feat: add cooldown to recovery agent update#361
Conversation
|
open question: when recovering an account, should pending recovery agent updates be cleared? |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0685143c2d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27a6220daa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
Co-authored-by: 0xOsiris <djosiris@proton.me>
Co-authored-by: 0xOsiris <djosiris@proton.me>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Changes
Note
High Risk
Touches account recovery and signer-authorization flows (EIP-712 messages, nonces, and state transitions) and changes the public registry interface, so mistakes could weaken recovery security or break client integrations.
Overview
Adds a two-step, cooldown-gated recovery agent rotation to
WorldIDRegistry: authenticators nowinitiateRecoveryAgentUpdate(EIP-712 signed), wait out a configurable cooldown, then anyone canexecuteRecoveryAgentUpdate, or authenticators cancancelRecoveryAgentUpdate.Renames the external API from recovery address to recovery agent, introduces tracking for pending updates (with new errors/events and
getPendingRecoveryAgentUpdate/getRecoveryAgentUpdateCooldowngetters), clears pending updates on account recovery, and updates the Rust ABI + expands/adjusts Solidity tests to cover the new flow (including overwrite/cancel/zero-cooldown cases).Written by Cursor Bugbot for commit 91cc7c1. This will update automatically on new commits. Configure here.