-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ECLIP-?: Byzantium EVM upgrades (and Tx Receipt status) #2
Conversation
Along w/ a few other minor grammatical tweaks
how about we switch to calling forks numbers, and start with this one being :) |
oh i like where your heads at. what about about |
ECLIPs/ECLIP-etcbyz.md
Outdated
|
||
__On Immutability__: Introducing new opcodes in the VM has the potential to change behavior of existing contracts; in the case where previously an arbitrary invalid bytecode series (yielding _invalid opcode_) would now be assigned a meaning, and thus could generate or return a value other than _invalid_. In essence, this means "making music where there was only noise before." There is a concern that this behavior change contradicts an essential promise of Immutability, since an existing failing smart contract is liable to become a succeeding (not failing) contract. In counterargument to this concern are two critical points: | ||
|
||
1. account states remain changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean "unchanged"? Like this is not a DAO refund scenario?
Otherwise I dont think I follow. Also whats the connection with DELEGATECALL
? just the fact that they added an unused opcode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol, yeap, __un__changed
and yea, just sayin that there's a precedent for this kind of change, so an argument against this kind of change should have been taken up with vitalik 4 months before the dao fork
1. account states remain changed | ||
2. the "Homestead" hardfork established a precedent for this type of change, having introduced the `DELEGATECALL` opcode at block 1,150,000. | ||
|
||
With these arguments in place, along with precedence and expectation for other continuing and varied consensus-impacting protocol upgrades (eg soft- and hard-forks), it follows that the definition of Immutability is not extended to guarantee perfect consistency for future _behavior_ of historical account states, but only to only to guarantee the immutability of the account states themselves. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a semantic prospective adding an opcode would be classified as a "non-breaking-change". A feature upgrade. Might be worth pointing out. You do a good job of highlighting the cons to your own ECLIP but I think they all have good pro counter arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's false. Adding an opcode would always be a "breaking change", no matter if you consider old contracts that already contain this opcode, or consider hard fork as a whole.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a hard fork yes. But considering old contracts. This would be a feature upgrade not a major version change (i.e 0.1.0
not 1.0.0
). Any new feature of software will always technically change behavior. But it's only when you look at extreme, un-supported, ways of using it.
Thats even true with the versioning proposal. Adding a 00 byte in front of a contract had a behavior before, it will have a different behavior now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using semantic versioning to consider something as fragile as consensus upgrade is totally unhealthy. Ethereum community's experience tells us that we must consider all upgrades as breaking, regardless how small or how big you think it is. On top of that, we consider what invariant we want to preserve, and what doesn't matter. Otherwise it can easily bring in disaster. You need to especially look out for "extreme, un-supported, ways of using it" and consider them to make sure everything's okay.
Thats even true with the versioning proposal. Adding a 00 byte in front of a contract had a behavior before, it will have a different behavior now
Sure, but do I miss some points you try to claim? Account versioning would of course be a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sorpaas I'm all for being careful 👍. Im just saying that adding useful opcodes likely does not break any intended contract behavior. But I agree that as with any major changes, we should tread lightly and test well.
Prioritize the actual outcomes of the proposed features, not first the case of interoperability. Rel #2 (comment)
Fixes EIP658 name; Tx status code -> receipt status code Co-Authored-By: meowsbits <[email protected]>
Prioritize the actual outcomes of the proposed features, not first the case of interoperability. Rel #2 (comment)
0ea3bc8
to
2108940
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments about the stakeholders:
-This will require careful planning and outreach to different members of the ecosystem, and input from bus dev and marketing. Let's address this on a parallel track so that the core team can focus on the code.
-The move to multi-geth is a big change, which will likely generate resistance from some corners of the community. Nevertheless, we will lead the effort. When it comes to ethereumclassic, we don't have a basis for cooperating with them on this project at this stage. They are welcome to follow our lead, but we're not going to be dependent upon them.
-We will have to include ethereumproject, as it is remains the canonical client. I think over time, there will be a way to do this.
__On Immutability__: Introducing new opcodes in the VM has the potential to change behavior of existing contracts; in the case where previously an arbitrary invalid bytecode series (yielding _invalid opcode_) would now be assigned a meaning, and thus could generate or return a value other than _invalid_. In essence, this means "possibly making music where there was only noise before." There is a concern that this behavior change contradicts an essential promise of Immutability, since an existing failing smart contract is liable to become a succeeding (not failing) contract, albeit in a hypothetical case of extreme coincidence and gross misuse of an opcode. In counterargument to this concern are two critical points: | ||
|
||
1. account states remain unchanged | ||
2. the "Homestead" hardfork established a precedent for this type of change, having introduced the `DELEGATECALL` opcode at block 1,150,000. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. the "Homestead" hardfork established a precedent for this type of change, having introduced the `DELEGATECALL` opcode at block 1,150,000. | |
2. if a person used one of the unimplemented opcodes originally, the behaviour was undefined. In this right - the immutability property remains since the behaviour will be equally undefined once the op code is implemented. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if we make another ECLIP and propose that transactions using invalid / unused opcodes are to be deemed invalid transactions and never included in blocks.
Great work and thanks @meowsbits for putting this together. Lets build some bridges and slurp in some awesome features long the way :) |
Assign a number - |
Fixes typo. Co-Authored-By: meowsbits <[email protected]>
Makes sentence more assertive. Co-Authored-By: meowsbits <[email protected]>
This will require changes to the ECLIP. Either we'll have to include EIP161 (State Trie Clearing) or remove EIP1052. I would recommend the former. |
@meowsbits Many in ETH community would even admit that EIP-161 is not really a well-defined specification, and it has caused a lot of troubles for Byzantium and Constantinople because of the definition of "empty". So please be careful with this choice. I would rather advice let's fix the client or the spec to make sure things work without EIP-161. Or let's fix EIP-161 before deploying it on ETC. |
Trying to understand, is the plan to support three versions of geth and multi-geth? Or will multi-geth be the main focus? You are referring to the Also, for such a major upgrade, it's important to coordinate with Parity and IOHK. Mantis isn't deprecated yet. |
@sorpaas What problems are we inviting down the road if we deviate from how EIP161 was done? As nice as it would be to have this HF happen sooner than later, exploring ways of gently upgrading eip161 before proceeding sounds like a good plan to me. |
one thing Im confused is why 161 wouldnt be applied on multigeth. If it's in geth woudn't it be in multigeth by default? Unless you and wei activly took it out |
@zmitton the feature exists in multi-geth, it's just whether to enable it |
To summarize, it seems the options are:
My humble opinion at this point is that 2 seems the most enticing; EIP161 may be contentious anyways for asymptotic-immutablists since it modifies state. |
lol, wait just a damn second. This proposal doesn't include EIP1052 or EIP161. EIP1052 is for Constantinople. This prop is for Byzantium-related changes only, leaving this concern for another proposal and another time. EDIT: I've updated the OP comment to include the document Abstract. |
__On Immutability__: Introducing new opcodes in the VM has the potential to change behavior of existing contracts; in the case where previously an arbitrary invalid bytecode series (yielding _invalid opcode_) would now be assigned a meaning, and thus could generate or return a value other than _invalid_. In essence, this means "possibly making music where there was only noise before." There is a concern that this behavior change contradicts an essential promise of Immutability, since an existing failing smart contract is liable to become a succeeding (not failing) contract, albeit in a hypothetical case of extreme coincidence and gross misuse of an opcode. In counterargument to this concern are two critical points: | ||
|
||
1. account states remain unchanged | ||
2. the "Homestead" hardfork established a precedent for this type of change, having introduced the `DELEGATECALL` opcode at block 1,150,000. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw...i think there is an unavoidable risk that upgrades with hard forks may break some past smart contracts. If this is the case I think that "no hard forks" or "no innovation" isn't a solution either. If there is a "best practices" way for smart contract devs to keep them within a safe boundary that is their responsibility, similar to the responsibility of exchanges of using more confirmations to minimize double spend risks.
Having said that, the goal of ETC devs should still be to minimize such risk in changes and prioritize "backward compatibility" over change just for the sake of change.
Because this is largely subjective, I guess the ECIP (or new starIP) process, and then deployment by node operators and miners, is a good filter to judge that.
should we take EIP100 into account? |
- Byzantium EVM opcodes and precompiled contracts, namely opcodes `REVERT` (EIP 206/140), `RETURNDATASIZE` (EIP 211), `RETURNDATACOPY` (EIP 211), and `STATICCALL` (EIP 214/116); and precompiled contracts for modular exponentiation, elliptic curve addition, scalar multiplication, and pairing (EIPs 198, 212/197, 213/196) | ||
- Replacing the intermediate state root field in transaction receipts with the contract return status (EIP 658). | ||
|
||
This document proposes block `X,XXX,XXX` as the upcoming block height at which to implement these changes in the network, placing the expected date of protocol hardfork date on _XXXX-XX-XX_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs some thought. The release process should allow for a hard-fork on the testnets (Morden, Kotti) at least 4 weeks prior to the mainnet activation. Assuming Byzantium is well tested on Ethereum Foundation network, we can just rephrase this like
This document proposes block `X,XXX,XXX` as the upcoming block height at which to implement these changes in the network, placing the expected date of protocol hardfork date on _XXXX-XX-XX_. | |
This document proposes blocks: | |
- `X_XXX_XXX` on Ethereum Classic mainnet | |
- `X_XXX_XXX` on Morden Classic testnet | |
- `X_XXX_XXX` on Kotti Classic testnet |
Edit: date should not be part of the proposal as it is a moving target naturally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That said,
- Ethereum Classic block
8_750_000
will be around Wed, Sept 18, 2019 - Morden Classic block
4_723_000
will be around Wed, Aug 7, 2019 - Kotti Classic block
1_039_000
will be around Wed, Aug 7, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@soc1c can you make this as a suggestion? (cmd+g in the comment box)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit: date should not be part of the proposal as it is a moving target naturally.
Proposing:
This document proposes block `X,XXX,XXX` as the upcoming block height at which to implement these changes in the network, placing the expected date of protocol hardfork date on _XXXX-XX-XX_. |
or?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I said date
.
@chunfu-yang We certainly could consider it. The reason it was not originally included in this spec was because the original impetus for this upgrade set was EVM compatibility, so we had filtered included EIPs according to whether or not they were EVM related. |
@@ -0,0 +1,80 @@ | |||
### ECLIP-?: Support for ETH Byzantium EVM and Protocol Upgrades | |||
|
|||
ECLIP: undecided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
### Motivation | ||
|
||
To enhance the EVM's capabilities by adding 5 opcodes and 4 precompiled contracts, all of which have been in use on the ETH network since 2017-10-16. Adoption of the "receipt status" feature provides a helpful method for Dapp developers to access the successful or failed state of a contract. This would (re)establish a greater level of interoperability between Foundation and Classic Ethereum Virtual Machines ("EVM"s), and make a wider array of tooling available for the ETC network (eg. Solidity version, several contract debugging tools). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only 4 opcodes right? Also, the first one is not a sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref #10
Has been replaced by #10, moving there instead. |
Abstract
Add support for a subset of protocol-impacting changes introduced in the Ethereum Foundation (ETH) network via the Byzantium hardfork. The proposed changes include:
REVERT
(EIP 206/140),RETURNDATASIZE
(EIP 211),RETURNDATACOPY
(EIP 211), andSTATICCALL
(EIP 214/116); and precompiled contracts for modular exponentiation, elliptic curve addition, scalar multiplication, and pairing (EIPs 198, 212/197, 213/196)This document proposes block
X,XXX,XXX
as the upcoming block height at which to implement these changes in the network, placing the expected date of protocol hardfork date on XXXX-XX-XX.ECLIP document rendered view: https://github.com/etclabscore/ECLIPs/blob/55c44609b989781ec198855eabeb347c3fc6f2b6/ECLIPs/ECLIP-etcbyz.md
See here for background comments around this idea: ethereumproject/ECIPs#95. But keep in mind that that proposal specs Constantinople EVM changes as well, while those features of that proposal have been dropped here for reasons.
ethereumproject/go-ethereumetclabscore/go-ethereum