Skip to content

Conversation

@KBryan
Copy link
Contributor

@KBryan KBryan commented Oct 7, 2025

Move EIP-8001 to Review

Changes:

  • Update status from Draft to Review
  • Rewrite function semantics to specify observable behaviour rather than implementation details
  • Replace prescriptive storage requirements with interface-based outcomes
  • Focus on validation conditions and state transitions per review feedback
  • Fix author field to @KBryan for auto-merge compatibility

KBryan added 2 commits October 7, 2025 09:35
* Semantics updates based on review feedback
@eip-review-bot
Copy link
Collaborator

eip-review-bot commented Oct 7, 2025

✅ All reviewers have approved.

@eip-review-bot eip-review-bot changed the title Move EIP-8001 to Review Update ERC-8001: Move to Review Oct 7, 2025
Copy link
Contributor

@SamWilsn SamWilsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In your abstract, you might want to define an intent (for anyone, like me, who might not be super familiar).

Your motivation might benefit from a use case.

Line 33: s/above/below?

In Typed Data Hashes, I'd probably appreciate some introductory text to give some context for the following code snippet. Essentially, why does the reader need to see this code at this point in the document?

Comment on lines 198 to +227
- `proposeCoordination`:
- Verifies EIP-712 signature by `agentId` using ECDSA for EOAs or [ERC-1271] for contracts.
- Requires `intent.expiry > block.timestamp` and `intent.nonce > agentNonces[agentId]`.
- Stores the canonicalised state and sets `agentNonces[agentId] = intent.nonce`.
- Emits `CoordinationProposed`.
Rejects: invalid signatures, expired intents, non-monotonic nonces, malformed participants

Accepts valid EIP-712 signed intents and:
- Emits `CoordinationProposed`
- Makes intent queryable as `Proposed`
- Enforces nonce monotonicity for `agentId`

- `acceptCoordination`:
- Checks the intent exists and is not expired.
- Verifies the participant is listed and has not already accepted.
- Verifies the acceptance signature against the typed `AcceptanceAttestation`.
- Records acceptance and stores the acceptance `expiry` for that participant.
- Emits `CoordinationAccepted` with the typed acceptance hash.
- Returns `true` when all required acceptances are present.
Rejects: non-existent intents, expired intents, non-participants, duplicate acceptances, invalid signatures

Accepts valid attestations and:
- Emits `CoordinationAccepted`
- Adds participant to `acceptedBy` in status
- Returns `true` when all required acceptances present

- `executeCoordination`:
- Requires the intent to be in an executable state. In [ERC-8001](./eip-8001.md) the policy is **all participants have accepted**.
- Requires every stored acceptance to be unexpired at execution time.
- Verifies `payloadHash` matches the stored hash.
- Emits `CoordinationExecuted`.
Rejects: non-ready intents, expired intents or acceptances, payload mismatches

Executes when all participants accepted and unexpired:
- Emits `CoordinationExecuted` with result
- Status becomes `Executed`
- Returns success and execution result

- `cancelCoordination`:
- The proposer MAY cancel before execution. Anyone MAY cancel after expiry.
- Emits `CoordinationCancelled`.
- Status values are implementation-defined but MUST include Proposed, Ready, Executed, Cancelled, Expired.
- `executeCoordination` MUST:
- Verify status == Ready (i.e., every participant has accepted).
- Verify `block.timestamp < intent.expiry`.
- For each recorded acceptance: verify `block.timestamp < acceptance.expiry`.
- Verify `keccak256(abi.encode(payload))` equals the stored `payloadHash`.
Proposer MAY cancel before execution; anyone MAY cancel after expiry
- Emits `CoordinationCancelled`
- Status becomes `Cancelled`

- `getCoordinationStatus` MUST return one of: `None`, `Proposed`, `Ready`, `Executed`, `Cancelled`, `Expired`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are decent descriptions of pre- and post-conditions, but I think this section is lacking a bit of detail on what these functions actually do. Think natspec/developer docs.

@eip-review-bot eip-review-bot enabled auto-merge (squash) October 7, 2025 16:21
Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Reviewers Have Approved; Performing Automatic Merge...

@eip-review-bot eip-review-bot merged commit 4310a77 into ethereum:master Oct 7, 2025
16 of 17 checks passed
Copy link
Collaborator

@eip-review-bot eip-review-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Reviewers Have Approved; Performing Automatic Merge...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants