Skip to content
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

Support custom EVM versions #11010

Closed
axic opened this issue Feb 24, 2021 · 2 comments
Closed

Support custom EVM versions #11010

axic opened this issue Feb 24, 2021 · 2 comments
Labels
closed due inactivity The issue/PR was automatically closed due to inactivity. protocol design 🔮 Potential changes to ABI, meta data, standard JSON stale The issue/PR was marked as stale because it has been open for too long.

Comments

@axic
Copy link
Member

axic commented Feb 24, 2021

Currently the compiler has a setting for "evm version" (introduced in #1117). This setting is basically tied to the Ethereum mainnet hard forks, i.e. homestead, byzantium, istanbul, etc.

Currently each of these options set a bunch of underlying settings (see libsolutil/EVMVersion):

        /// Has the RETURNDATACOPY and RETURNDATASIZE opcodes.
        bool supportsReturndata() const { return *this >= byzantium(); }
        bool hasStaticCall() const { return *this >= byzantium(); }
        bool hasBitwiseShifting() const { return *this >= constantinople(); }
        bool hasCreate2() const { return *this >= constantinople(); }
        bool hasExtCodeHash() const { return *this >= constantinople(); }
        bool hasChainID() const { return *this >= istanbul(); }
        bool hasSelfBalance() const { return *this >= istanbul(); }
        /// Whether we have to retain the costs for the call opcode itself (false),
        /// or whether we can just forward easily all remaining gas (true).
        bool canOverchargeGasForCall() const { return *this >= tangerineWhistle(); }

Additionally it controls the "code size too big" warning enabled since spuriousDragon.

Since custom EVM versions and custom chains come up as a question/discussion once a year, perhaps for the long term we could consider exposing these underlying settings via standard json.

One way I could think is that the evmVersion setting would set the baseline, and modifying any specific setting would override that. The other option is to introduce a new evmVersion called "custom" and require an explicit value for each of the settings listed above.

This of course does not solve the problem of supporting new features, but allows fine tuning for custom chains. It is unclear however if this would be entirely beneficial for them.

@axic axic added the protocol design 🔮 Potential changes to ABI, meta data, standard JSON label Feb 24, 2021
@cameel cameel added the feature label Feb 27, 2021
@github-actions
Copy link

This issue has been marked as stale due to inactivity for the last 90 days.
It will be automatically closed in 7 days.

@github-actions github-actions bot added the stale The issue/PR was marked as stale because it has been open for too long. label Mar 17, 2023
@github-actions
Copy link

Hi everyone! This issue has been automatically closed due to inactivity.
If you think this issue is still relevant in the latest Solidity version and you have something to contribute, feel free to reopen.
However, unless the issue is a concrete proposal that can be implemented, we recommend starting a language discussion on the forum instead.

@github-actions github-actions bot added the closed due inactivity The issue/PR was automatically closed due to inactivity. label Mar 25, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed due inactivity The issue/PR was automatically closed due to inactivity. protocol design 🔮 Potential changes to ABI, meta data, standard JSON stale The issue/PR was marked as stale because it has been open for too long.
Projects
None yet
Development

No branches or pull requests

3 participants