The fixes from the review above are live.
- Registry v2 on Robinhood Chain (4663):
0xCa3bAE26d29a3A2cED7B87Fa996ca4C44367448d. Source verified, no owner, no upgrade path, holds no funds. ERC-1650x7e0f19f9. Robinhood Chain address details for 0xCa3bAE26d29a3A2cED7B87Fa996ca4C44367448d | Blockscout - The draft is updated in PR #2196: Add ERC: Policy-Enforced Agent Accounts by palisec-dev · Pull Request #2196 · ethereum/ERCs · GitHub
- The client library
policy-enforced-accounts0.2.0 is on npm.
- Publisher changes wait. Every policy the publisher posts goes through
setPendingat least the account’sminDelayahead, and decides from itseffectiveAt. Only the account itself can activate at once. On urgent tightenings, we accepted that the registry shows them only afterminDelay. The enforcer still applies a tightening off chain at once, since stricter is always safe. Until the registry catches up, its receipts carry the newer version, which a use-time verifier refuses, so the gap fails closed. - Confirming early now reverts (
NotDue), and every removal of a pending entry emitsPolicyCancelled. While testing, we found a related case: in v1, a pending change that was due but not yet confirmed was lost when a newer one was posted. v2 makes the due change active first. - Use-time rules are in the spec. A verifier acting on an ALLOW must check that the receipt’s policy hash and version are the current ones, that the account is not stopped, and that its
decisionIdis used once, claimed in one atomic step.verifyReceipt(…, { use: true, seen })does all three. - The
Intentincludesuint8 operation: 0 for a call, 1 for a delegatecall, or the call type byte of the ERC-7579 execution mode. The EIP-712 domain version is now “2”, and the vectors include the same call as both.
- Scope of a commitment. Security Considerations has a new section on it. It says a commitment covers only actions that need the policy signer, and lists what to check separately for Safe, ERC-7579 and EIP-7702 accounts: allowances and permits, operator approvals, modules and executors, guards and hooks, fallback handlers, and the delegation target.
- Signer changes wait too. After the first declaration, a new signer set applies
minDelaylater, including a lowerminDelay. It is announced withSignersPending, and the account can cancel it. Clearing to all zeros applies at once, since it only withdraws the claim of enforcement. The account can now engage the emergency stop itself, which is the fast answer to a leaked publisher or receipt key while the rotation waits. signerTypeis inSigners: 1 co-signer in the signature path, 2 validator module, 3 guard or hook, 4 other.
On #8 and #9, which came in while this was being built:
- @Secrypta: agreed, the surface snapshot goes in a companion ERC, not this one. When we draft it, every snapshot will carry the block it was observed at, will be labelled point-in-time and advisory, and the spec will list what invalidates it. Thanks for the offer to review.
- @Zealynx, the account’s way out of a leaked publisher key. In v2 the account itself can call
cancelPending,setStopped(true)andactivate, so a loosening queued before a rotation can be cancelled by the account while the rotation waits. One gap you point out remains in v2: the publisher can lift a stop the account engaged. The account can still cancel each pending change itself, and anything the publisher posts waitsminDelay, but the stop should hold. We’d make a stop engaged by the account liftable only by the account in the next revision. On urgent tightenings, your “stop now, then the tighter version with the normal delay” is the same order an enforcer can follow with v2. The scoped stop (per target or selector, stored in the clear) is a good idea for later.
The first registry, 0x20D6…7e92, is unchanged and readable. Its receipts can still be audited (domain version “1”), but under the updated spec they are never acted on as a gate, because their intent does not bind the operation. Both of our demo accounts moved to v2 through ordinary co-signed transactions:
- the mandate demo
0x9aEC…170c: Robinhood Chain transaction 0x9f22efd4f0715f0daf3d0cc0f14d40a13b513b61f7150c8a9d3ba507d2d5f908 | Blockscout - the loss-limits demo
0x6677…FD77: Robinhood Chain transaction 0x0dbaa6fc547be21ab7661c0e221d5fdbc93bf0a70fa7a0afed127c9bae564cb6 | Blockscout
Thanks again to you both.