From 81b6bf95ae79219b646b95d8222127605860f9bb Mon Sep 17 00:00:00 2001 From: 5chdn <5chdn@users.noreply.github.com> Date: Wed, 4 Apr 2018 16:27:30 +0200 Subject: [PATCH] Improve formatting --- EIPS/eip-999.md | 61 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/EIPS/eip-999.md b/EIPS/eip-999.md index 3d1f57c7d6cea6..d934db4bb5a0ce 100644 --- a/EIPS/eip-999.md +++ b/EIPS/eip-999.md @@ -10,16 +10,38 @@ created: 2018-04-04 --- ## Simple Summary -This document proposes to restore the contract code of the `WalletLibrary` contract at `0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4` with a patched version. The contract was accidentally self-destructed and renders a significant amount of Ether inaccessible. +This document proposes to restore the contract code of the `WalletLibrary` +contract at `0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4` with a patched version. +The contract was accidentally self-destructed and renders a significant amount +of Ether inaccessible. ## Abstract -The `WalletLibrary` contract was used by the Parity Wallet to reduce gas costs for users deploying multi-signature wallets on the Ethereum blockchain. It contained basic functionality such as confirming or revoking multi-signature transactions for any wallet deployed that depends on this library. The [accidental self-destruction](https://github.com/paritytech/parity/issues/6995) of the library contract caused significant amounts of Ether and other assets to be inaccessible. This proposal suggests restoring the `WalletLibrary` by a [peer-reviewed](https://github.com/paritytech/contracts/pull/74) version to allow the owners of the dependent multi-signature wallets regain access to their assets. +The `WalletLibrary` contract was used by the Parity Wallet to reduce gas costs +for users deploying multi-signature wallets on the Ethereum blockchain. It +contained basic functionality such as confirming or revoking multi-signature +transactions for any wallet deployed that depends on this library. The +[accidental self-destruction](https://github.com/paritytech/parity/issues/6995) +of the library contract caused significant amounts of Ether and other assets to +be inaccessible. This proposal suggests restoring the `WalletLibrary` by a +[peer-reviewed](https://github.com/paritytech/contracts/pull/74) version to +allow the owners of the dependent multi-signature wallets regain access to their +assets. ## Motivation -This proposal is necessary because the Ethereum protocol does not allow the restoration of self-destructed contracts and there is no other simple way to allow the affected users and companies regaining access to their tokens and Ether. In opposite to previously discussed proposals, this will not change any EVM semantics and tries to achieve the goal of unfreezing the funds by a single state transition as specified in the next section. +This proposal is necessary because the Ethereum protocol does not allow the +restoration of self-destructed contracts and there is no other simple way to +enable the affected users and companies regaining access to their tokens and +Ether. In opposite to previously discussed proposals, this will not change any +EVM semantics and tries to achieve the goal of unfreezing the funds by a single +state transition as specified in the next section. ## Specification -The self-destructed contract code at [`0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4`](https://etherscan.io/address/0x863df6bfa4469f3ead0be8f9f2aae51c91a907b4#code) shall be replaced with a patched version of the [`WalletLibrary.sol`](https://github.com/paritytech/contracts/blob/cd115965ac3d7af28bf1daec1a20bf62acf753ea/wallet/WalletLibrary.sol) as reviewed and approved in [paritytech/contracts/#74](https://github.com/paritytech/contracts/pull/74): +The self-destructed contract code at +[`0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4`](https://etherscan.io/address/0x863df6bfa4469f3ead0be8f9f2aae51c91a907b4#code) +shall be replaced with a patched version of the +[`WalletLibrary.sol`](https://github.com/paritytech/contracts/blob/cd115965ac3d7af28bf1daec1a20bf62acf753ea/wallet/WalletLibrary.sol) +as reviewed and approved in +[paritytech/contracts/#74](https://github.com/paritytech/contracts/pull/74): ``` { @@ -30,19 +52,39 @@ The self-destructed contract code at [`0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b } ``` -To verify the byte-code above, a patched version is deployed at [`0xfF7a1D565ff66406639bd45482e0a7d0A82845df`](https://etherscan.io/address/0xff7a1d565ff66406639bd45482e0a7d0a82845df#code) to be reviewed. The compiler settings used can be extracted from the following meta-data: +To verify the byte-code above, a patched version is deployed at +[`0xfF7a1D565ff66406639bd45482e0a7d0A82845df`](https://etherscan.io/address/0xff7a1d565ff66406639bd45482e0a7d0a82845df#code) +to be reviewed. The compiler settings used can be extracted from the following +meta-data: ``` {"compiler":{"version":"0.4.21+commit.dfe3193c"},"language":"Solidity","output":{"abi":[{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"removeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_addr","type":"address"}],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"m_numOwners","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"m_lastDay","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"resetSpentToday","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"m_spentToday","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"addOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"m_required","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_h","type":"bytes32"}],"name":"confirm","outputs":[{"name":"o_success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_owners","type":"address[]"},{"name":"_required","type":"uint256"},{"name":"_daylimit","type":"uint256"}],"name":"init_wallet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newLimit","type":"uint256"}],"name":"setDailyLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"},{"name":"_data","type":"bytes"}],"name":"execute","outputs":[{"name":"o_hash","type":"bytes32"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_operation","type":"bytes32"}],"name":"revoke","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newRequired","type":"uint256"}],"name":"changeRequirement","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_operation","type":"bytes32"},{"name":"_owner","type":"address"}],"name":"hasConfirmed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"ownerIndex","type":"uint256"}],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"kill","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"m_dailyLimit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"}],"name":"Confirmation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"}],"name":"Revoke","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newOwner","type":"address"}],"name":"OwnerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"oldOwner","type":"address"}],"name":"OwnerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newRequirement","type":"uint256"}],"name":"RequirementChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"},{"indexed":false,"name":"created","type":"address"}],"name":"SingleTransact","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"},{"indexed":false,"name":"created","type":"address"}],"name":"MultiTransact","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"operation","type":"bytes32"},{"indexed":false,"name":"initiator","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"data","type":"bytes"}],"name":"ConfirmationNeeded","type":"event"}],"devdoc":{"methods":{}},"userdoc":{"methods":{}}},"settings":{"compilationTarget":{"browser/WalletLibrary.sol":"WalletLibrary"},"evmVersion":"byzantium","libraries":{},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"browser/WalletLibrary.sol":{"keccak256":"0x994e0ff85b760324aceff1620726ef15ae0f65ca4d1f2052a1dc48893fad56a9","urls":["bzzr://2e74c64f43cb12c134e83e584e85889f4af2e845e42256b97a69981f45bd128e"]}},"version":1} ``` ## Rationale -The design decision to restore the `WalletLibrary` contract code in a single state transition was made after lengthy discussions of [alternate proposals](https://gist.github.com/5chdn/a9bb8617cc8523a030126a3d1c60baf3) that explored different ways to improve the Ethereum protocol to allow contract revivals by adding different built-in contracts. It was eventually concluded that all of these proposals changing the EVM semantics around self-destructed contracts were introducing unwanted side-effects and potential risks to the existing smart-contract ecosystem on the Ethereum platform. +The design decision to restore the `WalletLibrary` contract code in a single +state transition was made after lengthy discussions of +[alternate proposals](https://gist.github.com/5chdn/a9bb8617cc8523a030126a3d1c60baf3) +that explored different ways to improve the Ethereum protocol to allow contract +revivals by adding different built-in contracts. It was eventually concluded +that all of these proposals changing the EVM semantics around self-destructed +contracts were introducing unwanted side-effects and potential risks to the +existing smart-contract ecosystem on the Ethereum platform. -It is assumed that this change is aligned with the interests both of (A) Parity Technologies that intended to provide a smart-contracts library for multi-signature wallets to last forever for its users and (B) the users of the multi-signature wallets that meant to safely store their assets in a contract accessible any time they desire. Lastly, the client-side implementation cost of this proposal is estimated to be low. A sample implementation will be attached and linked in the following sections. +It is assumed that this change is aligned with the interests both of (A) Parity +Technologies that intended to provide a smart-contracts library for +multi-signature wallets to last forever for its users and (B) the users of the +multi-signature wallets that meant to safely store their assets in a contract +accessible any time they desire. Lastly, the client-side implementation cost of +this proposal is estimated to be low. A sample implementation will be attached +and linked in the following sections. ## Backwards Compatibility -This proposal introduces backwards incompatibilities in the state of the contract at `0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4`. The Ethereum protocol does not allow the restoration of self-destructed contracts. To implement this on the Ethereum blockchain, it is recommended to add the necessary state transition in a future hard-fork at a well-defined block number. +This proposal introduces backwards incompatibilities in the state of the +contract at `0x863DF6BFa4469f3ead0bE8f9F2AAE51c91A907b4`. The Ethereum protocol +does not allow the restoration of self-destructed contracts. To implement this +on the Ethereum blockchain, it is recommended to add the necessary state +transition in a future hard-fork at a well-defined block number. ## Test Cases To be implemented. @@ -51,4 +93,5 @@ To be implemented. To be implemented. ## Copyright -Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). +Copyright and related rights waived via +[CC0](https://creativecommons.org/publicdomain/zero/1.0/).