Skip to content

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

Open
@cameel

Description

@cameel

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.

Metadata

Metadata

Assignees

Labels

bug 🐛low effortThere is not much implementation work to be done. The task is very easy or tiny.low impactChanges are not very noticeable or potential benefits are limited.must have eventuallySomething we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions