Add ERC: Zero-Knowledge Spending Policies - #1929
Conversation
File
|
|
Note on numbering: I initially self-assigned 8357, then noticed it collides with an allocation in the EIPs repo (ethereum/EIPs#12055), and that editors/associates assign numbers sequentially across repos (8362 was assigned to #1925, and 8364 is already claimed). I have moved the file to |
| @@ -0,0 +1,205 @@ | |||
| --- | |||
| eip: 8365 | |||
There was a problem hiding this comment.
| eip: 8365 | |
| eip: 8366 |
@junbeomlee
Assigning next sequential EIP/ERC/RIP number.
Numbers are assigned by editors & associates.
Please also update the filename.
|
Done - renamed to |
| title: Zero-Knowledge Spending Policies | ||
| description: Contracts release held funds only against a zero-knowledge proof that the payment satisfies a registered spending policy | ||
| author: JunBeom Lee (@junbeomlee) | ||
| discussions-to: https://ethereum-magicians.org/t/erc-zero-knowledge-spending-policies/29281 |
There was a problem hiding this comment.
| discussions-to: https://ethereum-magicians.org/t/erc-zero-knowledge-spending-policies/29281 | |
| discussions-to: https://ethereum-magicians.org/t/erc-8366-zero-knowledge-spending-policies/29281 |
Updated Eth Magicians title with assigned number
| title: Zero-Knowledge Spending Policies | ||
| description: Contracts release held funds only against a zero-knowledge proof that the payment satisfies a registered spending policy | ||
| author: JunBeom Lee (@junbeomlee) | ||
| discussions-to: https://ethereum-magicians.org/t/erc-zero-knowledge-spending-policies/29281 |
There was a problem hiding this comment.
| discussions-to: https://ethereum-magicians.org/t/erc-zero-knowledge-spending-policies/29281 | |
| discussions-to: https://ethereum-magicians.org/t/erc-8366-zero-knowledge-spending-policies/29281 |
Updated Eth Magicians title with assigned number
- Split the optional settle/Settled pair into IZKSpendingPolicySettlement (OPTIONAL members do not compile in a single Solidity interface) - Normatively fix the authorization tuple for the ERC-3009 schema and drop the redundant from field (digest recomputation pins the payer) - Scope the 0xffffffff requirement to envelopes that decode - Define "settled", forbid registering consumed nonces where readable, and state that policy records survive settlement (registered != spendable) - Note that allowedPolicy does not distinguish revoked from never-registered
…dapter The check the standard exists for now has its own named entry point, verifyPolicy(authorization, proof), usable as a pre-flight static call by any party. isValidSignature is no longer declared in IZKSpendingPolicy (it is ERC-1271's function): conforming contracts on contract-signature rails MUST implement it as an adapter that performs digest binding and then agrees with verifyPolicy. Pseudocode and Direct settlement updated to match. Mirrors the reference implementation (33 tests).
The verifyPolicy restructure moved digest binding out of the numbered verification steps and into the ERC-1271 adapter paragraph, so the envelope note's "step 1" pointed at nothing.
verifyPolicy takes authorization and proof as two direct arguments, so the abi.encode(proof, authorization) envelope is signature-rail wire format, not core spec: it exists only because ERC-1271 offers a single bytes slot. The one-way-hash rationale for carrying cleartext fields also only applies on that path. The core section now defines the two arguments' encodings on their own.
New draft ERC: a composable function set for contracts holding a user's funds to release them only against a zero-knowledge proof that the payment satisfies a pre-registered spending policy, verified in ERC-1271 signature validation.
Discussion: https://ethereum-magicians.org/t/erc-zero-knowledge-spending-policies/29281
The file is named erc-9999.md as a placeholder; I will rename it to the assigned number.