-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Set default evmVersion to paris #4232
Comments
I second that and is also in line with #4137. |
I hadn't seen #4137 but it is definitely related. Using an older Solidity version is not sustainable in the long run though, we should start getting developers used to the notion of diverging EVM versions and the configurability of the EVM target. |
Agreed, what's the best way to approach this from a devex angle? |
My current thinking is that tools should default to the (*): The "lowest common denominator" across all EVM chains will be extremely behind at some point so I think it should be defined relative to a specific set of L1 and L2 chains, probably tracking those with most usage and interest. |
On that topic, there will be soonish a good comparison website that diffs the difference: https://www.evmdiff.com. Maybe this can be incorporated (once it's prod-ready) into the error messages. |
For more context: this issue was opened after we discussed this with @frangio and we agreed that the situation merits an exception to our "we don't change solc's default evm" policy. Otherwise, this can be really frustrating right now. There's an open question regarding when we can remove that default. I don't have a clear answer right now, but I don't think we need to have one atm. |
I don't know if this makes any sense, but what if we say that we change the custom EVM version back to the solc default once the top 10 chains according to TVL adopted |
Yeah, I think something like that probably makes sense. |
I don't think it will be possible to set it back to the default because the EVM will keep evolving (e.g. TSTORE coming soon). But it shouldn't remain in paris forever, it should track the max EVM version supported by all "top 10 chains" or some similar criterion. |
Yeah true, the highest common denominator wrt to the supported EVM versions. |
I created a separate issue for defining and documenting the policy: #4264 |
Released in v2.17.3. |
I think the reversion of default EVM version of the Solidity compiler back to As this particular issue has been closed, I've created a new issue so that some suitable action could be taken: #4391 |
Edit by @fvictorio, original issue below.
We should:
Describe the feature
Solc defaults the
evmVersion
parameter to shanghai since version 0.8.20. The main issue caused by this is that the compiler emits PUSH0 as an opcode. This opcode is supported on Ethereum L1 but as far as I know it hasn't been adopted on any other chain so far (except perhaps Gnosis Chain?). Most notably, it hasn't been adopted by L2s. On all these other chains, the PUSH0 opcode will be seen as an invalid opcode and cause the code to revert.Hardhat relies on the solc default for
evmVersion
. Foundry, for reference, defaults to paris.There is some knowledge about the potential issues caused by using shanghai, but I wouldn't count on it being widely known. At some point we will need to face EVM differences across chains and layers, and setting the default to paris simply delays this. However, setting the default to shanghai at this moment seems premature and is just asking for someone to deploy a broken contract to production.
I suggest to set the default evmVersion to paris if the compiler version is >=0.8.20 and the user hasn't configured it themselves.
Search terms
evmVersion paris shanghai push0
The text was updated successfully, but these errors were encountered: