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

The experimental flag in CBOR metadata is not set when targeting experimental EVM versions #15835

Open
cameel opened this issue Feb 6, 2025 · 2 comments
Assignees
Labels
bug 🐛 low effort There is not much implementation work to be done. The task is very easy or tiny. low impact Changes are not very noticeable or potential benefits are limited. must have eventually Something we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.

Comments

@cameel
Copy link
Member

cameel commented Feb 6, 2025

Description

Our CBOR metadata includes an experimental flag. Currently we set it when compiling Generic Solidity code (pragma experimental solidity) and when using the EOF backend:

if (experimentalMode || m_eofVersion.has_value())
encoder.pushBool("experimental", true);

However, those are not the only cases where the output of the compiler is experimental though. Most notably, compilation to yet unreleased EVM versions like Prague, Osaka or Amsterdam is always considered experimental. The flag should be set in such cases as well.

Note that just like for EOF, the functionality should be covered with a test (#15663).

Environment

  • Compiler version: 0.8.28

Steps to Reproduce

echo 'contract C {}' | solc/solc - --evm-version prague --bin

Then inspect the CBOR data included at the end of the binary.

@cameel cameel added bug 🐛 low effort There is not much implementation work to be done. The task is very easy or tiny. low impact Changes are not very noticeable or potential benefits are limited. must have eventually Something we consider essential but not enough to prevent us from releasing Solidity 1.0 without it. labels Feb 6, 2025
@cameel
Copy link
Member Author

cameel commented Feb 6, 2025

@kuzdogan Does sourcify make any use of this flag?

I wonder why it's even in CBOR metadata and not in the JSON metadata.

@kuzdogan
Copy link
Member

@cameel No particular use case from our side. And good point, this should've been in the metadata.json too.

Added the point to ethereum/sourcify#1523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 low effort There is not much implementation work to be done. The task is very easy or tiny. low impact Changes are not very noticeable or potential benefits are limited. must have eventually Something we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.
Projects
None yet
Development

No branches or pull requests

3 participants