Skip to content

Commit 666ed83

Browse files
authored
Merge branch 'ethereum:master' into master
2 parents 50f908a + d138c45 commit 666ed83

9 files changed

Lines changed: 46 additions & 33 deletions

File tree

EIPS/eip-2135.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
---
22
eip: 2135
33
title: Consumable Interface (Tickets, etc)
4-
description: An interface extending EIP-721 and EIP-1155 for consumability, supporting use case such as an event ticket.
4+
description: An interface extending ERC-721 and ERC-1155 for consumability, supporting use case such as an event ticket.
55
author: Zainan Victor Zhou (@xinbenlv)
66
discussions-to: https://ethereum-magicians.org/t/eip-2135-erc-consumable-interface/3439
7-
status: Last Call
8-
last-call-deadline: 2023-02-01
7+
status: Final
98
type: Standards Track
109
category: ERC
1110
created: 2019-06-23
@@ -32,7 +31,7 @@ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL
3231
```solidity
3332
pragma solidity >=0.7.0 <0.9.0;
3433
35-
/// The EIP-165 identifier of this interface is 0xdd691946
34+
/// The ERC-165 identifier of this interface is 0xdd691946
3635
interface IERC2135 {
3736
/// @notice The consume function consumes a token every time it succeeds.
3837
/// @param _consumer the address of consumer of this token. It doesn't have
@@ -74,9 +73,9 @@ interface IERC2135 {
7473
}
7574
```
7675

77-
2. If the compliant contract is an [EIP-721](./eip-721.md) or [EIP-1155](./eip-1155.md) token, in addition to `OnConsumption`, it **MUST** also emit the `Transfer` / `TransferSingle` event (as applicable) as if a token has been transferred from the current holder to the zero address if the call to `consume` method succeeds.
76+
2. If the compliant contract is an [ERC-721](./eip-721.md) or [ERC-1155](./eip-1155.md) token, in addition to `OnConsumption`, it **MUST** also emit the `Transfer` / `TransferSingle` event (as applicable) as if a token has been transferred from the current holder to the zero address if the call to `consume` method succeeds.
7877

79-
3. `supportsInterface(0xdd691946)` **MUST** return `true` for any compliant contract, as per [EIP-165](./eip-165.md).
78+
3. `supportsInterface(0xdd691946)` **MUST** return `true` for any compliant contract, as per [ERC-165](./eip-165.md).
8079

8180
## Rationale
8281

@@ -85,29 +84,29 @@ interface IERC2135 {
8584
- who has the power to perform consumption
8685
- under what condition consumption can occur
8786

88-
It does, however, assume the asset can be identified in a `uint256` asset id as in the parameter. A design convention and compatibility consideration is put in place to follow the EIP-721 pattern.
87+
It does, however, assume the asset can be identified in a `uint256` asset id as in the parameter. A design convention and compatibility consideration is put in place to follow the ERC-721 pattern.
8988

9089
2. The event notifies subscribers whoever are interested to learn an asset is being consumed.
9190

9291
3. To keep it simple, this standard *intentionally* contains no functions or events related to the creation of a consumable asset. This is because the creation of a consumable asset will need to make assumptions about the nature of an actual use-case. If there are common use-cases for creation, another follow up standard can be created.
9392

94-
4. Metadata associated to the consumables is not included the standard. If necessary, related metadata can be created with a separate metadata extension interface like `ERC721Metadata` from [EIP-721](./eip-721.md)
93+
4. Metadata associated to the consumables is not included the standard. If necessary, related metadata can be created with a separate metadata extension interface like `ERC721Metadata` from [ERC-721](./eip-721.md)
9594

9695
5. We choose to include an `address consumer` for `consume` function and `isConsumableBy` so that an NFT MAY be consumed for someone other than the transaction initiator.
9796

9897
6. We choose to include an extra `_data` field for future extension, such as
9998
adding crypto endorsements.
10099

101-
7. We explicitly stay opinion-less about whether EIP-721 or EIP-1155 shall be required because
102-
while we design this EIP with EIP-721 and EIP-1155 in mind mostly, we don't want to rule out
100+
7. We explicitly stay opinion-less about whether ERC-721 or ERC-1155 shall be required because
101+
while we design this EIP with ERC-721 and ERC-1155 in mind mostly, we don't want to rule out
103102
the potential future case someone use a different token standard or use it in different use cases.
104103

105104
8. The boolean view function of `isConsumableBy` can be used to check whether an asset is
106105
consumable by the `_consumer`.
107106

108107
## Backwards Compatibility
109108

110-
This interface is designed to be compatible with EIP-721 and NFT of EIP-1155. It can be tweaked to used for [EIP-20](./eip-20.md), [EIP-777](./eip-777.md) and Fungible Token of EIP-1155.
109+
This interface is designed to be compatible with ERC-721 and NFT of ERC-1155. It can be tweaked to used for [ERC-20](./eip-20.md), [ERC-777](./eip-777.md) and Fungible Token of ERC-1155.
111110

112111
## Test Cases
113112

EIPS/eip-223.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
eip: 223
3-
title: 223 Token with communication model
3+
title: Token with communication model
44
description: Token with transaction handling model designed to behave identical to native currency (ether)
55
author: Dexaran (@Dexaran) <dexaran@ethereumclassic.org>
66
discussions-to: https://ethereum-magicians.org/t/erc-223-token-standard/12894
7-
status: Draft
7+
status: Review
88
type: Standards Track
99
category: ERC
1010
created: 2017-05-03

EIPS/eip-4788.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ Validity of the parent beacon block root is guaranteed from the consensus layer,
7575

7676
When verifying a block, execution clients **MUST** ensure the root value in the block header matches the one provided by the consensus client.
7777

78+
For a genesis block with no existing parent beacon block root the 32 zero bytes are used as a root placeholder.
79+
7880
### EVM changes
7981

8082
#### Block processing

EIPS/eip-4844.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ Compared to full data sharding, this EIP has a reduced cap on the number of thes
4040
| Constant | Value |
4141
| - | - |
4242
| `BLOB_TX_TYPE` | `Bytes1(0x03)` |
43+
| `BYTES_PER_FIELD_ELEMENT` | `32` |
4344
| `FIELD_ELEMENTS_PER_BLOB` | `4096` |
4445
| `BLS_MODULUS` | `52435875175126190479447740508185965837690552500527637822603658699938581184513` |
45-
| `BLOB_COMMITMENT_VERSION_KZG` | `Bytes1(0x01)` |
46+
| `VERSIONED_HASH_VERSION_KZG` | `Bytes1(0x01)` |
4647
| `POINT_EVALUATION_PRECOMPILE_ADDRESS` | `Bytes20(0x0A)` |
4748
| `POINT_EVALUATION_PRECOMPILE_GAS` | `50000` |
4849
| `MAX_BLOB_GAS_PER_BLOCK` | `786432` |
@@ -63,10 +64,9 @@ Compared to full data sharding, this EIP has a reduced cap on the number of thes
6364

6465
| Type | Base type | Additional checks |
6566
| - | - | - |
66-
| `BLSFieldElement` | `uint256` | `x < BLS_MODULUS` |
67-
| `Blob` | `Vector[BLSFieldElement, FIELD_ELEMENTS_PER_BLOB]` | |
67+
| `Blob` | `ByteVector[BYTES_PER_FIELD_ELEMENT * FIELD_ELEMENTS_PER_BLOB]` | |
6868
| `VersionedHash` | `Bytes32` | |
69-
| `KZGCommitment` | `Bytes48` | Same as BLS standard "is valid pubkey" check but also allows `0x00..00` for point-at-infinity |
69+
| `KZGCommitment` | `Bytes48` | Perform IETF BLS signature "KeyValidate" check but do allow the identity point |
7070
| `KZGProof` | `Bytes48` | Same as for `KZGCommitment` |
7171

7272
### Cryptographic Helpers
@@ -82,7 +82,7 @@ Specifically, we use the following methods from [`polynomial-commitments.md`](ht
8282

8383
```python
8484
def kzg_to_versioned_hash(commitment: KZGCommitment) -> VersionedHash:
85-
return BLOB_COMMITMENT_VERSION_KZG + sha256(commitment)[1:]
85+
return VERSIONED_HASH_VERSION_KZG + sha256(commitment)[1:]
8686
```
8787

8888
Approximates `factor * e ** (numerator / denominator)` using Taylor expansion:
@@ -275,9 +275,9 @@ def validate_block(block: Block) -> None:
275275
# there must be at least one blob
276276
assert len(tx.blob_versioned_hashes) > 0
277277

278-
# all versioned blob hashes must start with BLOB_COMMITMENT_VERSION_KZG
278+
# all versioned blob hashes must start with VERSIONED_HASH_VERSION_KZG
279279
for h in tx.blob_versioned_hashes:
280-
assert h[0] == BLOB_COMMITMENT_VERSION_KZG
280+
assert h[0] == VERSIONED_HASH_VERSION_KZG
281281

282282
# ensure that the user was willing to at least pay the current blob gasprice
283283
assert tx.max_fee_per_blob_gas >= get_blob_gasprice(block.header)
@@ -304,7 +304,7 @@ rlp([tx_payload_body, blobs, commitments, proofs])
304304
Each of these elements are defined as follows:
305305

306306
- `tx_payload_body` - is the `TransactionPayloadBody` of standard EIP-2718 [blob transaction](#blob-transaction)
307-
- `blobs` - list of `blob` bytes where each `blob` is its `BLSFieldElement` list flattened in `big endian`
307+
- `blobs` - list of `Blob` items
308308
- `commitments` - list of `KZGCommitment` of the corresponding `blobs`
309309
- `proofs` - list of `KZGProof` of the corresponding `blobs` and `commitments`
310310

EIPS/eip-5806.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This EIP adds a new transaction type that allows EOAs to execute arbitrary code
1717

1818
## Motivation
1919

20-
EOA are the most widely used of account, yet their ability to perform operation is limited to deploying contracts and sending call transaction. It is currently not possible for an EOA to execute arbitrary code, which greatly limits the interractions users can have witht he blockchain. Account abstraction has been extensively discussed but the path toward mainstream adoption is still unclear. Some approaches, such as [ERC-4337](./eip-4337.md) hope to improve the usability of smart wallets, without addressing the issue of smart wallet support by applications. [EIP-3074](./eip-3074.md) proposes another approach that favors existing EOAs but comes with replay risks.
20+
EOA are the most widely used of account, yet their ability to perform operation is limited to deploying contracts and sending call transaction. It is currently not possible for an EOA to execute arbitrary code, which greatly limits the interractions users can have with he blockchain. Account abstraction has been extensively discussed but the path toward mainstream adoption is still unclear. Some approaches, such as [ERC-4337](./eip-4337.md) hope to improve the usability of smart wallets, without addressing the issue of smart wallet support by applications. [EIP-3074](./eip-3074.md) proposes another approach that favors existing EOAs but comes with replay risks.
2121

2222
While smart contract wallets have a lot to offer in terms of UX, it is unlikelly that all users will migrate any time soon because of the associated cost and the fact that some EOA have custody of non-transferable assets.
2323

@@ -34,7 +34,7 @@ The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL
3434
### Parameters
3535

3636
- `FORK_BLKNUM` = `TBD`
37-
- `TX_TYPE` = TBD, > 0x02 ([EIP-1559](./eip-1559.md))
37+
- `TX_TYPE` = TBD, > 0x03 ([EIP-4844](./eip-4844.md))
3838

3939
As of `FORK_BLOCK_NUMBER`, a new [EIP-2718](./eip-2718.md) transaction is introduced with `TransactionType` = `TX_TYPE(TBD)`.
4040

EIPS/eip-6492.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ title: Signature Validation for Predeploy Contracts
44
description: A way to verify a signature when the account is a smart contract that has not been deployed yet
55
author: Ivo Georgiev (@Ivshti), Agustin Aguilar (@Agusx1211)
66
discussions-to: https://ethereum-magicians.org/t/eip-6492-signature-validation-for-pre-deploy-contracts/12903
7-
status: Review
7+
status: Last Call
8+
last-call-deadline: 2023-08-29
89
type: Standards Track
910
category: ERC
1011
created: 2023-02-10

EIPS/eip-6963.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ function onPageLoad() {
189189
const info: EIP6963ProviderInfo = {
190190
uuid: "350670db-19fa-4704-a166-e52e178b59d2",
191191
name: "Example Wallet",
192-
icon: "https://wallet.example.org/icon.png",
192+
icon: "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'/>",
193193
rdns: "com.example.wallet"
194194
};
195195
window.dispatchEvent(

EIPS/eip-7066.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Lockable Extension for ERC-721
44
description: Interface for enabling locking of ERC-721 using locker and approved
55
author: Piyush Chittara (@piyush-chittara), StreamNFT (@streamnft-tech), Srinivas Joshi (@SrinivasJoshi)
66
discussions-to: https://ethereum-magicians.org/t/eip-7066-lockable-extension-for-erc721/14425
7-
status: Draft
7+
status: Review
88
type: Standards Track
99
category: ERC
1010
created: 2023-05-25

EIPS/eip-7377.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ status: Draft
88
type: Standards Track
99
category: Core
1010
created: 2023-07-21
11-
requires: 170, 1559, 2718
11+
requires: 170, 1559, 2200, 2718
1212
---
1313

1414
## Abstract
@@ -37,15 +37,15 @@ At the fork block `X`, introduce the migration transaction type.
3737

3838
| field | type |
3939
|------------------------|-----------|
40-
| `chainId` | `int256` |
40+
| `chainId` | `uint256` |
4141
| `nonce` | `uint64` |
42-
| `maxFeePerGas` | `int256` |
43-
| `maxPriorityFeePerGas` | `int256` |
42+
| `maxFeePerGas` | `uint256` |
43+
| `maxPriorityFeePerGas` | `uint256` |
4444
| `gasLimit` | `uint64` |
4545
| `codeAddr` | `address` |
4646
| `storage` | `List[Tuple[uint256, uint256]]` |
4747
| `data` | `bytes` |
48-
| `value` | `int256` |
48+
| `value` | `uint256` |
4949
| `accessList` | `List[Tuple[address, List[uint256]]]` |
5050
| `yParity` | `uint8` |
5151
| `r` | `uint256` |
@@ -63,7 +63,7 @@ A migration transaction is considered valid if the follow properties hold:
6363
* the code at `codeAddr` is less than the [EIP-170](./eip-170.md) limit of `24576`
6464
* the code at `codeAddr` must not have size `0`
6565

66-
The intrinsic gas calculation modified from [EIP-1559](./eip-1559.md) to be `21000 + 16 * non-zero calldata bytes + 4 * zero calldata bytes + 1900 * access list storage key count + 2400 * access list address count + 15000 * length of storage`.
66+
The intrinsic gas calculation modified from [EIP-1559](./eip-1559.md) to be `21000 + 16 * non-zero calldata bytes + 4 * zero calldata bytes + 1900 * access list storage key count + 2400 * access list address count + 20000 * length of storage`.
6767

6868
#### Processing
6969

@@ -91,7 +91,7 @@ Naively, one could design the migration transaction to have a field `code` of ty
9191

9292
### Cheaper storage
9393

94-
Allowing cheaper storage in this instance acts as a reward to users who migrate their EOAs to smart contract wallets.
94+
Since the storage is guaranteed to be empty, there is no need to read before write. This means only 20,000 gas is needed to pay for the [EIP-2200](./eip-2200.md) `SSTORE_SET_GAS` value. This is a small discount to the normal cost of `22,100`, which is `SSTORE_SET_GAS` plus the [EIP-2929](./eip-2929.md) `COLD_SLOAD_COST` of `2100`, because no load occurs.
9595

9696
### Intrinsic does not account for contract deployment
9797

@@ -113,8 +113,19 @@ No backward compatibility issues found.
113113

114114
## Security Considerations
115115

116+
### Blind Signing
117+
116118
As with all sufficiently sophisticated account designs, if a user can be convinced to sign an arbitrary message, that message could be a migration transaction which is owned by a malicious actor instead of the user. This can generally be avoided if wallets treat these transactions with *extreme* care and create as much friction and verification as possible before completing the signature.
117119

120+
### On `ecrecover`
121+
122+
Applications standards such as [ERC-2612: Permit Extension](./eip-2612.md) have exploited the cryptographic relationship between EOA addresses and their private keys. Many tokens today support this extension, allowing EOAs to approve the transfer of fund from their account using only a signature. Although collisions between EOAs and contract accounts are considered unlikely and [maybe impossible](./eip-3607.md) given today's computing power, this EIP would make it common place for private keys to exist for contract accounts. There are some considerations here regarding security:
123+
124+
* The obvious attack is a defi protocol deploys some their contract using this EIP and later sign an [ERC-2612](./eip-2612.md) message to steal the funds accrued in the contract. This can be avoided by wallets simply not allowing users to interact with protocols deployed in this manner.
125+
* It's also worth mentioning that there are concerns around how this EIP will affect the cross chain experience. Ultimately a users private key may still have some control over the account's assets, depending on the exact protocols used on Ethereum and on other chains. It isn't really possible perfectly migrate the EOA at the same time, on all chains. The best thing that can be done is to educate the user that just because their account has been migrated doesn't mean that they are safe to now publicly reveal their private key. This seems like a reasonable request, especially since they'll want to retain the private key in case they want to use the address on any other EVM-like chain.
126+
127+
Something that may alleviate these issues to some degree would be to add an `EXTCODEHASH` check in `ecrecover`. If the recovered account has code, the precompile will revert. This would disallow migrated EOAs from using standards like [ERC-2612](./eip-2612.md).
128+
118129
## Copyright
119130

120131
Copyright and related rights waived via [CC0](../LICENSE.md).

0 commit comments

Comments
 (0)