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

Deprecate support for byzantium and older EVM versions #14591

Merged
merged 3 commits into from
Oct 23, 2023

Conversation

cameel
Copy link
Member

@cameel cameel commented Oct 6, 2023

Resolves #14475.
Depends on #14590. Merged.

@cameel cameel requested review from ekpyron and nikola-matic October 6, 2023 16:02
@cameel cameel self-assigned this Oct 6, 2023
@cameel cameel added the has dependencies The PR depends on other PRs that must be merged first label Oct 6, 2023
@cameel cameel marked this pull request as draft October 6, 2023 16:02
Comment on lines 790 to 795
if (version <= EVMVersion::constantinople())
ret.errors.append(formatError(
Error::Type::Warning,
"general",
"Support for constantinople and older EVM versions is deprecated and will be removed in the future."
));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to put it in the interface (rather than compiler/yul stack) to avoid having to deal with filtering out the warning in soltest. The EVM version is a CLI argument so the warning would be present or missing in every test based on that.

The consequence is that it has no error code and that it won't appear when the use is not through CLI or Standard JSON (which I guess never happens for a normal user). The upside is that I don't have to track what uses the EVM version and instead I issue the warning at the point where the option gets its value.

Changelog.md Outdated Show resolved Hide resolved
Changelog.md Outdated Show resolved Hide resolved
@cameel cameel force-pushed the old-evm-deprecation-warning branch from a59cff0 to 466f7bc Compare October 6, 2023 16:21
@cameel cameel force-pushed the severity-and-color-for-cli-error-messages branch from b6b2262 to 2138478 Compare October 6, 2023 16:21
@cameel cameel force-pushed the severity-and-color-for-cli-error-messages branch from 2138478 to 5ef5c0f Compare October 10, 2023 11:50
@cameel cameel force-pushed the old-evm-deprecation-warning branch 2 times, most recently from b372dc9 to 1bfcbd3 Compare October 10, 2023 13:40
@cameel cameel changed the title Deprecate support for constantinople and older EVM versions Deprecate support for byzantium and older EVM versions Oct 10, 2023
@cameel cameel force-pushed the severity-and-color-for-cli-error-messages branch 2 times, most recently from 16cbce4 to 23b7505 Compare October 16, 2023 13:59
@cameel cameel force-pushed the old-evm-deprecation-warning branch from 1bfcbd3 to 4dc4a56 Compare October 16, 2023 14:13
@ekpyron
Copy link
Member

ekpyron commented Oct 16, 2023

@cameel cameel force-pushed the old-evm-deprecation-warning branch from 4dc4a56 to 0e5790b Compare October 16, 2023 16:34
@cameel
Copy link
Member Author

cameel commented Oct 16, 2023

Done.

Base automatically changed from severity-and-color-for-cli-error-messages to develop October 17, 2023 14:00
@cameel cameel removed the has dependencies The PR depends on other PRs that must be merged first label Oct 19, 2023
@cameel cameel force-pushed the old-evm-deprecation-warning branch from 0e5790b to afd0173 Compare October 19, 2023 15:41
@cameel cameel marked this pull request as ready for review October 19, 2023 16:42
@cameel cameel force-pushed the old-evm-deprecation-warning branch from afd0173 to a333896 Compare October 19, 2023 16:42
Copy link
Collaborator

@matheusaaguiar matheusaaguiar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@nikola-matic nikola-matic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks good, but the wording of "support deprecated" is odd; deprecation is discouragement of use, so if you deprecate something, you're no longer providing support, and are advising against its use.

@@ -147,14 +147,14 @@ Target Options
Below is a list of target EVM versions and the compiler-relevant changes introduced
at each version. Backward compatibility is not guaranteed between each version.

- ``homestead``
- ``homestead`` (*support deprecated*)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Support can't be deprecated, so I'd just change this to

Suggested change
- ``homestead`` (*support deprecated*)
- ``homestead`` (*deprecated*)

Copy link
Member Author

@cameel cameel Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intentionally worded it that way. It's not the EVM version that we're deprecating - we have no control over that and I have no idea if these old EVMs are considered deprecated or not. AFAIK there's no deprecation procedure for hard forks. They just naturally fall out of use. This fuzziness about how relevant they still are is exactly what has been holding us back from doing this deprecation earlier.

What we're doing is deprecating compiler's support for these EVM versions.

I agree that the wording is a bit awkward but I did not find a better way to word it concisely.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, alright, fair enough. Merge away.

@@ -7,6 +7,7 @@ Language Features:
Compiler Features:
* Commandline Interface: Add ``--no-import-callback`` option that prevents the compiler from loading source files not given explicitly on the CLI or in Standard JSON input.
* Commandline Interface: Use proper severity and coloring also for error messages produced outside of the compilation pipeline.
* EVM: Deprecate support for "homestead", "tangerineWhistle", "spuriousDragon" and "byzantium" EVM versions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* EVM: Deprecate support for "homestead", "tangerineWhistle", "spuriousDragon" and "byzantium" EVM versions.
* EVM: Deprecate "homestead", "tangerineWhistle", "spuriousDragon" and "byzantium" EVM versions.

Copy link
Collaborator

@nikola-matic nikola-matic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slapping a change request since it's already approved, and I want to discuss the wording (as explained in the above comments) before it gets merged.

@@ -147,14 +147,14 @@ Target Options
Below is a list of target EVM versions and the compiler-relevant changes introduced
at each version. Backward compatibility is not guaranteed between each version.

- ``homestead``
- ``homestead`` (*support deprecated*)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, alright, fair enough. Merge away.

@cameel cameel force-pushed the old-evm-deprecation-warning branch from a333896 to 28a4567 Compare October 19, 2023 19:51
@nikola-matic
Copy link
Collaborator

Support discontinued?

@cameel
Copy link
Member Author

cameel commented Oct 20, 2023

But it's not discontinued yet. Just deprecated :)

…as well

- Until now it was being removed along with the leading/trailing whitespace that we strip so it did not matter. Now the EVM deprecation warning can get before this warning, preserving the whitespace and making CLI tests fail.
@cameel cameel force-pushed the old-evm-deprecation-warning branch from 28a4567 to 127a390 Compare October 23, 2023 12:41
@cameel cameel enabled auto-merge October 23, 2023 12:48
@cameel cameel merged commit 1b5775a into develop Oct 23, 2023
1 check passed
@cameel cameel deleted the old-evm-deprecation-warning branch October 23, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecation warning for old EVM versions (< constantinople)
4 participants