From 233696d2599e8ad5213a3f26ad1cdf2d8b740be9 Mon Sep 17 00:00:00 2001 From: Potuz Date: Tue, 6 Aug 2024 13:54:11 -0300 Subject: [PATCH 1/4] Update EIP-7732: Links to consensus repo Merged by EIP-Bot. --- EIPS/eip-7732.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/EIPS/eip-7732.md b/EIPS/eip-7732.md index 92a620896bf3b3..21f03422cec7c0 100644 --- a/EIPS/eip-7732.md +++ b/EIPS/eip-7732.md @@ -35,12 +35,12 @@ No changes are required. The full consensus changes can be found in the consensus-specs Github repository. They are split between: -- [Beacon Chain](https://github.com/ethereum/consensus-specs/blob/1508f51b80df5488a515bfedf486f98435200e02/specs/_features/eipxxxx/beacon-chain.md) changes. -- [Fork choice](https://github.com/ethereum/consensus-specs/blob/1508f51b80df5488a515bfedf486f98435200e02/specs/_features/eipxxxx/fork-choice.md) changes. -- [P2P](https://github.com/ethereum/consensus-specs/blob/1508f51b80df5488a515bfedf486f98435200e02/specs/_features/eipxxxx/p2p-interface.md) changes. -- [Honest validator guide](https://github.com/ethereum/consensus-specs/blob/1508f51b80df5488a515bfedf486f98435200e02/specs/_features/eipxxxx/validator.md) changes. -- A new [honest builder](https://github.com/ethereum/consensus-specs/blob/1508f51b80df5488a515bfedf486f98435200e02/specs/_features/eipxxxx/builder.md) guide. -- [Fork logic](https://github.com/ethereum/consensus-specs/blob/1508f51b80df5488a515bfedf486f98435200e02/specs/_features/eipxxxx/fork.md) changes. +- [Beacon Chain](https://github.com/ethereum/consensus-specs/blob/8f8ab03acf1656c54f3a81ef18878f853a1cc4c6/specs/_features/eip7732/beacon-chain.md) changes. +- [Fork choice](https://github.com/ethereum/consensus-specs/blob/8f8ab03acf1656c54f3a81ef18878f853a1cc4c6/specs/_features/eip7732/fork-choice.md) changes. +- [P2P](https://github.com/ethereum/consensus-specs/blob/8f8ab03acf1656c54f3a81ef18878f853a1cc4c6/specs/_features/eip7732/p2p-interface.md) changes. +- [Honest validator guide](https://github.com/ethereum/consensus-specs/blob/8f8ab03acf1656c54f3a81ef18878f853a1cc4c6/specs/_features/eip7732/validator.md) changes. +- A new [honest builder](https://github.com/ethereum/consensus-specs/blob/8f8ab03acf1656c54f3a81ef18878f853a1cc4c6/specs/_features/eip7732/builder.md) guide. +- [Fork logic](https://github.com/ethereum/consensus-specs/blob/8f8ab03acf1656c54f3a81ef18878f853a1cc4c6/specs/_features/eip7732/fork.md) changes. A summary of the main changes is included below, the [Rationale](#rationale) section contains explanation for most of the design decisions around these changes. From 2f46d4dd395cd672cfa6b8b7d8e34cac129ed0bf Mon Sep 17 00:00:00 2001 From: Pedro Gomes Date: Wed, 7 Aug 2024 17:50:39 +0100 Subject: [PATCH 2/4] Update EIP-5792: multi-chain wallet_sendCalls Merged by EIP-Bot. --- EIPS/eip-5792.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/EIPS/eip-5792.md b/EIPS/eip-5792.md index 0529af9f54e553..a54f08d657442a 100644 --- a/EIPS/eip-5792.md +++ b/EIPS/eip-5792.md @@ -40,13 +40,13 @@ The capabilities field is how an app can communicate with a wallet about capabil The wallet: -* MUST send these calls in the order specified in the request -* MUST send the calls on the same chain identified by the request's `chainId` property +* MUST send the calls in the order specified in the request +* MUST send the calls on the same chain identified by the call's `chainId` property +* MUST NOT await for any calls to be finalized to complete the batch * MUST NOT send any calls from the request if the user rejects the request * MAY revert all calls if any call fails -* MAY send all the function calls as part of one transaction or multiple transactions, depending on wallet capability +* MAY send all calls as part of one or more transactions, depending on wallet capability * SHOULD stop executing the calls if any call fails -* MAY reject the request if the request chain ID does not match the currently selected chain ID * MAY reject the request if the from address does not match the enabled account * MAY reject the request if one or more calls in the batch is expected to fail, when simulated sequentially @@ -55,12 +55,12 @@ The wallet: ```typescript type SendCallsParams = { version: string; - chainId: `0x${string}`; // Hex chain id from: `0x${string}`; calls: { to?: `0x${string}` | undefined; data?: `0x${string}` | undefined; value?: `0x${string}` | undefined; // Hex value + chainId?: `0x${string}` | undefined; // Hex chain id }[]; capabilities?: Record | undefined; }; @@ -74,18 +74,19 @@ type SendCallsResult = string; [ { "version": "1.0", - "chainId": "0x01", "from": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "calls": [ { "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a", - "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675" + "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675", + "chainId": "0x01", }, { "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x182183", - "data": "0xfbadbaf01" + "data": "0xfbadbaf01", + "chainId": "0x01", } ], "capabilities": { @@ -128,6 +129,7 @@ type GetCallsResult = { topics: `0x${string}`[]; }[]; status: `0x${string}`; // Hex 1 or 0 for success or failure, respectively + chainId: `0x${string}`; blockHash: `0x${string}`; blockNumber: `0x${string}`; gasUsed: `0x${string}`; @@ -163,6 +165,7 @@ As with the return value of `wallet_sendCalls`, the batch identifier may be any } ], "status": "0x1", + "chainId": "0x01", "blockHash": "0xf19bbafd9fd0124ec110b848e8de4ab4f62bf60c189524e54213285e7f540d4a", "blockNumber": "0xabcd", "gasUsed": "0xdef", @@ -246,6 +249,8 @@ The capabilities below are for illustrative purposes. Like the illustrative examples given above and other capabilities to be defined in future EIPs, the capability to execute calls delivered via the above-defined methods in a single transaction can be attested by the wallet in boolean form. +This capability is expressed separately on each chain and should be interpreted as a guarantee only for batches of transactions on that chain; batches including calls to multiple chains is out of scope of this capability and this specification. + If a wallet has affirmatively expressed this `atomicBatch` capability to a calling application, it MUST submit calls submitted with `wallet_sendCalls` as part of a single transaction. #### `atomicBatch` Capability Specification From 2684d6edc7630037c02ca6f413b3e308f3b065d4 Mon Sep 17 00:00:00 2001 From: rakita Date: Thu, 8 Aug 2024 00:35:34 +0200 Subject: [PATCH 3/4] Update EIP-7702: Switch order of authority warm access Merged by EIP-Bot. --- EIPS/eip-7702.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/EIPS/eip-7702.md b/EIPS/eip-7702.md index c4fa456378e154..f1cc07f8954254 100644 --- a/EIPS/eip-7702.md +++ b/EIPS/eip-7702.md @@ -56,12 +56,12 @@ At the start of executing the transaction, for each `[chain_id, address, nonce, 1. `authority = ecrecover(keccak(MAGIC || rlp([chain_id, address, nonce])), y_parity, r, s]` 2. Verify the chain id is either 0 or the chain's current ID. -3. Verify the code of `authority` is either empty or already delegated. -4. Verify the nonce of `authority` is equal to `nonce`. -5. Refund the sender `PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST` gas if `authority` exists in the trie. -6. Set the code of `authority` to be `0xef0100 || address`. This is a delegation designation. -7. Increase the nonce of `authority` by one. -8. Add `authority` to `accessed_addresses` (as defined in [EIP-2929](./eip-2929.md).) +3. Add `authority` to `accessed_addresses` (as defined in [EIP-2929](./eip-2929.md).) +4. Verify the code of `authority` is either empty or already delegated. +5. Verify the nonce of `authority` is equal to `nonce`. +6. Refund the sender `PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST` gas if `authority` exists in the trie. +7. Set the code of `authority` to be `0xef0100 || address`. This is a delegation designation. +8. Increase the nonce of `authority` by one. If any of the above steps fail, immediately stop processing that tuple and continue to the next tuple in the list. It will in the case of multiple tuples for the same authority, set the code using the address in the last occurrence. From 578667e8f1f4410e3792f4b39119fa594dae42ae Mon Sep 17 00:00:00 2001 From: Mortiemi <145274170+Mortiemi@users.noreply.github.com> Date: Thu, 8 Aug 2024 01:25:27 +0200 Subject: [PATCH 4/4] Revert "Update EIP-5792: multi-chain wallet_sendCalls" This reverts commit 2f46d4dd395cd672cfa6b8b7d8e34cac129ed0bf. --- EIPS/eip-5792.md | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/EIPS/eip-5792.md b/EIPS/eip-5792.md index a54f08d657442a..0529af9f54e553 100644 --- a/EIPS/eip-5792.md +++ b/EIPS/eip-5792.md @@ -40,13 +40,13 @@ The capabilities field is how an app can communicate with a wallet about capabil The wallet: -* MUST send the calls in the order specified in the request -* MUST send the calls on the same chain identified by the call's `chainId` property -* MUST NOT await for any calls to be finalized to complete the batch +* MUST send these calls in the order specified in the request +* MUST send the calls on the same chain identified by the request's `chainId` property * MUST NOT send any calls from the request if the user rejects the request * MAY revert all calls if any call fails -* MAY send all calls as part of one or more transactions, depending on wallet capability +* MAY send all the function calls as part of one transaction or multiple transactions, depending on wallet capability * SHOULD stop executing the calls if any call fails +* MAY reject the request if the request chain ID does not match the currently selected chain ID * MAY reject the request if the from address does not match the enabled account * MAY reject the request if one or more calls in the batch is expected to fail, when simulated sequentially @@ -55,12 +55,12 @@ The wallet: ```typescript type SendCallsParams = { version: string; + chainId: `0x${string}`; // Hex chain id from: `0x${string}`; calls: { to?: `0x${string}` | undefined; data?: `0x${string}` | undefined; value?: `0x${string}` | undefined; // Hex value - chainId?: `0x${string}` | undefined; // Hex chain id }[]; capabilities?: Record | undefined; }; @@ -74,19 +74,18 @@ type SendCallsResult = string; [ { "version": "1.0", + "chainId": "0x01", "from": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "calls": [ { "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x9184e72a", - "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675", - "chainId": "0x01", + "data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675" }, { "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567", "value": "0x182183", - "data": "0xfbadbaf01", - "chainId": "0x01", + "data": "0xfbadbaf01" } ], "capabilities": { @@ -129,7 +128,6 @@ type GetCallsResult = { topics: `0x${string}`[]; }[]; status: `0x${string}`; // Hex 1 or 0 for success or failure, respectively - chainId: `0x${string}`; blockHash: `0x${string}`; blockNumber: `0x${string}`; gasUsed: `0x${string}`; @@ -165,7 +163,6 @@ As with the return value of `wallet_sendCalls`, the batch identifier may be any } ], "status": "0x1", - "chainId": "0x01", "blockHash": "0xf19bbafd9fd0124ec110b848e8de4ab4f62bf60c189524e54213285e7f540d4a", "blockNumber": "0xabcd", "gasUsed": "0xdef", @@ -249,8 +246,6 @@ The capabilities below are for illustrative purposes. Like the illustrative examples given above and other capabilities to be defined in future EIPs, the capability to execute calls delivered via the above-defined methods in a single transaction can be attested by the wallet in boolean form. -This capability is expressed separately on each chain and should be interpreted as a guarantee only for batches of transactions on that chain; batches including calls to multiple chains is out of scope of this capability and this specification. - If a wallet has affirmatively expressed this `atomicBatch` capability to a calling application, it MUST submit calls submitted with `wallet_sendCalls` as part of a single transaction. #### `atomicBatch` Capability Specification