Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/review-candidate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Official revision evidence

on:
pull_request:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
candidate:
name: Pinned official candidate and negative control
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.7.1
- name: Install forge-std
working-directory: contracts
run: forge install foundry-rs/forge-std@v1.16.2 --no-git
- name: Check gate failure modes
run: node --test scripts/review-candidate.test.mjs
- name: Test exact upstream candidate bytes
run: node scripts/review-candidate.mjs
- uses: actions/upload-artifact@v4
if: always()
with:
name: erc8350-upstream-candidate-${{ github.sha }}
path: |
artifacts/review-candidate/*.json
artifacts/review-candidate/*.txt
artifacts/review-candidate/erc-8350.md
artifacts/review-candidate/*/erc-8350/*.sol
if-no-files-found: error
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ artifacts/conformance/
artifacts/external-reproductions/
artifacts/independent-client*/
artifacts/account-conformance/
artifacts/review-candidate/
account-conformance/out/
account-conformance/cache/
account-conformance/lib/
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ All notable implementation and protocol changes are recorded here.

### Added

- Pinned official authorization-candidate gate and CI: verifies proposed upstream
bytes, runs 38 authorization/signature tests, and requires two dirty-padding
failures against the historical official source as a negative control. Review
packet links merged scoped-client, signature and account evidence without
replacing historical official baselines or granting G4 acceptance.

- Separate Prague real-account conformance harness with pinned Safe 1.4.1,
2-of-2 signatures and real SignMessageLib approval; actual local Anvil type-4
transactions verify delegation nonce/stale-authority behavior. Registry bytecode
Expand Down
5 changes: 3 additions & 2 deletions docs/interop/account-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,6 @@ EVM implementations can adapt the `_deploy` helper in the common cases. Non-EVM
clients should reproduce the same inputs, decisions and before/after state, not
copy reference-specific error selectors. Signature validation needs the specified
chain/block wallet state; offline hash replay alone cannot verify historical 1271
policy. Portable static signature-vector publication is a separate follow-up;
this package does not change or rename v1/v2 or the v1 wire format.
policy. Portable static data is now published as `test-vectors/signature-vectors-v1.json`
with 46 cases and core/minimal TS plus Solidity adapters (PR #37). It does not
replace this executable account suite or change v1/v2 or the v1 wire format.
45 changes: 27 additions & 18 deletions docs/review/draft-to-review.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Draft-to-Review preparation

Date: 2026-11-01. Status: preparation and open technical questions, not a submitted
status transition. The official ERC remains Draft.
Updated: 2026-11-06. Status: technical revision submitted in
[ethereum/ERCs#2147](https://github.com/ethereum/ERCs/pull/2147), not a submitted
status transition. The official ERC remains Draft. The proposed revision is
`397426c046049e1a0c3436e543f9731408708fd3`; it is not a new accepted baseline.

## Review packet

Expand All @@ -11,9 +13,12 @@ status transition. The official ERC remains Draft.
- [Authorization decision table and proposed wording](../spec-baseline/AUTHORIZATION.md).
- [AQ-03 runtime/audit delta](../security/aq03-runtime-delta.md).
- [Real-account test command and boundaries](../interop/account-conformance.md).
- [External replay evidence](../interop/external-reproduction.md), with the latest
upstream correction submitted separately in project PR #33.
- [Official-candidate reproduction and acceptance checklist](upstream-authorization.md).
- [External replay evidence](../interop/external-reproduction.md): project PR #33
merged; issues #29/#31 closed on 2026-11-01 with preserved failure records.
- [Independent-client acceptance package](../interop/independent-client-handoff.md).
- [Scoped Python results](../interop/independent-client-results.md) and the
[merged PR #37 main acceptance](https://github.com/AwareLiquid/AgentMemoryState/pull/37#issuecomment-6679669756).
- Public external report intake in `audits/g4/external/submissions/`; acceptance
remains pending under issues #11/#22, not granted by this packet.

Expand All @@ -30,13 +35,13 @@ status transition. The official ERC remains Draft.
5. Are immutable enforcing logic, scoped transition references and the separation
between hash compatibility, state enforcement and actual memory truth clear?

## Proposed upstream work, in order
## Remaining work, in order

Technical: obtain review of the above semantic clarifications, then submit a
focused official specification/CC0-asset PR. Preserve the assigned number,
authors, status, signing domain and wire format; link the discussion and tests.
After upstream merge, refresh the mirror and record a new official baseline.
Do not replace the pinned official mirror with unapproved project prose.
Technical: address technical/editor feedback on official PR #2147. The wording
and reference-code correction are separate commits. Number, authors, Draft
status, signing domain and wire format are preserved. After upstream merge,
refresh the official mirror and record a new baseline with the actual merged
commit. Until then, spec-baseline-2 and the original official mirror stay pinned.

Operations: publish concise discussion updates with exact commits/results, track
dissent and external implementation responses, and link reviewer-owned audit
Expand All @@ -51,13 +56,17 @@ An audit does not automatically produce Review or Final.

## Suggested discussion text

> We have pinned the official Draft and published an explicit authorization
> decision table, together with a proposed malformed-return fix. We are seeking
> feedback on empty/custom ERC-1271 signatures, nonempty self-calls, and ordered
> ECDSA fallback for delegated accounts. Our tests and replay evidence state
> their exact scope; full independent-client work and audit acceptance remain
> open. Please identify any ambiguous acceptance rule before building against
> the proposal. We will incorporate feedback in a focused upstream revision
> before requesting a status transition.
> The focused authorization revision is now proposed in
> https://github.com/ethereum/ERCs/pull/2147 (candidate 397426c0; status remains
> Draft). We seek feedback on three specific points: ERC-1271 receives original
> empty/custom-length bytes before the ECDSA-only length guard; nonempty self-call
> signatures are validated; malformed return words fail wallet validation and
> continue to the same-byte ECDSA fallback. That fallback intentionally preserves
> an EIP-7702 account's key path even when its delegate rejects. Our pinned runner
> tests the exact candidate and reproduces the old dirty-padding failure.
> Independently maintained Python hash/state/EOA coverage is accepted only in its
> reported scope; independent ERC-1271/Safe/7702 coverage and current-source audit
> acceptance remain open. Which acceptance rule, if any, is still ambiguous for
> your implementation? This is technical feedback, not a status-change request.

This text is a draft for community discussion, not a claim that it was posted.
92 changes: 92 additions & 0 deletions docs/review/upstream-authorization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Official authorization revision evidence

Date: 2026-11-06. Technical proposal, not upstream acceptance or a release.

## Exact inputs

- Official PR: [ethereum/ERCs#2147](https://github.com/ethereum/ERCs/pull/2147).
- Candidate: `397426c046049e1a0c3436e543f9731408708fd3` in `XiaoHai67890/ERCs`.
- Wording commit: `6420c36e`; runtime commit: `397426c0`.
- Accepted official text remains `b9651bc84714e87e6361f4f6c0c8ff39cc265d0a`.
- [Candidate manifest](upstream-candidate.json) pins the proposal text, all three
CC0 source files, and the old-source negative control by commit and SHA-256.
- Harness originates from merged project main `5770a9090700cc6df925b7a399e53014eac16667`;
each generated record identifies the actual runner commit and dirty status.

The candidate's three assets match the current local CC0 assets byte-for-byte.
Neither `erc/erc-8350.md` nor either historical baseline manifest is replaced.
The normative wording is a proposal resolving conflicting readings, not an
editorial-only change or already accepted rule.

## Reproduce

Requirements: Node 22, Foundry 1.7.1, solc 0.8.24, GitHub/solc download access.
From a clean checkout of this PR's head:

```bash
cd contracts
forge install foundry-rs/forge-std@v1.16.2 --no-git
cd ..
node --test scripts/review-candidate.test.mjs
node scripts/review-candidate.mjs
```

The runner downloads pinned source bytes, verifies their digests, checks the
candidate against local CC0 assets, and explicitly remaps the test import to
the fetched directory. Candidate/control compiler outputs are isolated. It does
not execute scripts from the external repository. Its JSON/logs are saved under
`artifacts/review-candidate/` and uploaded by `Official revision evidence` CI.
The initial local run passed; the PR's clean-checkout CI is the durable run record.

Expected results:

| Layer | Required result | Scope |
| --- | --- | --- |
| Runner adversarial tests | 9 pass, zero skips | Hash/HTTP failure, missing suites, false approval, missing assets, reduced fuzz counts |
| Candidate authorization | 36 pass | 18 tests per Registry copy, three operations, atomic rejection; 256 padding fuzz runs per copy |
| Candidate signature vectors | 2 pass | Each test executes all 46 externally exported ECDSA cases |
| Old official negative control | Exactly 2 specified tests fail | Dirty-padding valid-key fallback, deterministic and fuzz case, using old official source |

An empty suite, skip, fetch failure, malformed JSON or compiler failure cannot
satisfy the expected negative control. The expected failures are not unresolved
failures of the candidate. This gate proves the documented test outcomes, not
the completeness of the specification or an independent security assessment.

## Evidence already merged

[PR #36](https://github.com/AwareLiquid/AgentMemoryState/pull/36) and
[PR #37](https://github.com/AwareLiquid/AgentMemoryState/pull/37) are merged.
The [main acceptance record](https://github.com/AwareLiquid/AgentMemoryState/pull/37#issuecomment-6679669756)
binds clean commit `5770a909` to full workspace/Golden Vector checks, 155 TypeScript
and 120 Solidity tests, 58 real-account tests with local type-4 receipts, scoped
Python reproduction and both live replay suites. The new runner supplements,
not replaces, those gates. Static vectors cannot demonstrate wallet execution.

## Concrete handoff and acceptance

| Task | Responsibility | Output | Acceptance |
| --- | --- | --- | --- |
| Official technical review | Technical | PR #2147; answers to AQ-01/AQ-02/AQ-03 feedback | Review comments addressed; upstream merge observed, not inferred from CI |
| Community discussion | Operations | Targeted questions in the existing Magicians thread | Published URL and substantive responses/dissent recorded; draft prose is not a posted comment |
| Post-merge baseline | Technical | New numbered manifest and byte-identical official mirror | Actual merged SHA/digests verified; baselines 1/2 retained; notify implementers |
| Independent wallet coverage | Operations | Optional scope agreement in issue #21 | Contributor explicitly accepts a bounded task; no assumed maintenance commitment |
| Account conformance handoff | Technical | Existing 58-case harness, 46 vectors and rule table | External account results bind wallet/version/state, commands, outcomes and rejection snapshots; unsupported rows declared |
| Audit addendum | Operations | Reviewer-owned supplement via issues #11/#22 | Exact new candidate and runtime delta, methodology, findings, risk mapping and attestation; genuine acceptance before canonical record |
| Draft-to-Review submission | Technical | Separate status-only official PR after technical revision acceptance | Author requests peer review; no false claim that audit/independent tests guarantee editor merge |

Full independent implementation and G4 are project quality/release gates, not
universal EIP-1 requirements to request Review. ZK profiles, markets, new SDK
features and deployments are not prerequisites for this focused revision.

## Audit and deployment boundary

The October reviewer-controlled report is archived as a provisional submission;
it is not absent, but canonical acceptance is still pending. The frozen target
`af5a75fb2db532fd5603554083d8895a825c2de2` is unchanged and does not cover AQ-03.
The [runtime delta](../security/aq03-runtime-delta.md) is the supplement input.
`pnpm security:rc` remains a failing release gate until actual current-scope
evidence and acceptance exist. CI scope checks do not mean security-ready.

No deployment is changed by this work. An immutable existing address cannot be
patched by merging source. A future deployment needs separate bytecode/build,
Sourcify Exact Match and reachable-upgrade-path evidence for the actual network.
17 changes: 17 additions & 0 deletions docs/review/upstream-candidate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"schema": "erc8350/upstream-candidate/v1",
"status": "proposed-not-upstream-approved",
"repository": "XiaoHai67890/ERCs",
"commit": "397426c046049e1a0c3436e543f9731408708fd3",
"specSha256": "295ab952357cefe141f3f1df5ceaaed2fe40826939fd22c683519c747a0fc072",
"assets": {
"AgentMemoryStateRegistry.sol": "94c7f39920205ae581e6537828a80a3dcfeb0a283c833ed2b50bc10927a292c3",
"ECDSA.sol": "74d0a828f70af9384457e2cf5165638dcc44a7b9749b8dc80cb7c9bd2ba2ccf0",
"IAgentMemoryState.sol": "274bfee5de979ea164abcf30af6b9dace1fccdb42bee4cf59bdeb0a9621be93a"
},
"negativeControl": {
"repository": "ethereum/ERCs",
"commit": "b9651bc84714e87e6361f4f6c0c8ff39cc265d0a",
"registrySha256": "6d99fc690abd776c53f607be9da1e25c2a48a80037088a3f3fb029f54943685b"
}
}
7 changes: 7 additions & 0 deletions docs/security/aq03-runtime-delta.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,10 @@ upgrade or reuse of the old audit claim.
The official Draft text remains pinned; empty/custom-signature clarifications are
still proposals. The local CC0 asset fix must receive a separate upstream review
before claiming ethereum/ERCs contains it. No production readiness is asserted.

Update 2026-11-06: [official PR #2147](https://github.com/ethereum/ERCs/pull/2147)
proposes the exact local CC0 bytes at `397426c046049e1a0c3436e543f9731408708fd3`.
The [candidate gate](../review/upstream-authorization.md) verifies fetched source
digests, runs all 38 authorization/signature tests and requires two expected
dirty-padding failures against the old official source. Upstream acceptance and
the reviewer-owned current-source supplement remain pending.
14 changes: 8 additions & 6 deletions docs/spec-baseline/AUTHORIZATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ with invalid non-empty bytes does not fall back to the direct-empty shortcut.

## Proposed clarification text

The following is proposed replacement wording for the signature-validation
subsection, not a replacement for the pinned official file. Submit it separately
upstream after reviewing AQ-01 through AQ-03. In particular, invalid-ABI handling
must be settled before this text is claimed to describe all existing behavior.
The following records the original project direction, not a replacement for the
pinned official file. The complete wording, including canonical return-word and
state-validation constraints, is now submitted in
[ethereum/ERCs#2147](https://github.com/ethereum/ERCs/pull/2147) at `397426c0`.
It remains a proposal until upstream review/merge, not a new official baseline.

> The required account is the controller for registration, the current controller
> for an authorization update, and the current authorizer for a transition.
Expand Down Expand Up @@ -109,8 +110,9 @@ and rejection atomicity. Existing `ExternalReviewBoundary.t.sol`,
encoding, callback, replay and state-linkage evidence. The separate
[account conformance suite](../interop/account-conformance.md) adds pinned Safe
1.4.1 and real Prague delegation, including local mined type-4 receipts. Portable
signature data and external language adapters remain follow-ups; a mock's name
does not establish those capabilities.
signature data is now published as `test-vectors/signature-vectors-v1.json`, with TS and
Solidity adapters merged in PR #37. External wallet execution remains a follow-up;
a mock's name does not establish those capabilities.

## Gas and policy boundary

Expand Down
Loading
Loading