Skip to content

Commit 39caeca

Browse files
committed
Merge branch 'bls_keystore' of github.com:CarlBeek/EIPs into bls_keystore
* 'bls_keystore' of github.com:CarlBeek/EIPs: (47 commits) fix link to heading Fix spelling Fix email address Draft EIP: BLS12-381 Deterministic Account Hierarchy (ethereum#2334) Fix some URLs and require 2333 too Add name to metadata title (ethereum#2370) Draft: BLS12-381 Key Generation (ethereum#2333) Automatically merged updates to draft EIP(s) (ethereum#2397) Hard fork proposal to address the Ice age (ethereum#2387) Automatically merged updates to draft EIP(s) 1767 (ethereum#2262) EIP-2021: Payoutable Token (ethereum#2021) EIP-2009: Compliance Service (ethereum#2009) EIP-2019: Fundable Token (ethereum#2019) Use solidity/javascript highlighting in various EIPs (ethereum#2372) EIP-2018: Clearable Token (ethereum#2018) EIP-1996: Holdable token (ethereum#1996) Fix the username of @pizza-r0b in EIP-2309 (ethereum#2389) Clarify that empty accounts also return 0 in EIP-1052 (ethereum#2388) dType Functions Extension - Decentralized Type System for EVM (ethereum#2267) Fix spelling of GitHub [R4R] (ethereum#2369) ...
2 parents 54452bf + 537f2dc commit 39caeca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2624
-761
lines changed

EIPS/eip-1.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ In addition to making sure your idea is original, it will be your role as the au
5656

5757
For Core EIPs, given that they require client implementations to be considered **Final** (see "EIPs Process" below), you will need to either provide an implementation for clients or convince clients to implement your EIP.
5858

59-
The best way to get client implementers to review your EIP is to present it on an AllCoreDevs call. You can request to do so by posting a comment linking your EIP on an [AllCoreDevs agenda Github Issue].
59+
The best way to get client implementers to review your EIP is to present it on an AllCoreDevs call. You can request to do so by posting a comment linking your EIP on an [AllCoreDevs agenda GitHub Issue].
6060

6161
The AllCoreDevs call serve as a way for client implementers to do three things. First, to discuss the technical merits of EIPs. Second, to gauge what other clients will be implementing. Third, to coordinate EIP implementation for network upgrades.
6262

@@ -249,7 +249,7 @@ For each new EIP that comes in, an editor does the following:
249249

250250
- Read the EIP to check if it is ready: sound and complete. The ideas must make technical sense, even if they don't seem likely to get to final status.
251251
- The title should accurately describe the content.
252-
- Check the EIP for language (spelling, grammar, sentence structure, etc.), markup (Github flavored Markdown), code style
252+
- Check the EIP for language (spelling, grammar, sentence structure, etc.), markup (GitHub flavored Markdown), code style
253253

254254
If the EIP isn't ready, the editor will send it back to the author for revision, with specific instructions.
255255

@@ -314,7 +314,7 @@ See [the revision history for further details](https://github.com/ethereum/EIPs/
314314
[Bitcoin's BIP-0001]: https://github.com/bitcoin/bips
315315
[Python's PEP-0001]: https://www.python.org/dev/peps/
316316
[the Ethereum Magicians forum]: https://ethereum-magicians.org/
317-
[AllCoreDevs agenda Github Issue]: https://github.com/ethereum/pm/issues
317+
[AllCoreDevs agenda GitHub Issue]: https://github.com/ethereum/pm/issues
318318

319319
## Copyright
320320

EIPS/eip-1052.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ status: Final
77
type: Standards Track
88
category: Core
99
created: 2018-05-02
10+
requires: 161
1011
---
1112

1213
## Abstract
@@ -24,7 +25,7 @@ takes one argument from the stack, zeros the first 96 bits
2425
and pushes to the stack the keccak256 hash of the code of the account
2526
at the address being the remaining 160 bits.
2627

27-
In case the account does not exist `0` is pushed to the stack.
28+
In case the account does not exist or is empty (as defined by [EIP-161](https://eips.ethereum.org/EIPS/eip-161)) `0` is pushed to the stack.
2829

2930
In case the account does not have code the keccak256 hash of empty data
3031
(i.e. `c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470`)

EIPS/eip-1062.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ When mapping the IPFS base58 string to ENS resolver, first we convert the Base58
3636
## Rationale
3737
To implement the specification, need two methods from ENS public resolver contract, when we want to store IPFS file fingerprint to contract, convert the Base58 string identifier to the hex format and invoke the `setMultihash` method below :
3838

39-
```
39+
```solidity
4040
function setMultihash(bytes32 node, bytes hash) public only_owner(node);
4141
```
4242

4343
Whenever users need to visit the ENS content, we call the `multihash` method to get the IPFS hex data, transfer to the Base58 format, and return the IPFS resources to use.
4444

45-
```
45+
```solidity
4646
function multihash(bytes32 node) public view returns (bytes);
4747
```
4848

@@ -52,7 +52,7 @@ To implement the way to transfer from base58 to hex format and the reverse one,
5252
The library link : [https://www.npmjs.com/package/multihashes](https://www.npmjs.com/package/multihashes)
5353
To implement the method transfer from IPFS(Base58) to hex format :
5454

55-
```
55+
```javascript
5656
import multihash from 'multihashes'
5757

5858
export const toHex = function(ipfsHash) {
@@ -63,7 +63,7 @@ export const toHex = function(ipfsHash) {
6363

6464
To implement the method transfer from hex format to IPFS(Base58) :
6565

66-
```
66+
```javascript
6767
import multihash from 'multihashes'
6868

6969
export const toBase58 = function(contentHash) {

EIPS/eip-1077.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ In order to be compliant, the transaction **MUST** request to sign a messageHash
5151

5252
The fields **MUST** be concatenated in this order:
5353

54-
```
54+
```solidity
5555
keccak256(
5656
byte(0x19),
5757
byte(0),

EIPS/eip-1108.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ eip: 1108
33
title: Reduce alt_bn128 precompile gas costs
44
author: Antonio Salazar Cardozo (@shadowfiend), Zachary Williamson (@zac-williamson)
55
discussions-to: https://ethereum-magicians.org/t/eip-1108-reduce-alt-bn128-precompile-gas-costs/3206
6-
status: Draft
6+
status: Final
77
type: Standards Track
88
category: Core
99
created: 2018-05-21

EIPS/eip-1132.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The intention with this proposal is to enhance the ERC20 standard with token-loc
4343
I’ve extended the ERC20 interface with the following enhancements:
4444

4545
### Locking of tokens
46-
```
46+
```solidity
4747
/**
4848
* @dev Locks a specified amount of tokens against an address,
4949
* for a specified reason and time
@@ -55,7 +55,7 @@ function lock(bytes32 _reason, uint256 _amount, uint256 _time) public returns (b
5555
```
5656

5757
### Fetching number of tokens locked under each utility
58-
```
58+
```solidity
5959
/**
6060
* @dev Returns tokens locked for a specified address for a
6161
* specified reason
@@ -67,7 +67,7 @@ function lock(bytes32 _reason, uint256 _amount, uint256 _time) public returns (b
6767
```
6868

6969
### Fetching number of tokens locked under each utility at a future timestamp
70-
```
70+
```solidity
7171
/**
7272
* @dev Returns tokens locked for a specified address for a
7373
* specified reason at a specific time
@@ -80,7 +80,7 @@ function lock(bytes32 _reason, uint256 _amount, uint256 _time) public returns (b
8080
```
8181

8282
### Fetching number of tokens held by an address
83-
```
83+
```solidity
8484
/**
8585
* @dev @dev Returns total tokens held by an address (locked + transferable)
8686
* @param _of The address to query the total balance of
@@ -89,7 +89,7 @@ function totalBalanceOf(address _of) view returns (uint256 amount)
8989
```
9090

9191
### Extending lock period
92-
```
92+
```solidity
9393
/**
9494
* @dev Extends lock for a specified reason and time
9595
* @param _reason The reason to lock tokens
@@ -99,7 +99,7 @@ function totalBalanceOf(address _of) view returns (uint256 amount)
9999
```
100100

101101
### Increasing number of tokens locked
102-
```
102+
```solidity
103103
/**
104104
* @dev Increase number of tokens locked for a specified reason
105105
* @param _reason The reason to lock tokens
@@ -108,7 +108,7 @@ function totalBalanceOf(address _of) view returns (uint256 amount)
108108
function increaseLockAmount(bytes32 _reason, uint256 _amount) public returns (bool)
109109
```
110110
### Fetching number of unlockable tokens under each utility
111-
```
111+
```solidity
112112
/**
113113
* @dev Returns unlockable tokens for a specified address for a specified reason
114114
* @param _of The address to query the the unlockable token count of
@@ -117,15 +117,15 @@ function totalBalanceOf(address _of) view returns (uint256 amount)
117117
function tokensUnlockable(address _of, bytes32 _reason) public view returns (uint256 amount)
118118
```
119119
### Fetching number of unlockable tokens
120-
```
120+
```solidity
121121
/**
122122
* @dev Gets the unlockable tokens of a specified address
123123
* @param _of The address to query the the unlockable token count of
124124
*/
125125
function getUnlockableTokens(address _of) public view returns (uint256 unlockableTokens)
126126
```
127127
### Unlocking tokens
128-
```
128+
```solidity
129129
/**
130130
* @dev Unlocks the unlockable tokens of a specified address
131131
* @param _of Address of user, claiming back unlockable tokens

EIPS/eip-1155.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ Another simple way to represent non-fungibles is to allow a maximum value of 1 f
700700
- [The Sandbox - Dual ERC-1155/721 Contract](https://github.com/pixowl/thesandbox-contracts/tree/master/src/Asset)
701701

702702
**Articles & Discussions**
703-
- [Github - Original Discussion Thread](https://github.com/ethereum/EIPs/issues/1155)
703+
- [GitHub - Original Discussion Thread](https://github.com/ethereum/EIPs/issues/1155)
704704
- [ERC-1155 - The Crypto Item Standard](https://blog.enjincoin.io/erc-1155-the-crypto-item-standard-ac9cf1c5a226)
705705
- [Here Be Dragons - Going Beyond ERC-20 and ERC-721 To Reduce Gas Cost by ~80%](https://medium.com/horizongames/going-beyond-erc20-and-erc721-9acebd4ff6ef)
706706
- [Blockonomi - Ethereum ERC-1155 Token Perfect for Online Games, Possibly More](https://blockonomi.com/erc1155-gaming-token/)

EIPS/eip-1191.md

Lines changed: 61 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,31 @@
22
eip: 1191
33
title: Add chain id to mixed-case checksum address encoding
44
author: Juliano Rizzo (@juli)
5-
status: Draft
5+
status: Last Call
6+
review-period-end: 2019-11-18
67
type: Standards Track
78
category: ERC
89
created: 2018-03-18
910
requires: 55, 155
1011
discussions-to: https://github.com/ethereum/EIPs/issues/1121
1112
---
13+
1214
## Simple Summary
1315
This EIP extends EIP-55 by optionally adding a chain id defined by EIP-155 to the checksum calculation.
1416

17+
## Abstract
18+
The EIP-55 was created to prevent users from losing funds by sending them to invalid addresses. This EIP extends EIP-55 to protect users from losing funds by sending them to addresses that are valid but that where obtained from a client of another network.For example, if this EIP is implemented, a wallet can alert the user that is trying to send funds to an Ethereum Testnet address from an Ethereum Mainnet wallet.
19+
20+
## Motivation
21+
The motivation of this proposal is to provide a mechanism to allow software to distinguish addresses from different Ethereum based networks. This proposal is necessary because Ethereum addresses are hashes of public keys and do not include any metadata. By extending the EIP-55 checksum algorithm it is possible to achieve this objective.
22+
1523
## Specification
1624
Convert the address using the same algorithm defined by EIP-55 but if a registered chain id is provided, add it to the input of the hash function. If the chain id passed to the function belongs to a network that opted for using this checksum variant, prefix the address with the chain id and the `0x` separator before calculating the hash. Then convert the address to hexadecimal, but if the ith digit is a letter (ie. it's one of `abcdef`) print it in uppercase if the 4*ith bit of the calculated hash is 1 otherwise print it in lowercase.
1725

1826
## Rationale
1927
Benefits:
2028
- By means of a minimal code change on existing libraries, users are protected from losing funds by mixing addresses of different Ethereum based networks.
29+
2130
## Backwards Compatibility
2231
This proposal is fully backward compatible. The checksum calculation is changed only for new networks that choose to adopt this EIP and add their chain numbers to the Adoption Table included in this document.
2332

@@ -37,43 +46,53 @@ def eth_checksum_encode(addr, chainid=1):
3746
out = addr[:2] + ''.join([c.upper() if int(a,16) >= 8 else c for c,a in aggregate])
3847
return out
3948
```
49+
4050
## Test Cases
4151
```python
42-
eth_mainnet= [
43-
'0x88021160C5C792225E4E5452585947470010289D',
44-
'0x27b1fdb04752bbc536007a920d24acb045561c26',
45-
'0x52908400098527886E0F7030069857D2E4169EE7',
46-
'0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed',
47-
'0x8617E340B3D01FA5F11F306F4090FD50E238070D',
48-
'0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb',
49-
'0xdbF03B407c01E7cD3CBea99509d93f8DDDC8C6FB',
50-
'0xde709f2102306220921060314715629080e2fb77',
51-
'0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359',
52+
eth_mainnet = [
53+
"0x27b1fdb04752bbc536007a920d24acb045561c26",
54+
"0x3599689E6292b81B2d85451025146515070129Bb",
55+
"0x42712D45473476b98452f434e72461577D686318",
56+
"0x52908400098527886E0F7030069857D2E4169EE7",
57+
"0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed",
58+
"0x6549f4939460DE12611948b3f82b88C3C8975323",
59+
"0x66f9664f97F2b50F62D13eA064982f936dE76657",
60+
"0x8617E340B3D01FA5F11F306F4090FD50E238070D",
61+
"0x88021160C5C792225E4E5452585947470010289D",
62+
"0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb",
63+
"0xdbF03B407c01E7cD3CBea99509d93f8DDDC8C6FB",
64+
"0xde709f2102306220921060314715629080e2fb77",
65+
"0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359",
5266
]
5367
rsk_mainnet = [
54-
'0x6549F4939460DE12611948B3F82B88C3C8975323',
55-
'0x27b1FdB04752BBc536007A920D24ACB045561c26',
56-
'0x3599689E6292B81B2D85451025146515070129Bb',
57-
'0x52908400098527886E0F7030069857D2E4169ee7',
58-
'0x5aaEB6053f3e94c9b9a09f33669435E7ef1bEAeD',
59-
'0x8617E340b3D01Fa5f11f306f4090fd50E238070D',
60-
'0xD1220A0Cf47c7B9BE7a2e6ba89F429762E7B9adB',
61-
'0xDBF03B407c01E7CD3cBea99509D93F8Dddc8C6FB',
62-
'0xDe709F2102306220921060314715629080e2FB77',
63-
'0xFb6916095cA1Df60bb79ce92cE3EA74c37c5d359',
68+
"0x27b1FdB04752BBc536007A920D24ACB045561c26",
69+
"0x3599689E6292B81B2D85451025146515070129Bb",
70+
"0x42712D45473476B98452f434E72461577d686318",
71+
"0x52908400098527886E0F7030069857D2E4169ee7",
72+
"0x5aaEB6053f3e94c9b9a09f33669435E7ef1bEAeD",
73+
"0x6549F4939460DE12611948B3F82B88C3C8975323",
74+
"0x66F9664f97f2B50F62d13EA064982F936de76657",
75+
"0x8617E340b3D01Fa5f11f306f4090fd50E238070D",
76+
"0x88021160c5C792225E4E5452585947470010289d",
77+
"0xD1220A0Cf47c7B9BE7a2e6ba89F429762E7B9adB",
78+
"0xDBF03B407c01E7CD3cBea99509D93F8Dddc8C6FB",
79+
"0xDe709F2102306220921060314715629080e2FB77",
80+
"0xFb6916095cA1Df60bb79ce92cE3EA74c37c5d359",
6481
]
65-
rsk_testnet= [
66-
'0x42712D45473476B98452F434E72461577D686318',
67-
'0x27B1FdB04752BbC536007a920D24acB045561C26',
68-
'0x3599689e6292b81b2D85451025146515070129Bb',
69-
'0x52908400098527886E0F7030069857D2e4169EE7',
70-
'0x5aAeb6053F3e94c9b9A09F33669435E7EF1BEaEd',
71-
'0x66f9664F97F2b50f62d13eA064982F936DE76657',
72-
'0x8617e340b3D01fa5F11f306F4090Fd50e238070d',
73-
'0xDE709F2102306220921060314715629080e2Fb77',
74-
'0xFb6916095CA1dF60bb79CE92ce3Ea74C37c5D359',
75-
'0xd1220a0CF47c7B9Be7A2E6Ba89f429762E7b9adB',
76-
'0xdbF03B407C01E7cd3cbEa99509D93f8dDDc8C6fB',
82+
rsk_testnet = [
83+
"0x27B1FdB04752BbC536007a920D24acB045561C26",
84+
"0x3599689e6292b81b2D85451025146515070129Bb",
85+
"0x42712D45473476B98452F434E72461577D686318",
86+
"0x52908400098527886E0F7030069857D2e4169EE7",
87+
"0x5aAeb6053F3e94c9b9A09F33669435E7EF1BEaEd",
88+
"0x6549f4939460dE12611948b3f82b88C3c8975323",
89+
"0x66f9664F97F2b50f62d13eA064982F936DE76657",
90+
"0x8617e340b3D01fa5F11f306F4090Fd50e238070d",
91+
"0x88021160c5C792225E4E5452585947470010289d",
92+
"0xd1220a0CF47c7B9Be7A2E6Ba89f429762E7b9adB",
93+
"0xdbF03B407C01E7cd3cbEa99509D93f8dDDc8C6fB",
94+
"0xDE709F2102306220921060314715629080e2Fb77",
95+
"0xFb6916095CA1dF60bb79CE92ce3Ea74C37c5D359",
7796
]
7897
test_cases = {30 : rsk_mainnet, 31 : rsk_testnet, 1 : eth_mainnet}
7998

@@ -82,19 +101,25 @@ for chainid, cases in test_cases.items():
82101
assert ( addr == eth_checksum_encode(addr,chainid) )
83102
```
84103
## Adoption
104+
85105
### Adoption Table
106+
86107
| Network | Chain id | Supports this EIP |
87-
|--------------|----------|-------------------|
108+
|-|-|-|
88109
| RSK Mainnet | 30 | Yes |
89110
| RSK Testnet | 31 | Yes |
90111

91112
### Implementation Table
92-
| Wallet | Adopted this EIP | Implementation |
93-
|----------------|------------------| -------------- |
113+
114+
| Project | Adopted this EIP | Implementation |
115+
|-|-|-|
94116
| MyCrypto | Yes | [JavaScript](https://github.com/MyCryptoHQ/MyCrypto/blob/develop/common/utils/formatters.ts#L126) |
95117
| MyEtherWallet | Yes | [JavaScript](https://github.com/MyEtherWallet/MyEtherWallet/blob/73c4a24f8f67c655749ac990c5b62efd92a2b11a/src/helpers/addressUtils.js#L22) |
96118
| Ledger | Yes | [C](https://github.com/LedgerHQ/ledger-app-eth/blob/master/src_common/ethUtils.c#L203) |
97119
| Trezor | Yes | [Python](https://github.com/trezor/trezor-core/blob/270bf732121d004a4cd1ab129adaccf7346ff1db/src/apps/ethereum/get_address.py#L32) and [C](https://github.com/trezor/trezor-crypto/blob/4153e662b60a0d83c1be15150f18483a37e9092c/address.c#L62) |
120+
| Web3.js | Yes | [JavaScript](https://github.com/ethereum/web3.js/blob/aaf26c8806bc9fb60cf6dcb6658104963c6c7fc7/packages/web3-utils/src/Utils.js#L140) |
121+
| EthereumJS-util | Yes | [JavaScript](https://github.com/ethereumjs/ethereumjs-util/pull/204/commits/cdf0b3c996b05ac5b1f758f17ea9f9ed1847c1eb) |
122+
| ENS address-encoder | Yes | [TypeScript](https://github.com/ensdomains/address-encoder/commit/5bf53b13fa014646ea28c9e5f937361dc9b40590) |
98123

99124
## Copyright
100125

EIPS/eip-1261.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,9 +295,9 @@ One can think of the set of MVTs as identifying a user, and you cannot split the
295295

296296
The assign and revoke functions' documentation only specify conditions when the transaction MUST throw. Your implementation MAY also throw in other situations. This allows implementations to achieve interesting results:
297297

298-
- **Disallow additional memberships after a condition is met** — Sample contract available on Github
299-
- **Blacklist certain address from receiving MV tokens** — Sample contract available on Github
300-
- **Disallow additional memberships after a certain time is reached** — Sample contract available on Github
298+
- **Disallow additional memberships after a condition is met** — Sample contract available on GitHub
299+
- **Blacklist certain address from receiving MV tokens** — Sample contract available on GitHub
300+
- **Disallow additional memberships after a certain time is reached** — Sample contract available on GitHub
301301
- **Charge a fee to user of a transaction** — require payment when calling `assign` and `revoke` so that condition checks from external sources can be made
302302

303303
**ERC-173 Interface**

EIPS/eip-1319.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Registries may offer more complex `read` APIs that manage requests for packages
170170
No existing standard exists for package registries. The package registry currently deployed by EthPM would not comply with the standard since it implements only one of the method signatures described in the specification.
171171

172172
## Implementation
173-
A reference implementation of this proposal is in active development at the EthPM organization on Github [here](https://github.com/ethpm/escape-truffle).
173+
A reference implementation of this proposal is in active development at the EthPM organization on GitHub [here](https://github.com/ethpm/escape-truffle).
174174

175175
## Copyright
176176
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

0 commit comments

Comments
 (0)