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

feat(docs): update for solc 0.8.23 support #373

Merged
merged 6 commits into from
Jan 24, 2024

Conversation

richardgreg
Copy link
Contributor

@richardgreg richardgreg commented Jan 7, 2024

πŸ—’οΈ Description

Updated framework tests and docs for solc 0.8.23

πŸ”— Related Issues

#345

βœ… Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

@richardgreg
Copy link
Contributor Author

@danceratopz This is a work in progress. I began by looking at your changes for solc 0.8.22 and replicating them. Making edits to the README and quickstart seemed straightforward. For the others like chore(ci): run macos tox with solc 0.8.22, and chore(fw): enable fw tests in (test_code.py) with solc 0.8.23-dev I wanted your opinion on replicating it like for like with a version bump.

Regarding --yul-optimizations sequence the implementation is to be done in yul.py right? I'm also wondering what the issue is and the logic needed to solve it. Did adding an empty ``--yul-optimizations` lead to an error?

@danceratopz danceratopz added type:feat type: Feature scope:fw Scope: Framework (evm|tools|forks|pytest) labels Jan 17, 2024
@danceratopz
Copy link
Member

@danceratopz This is a work in progress. I began by looking at your changes for solc 0.8.22 and replicating them. Making edits to the README and quickstart seemed straightforward.

Thanks a lot for making a start on this!

For the others like chore(ci): run macos tox with solc 0.8.22, and chore(fw): enable fw tests in (test_code.py) with solc 0.8.23-dev I wanted your opinion on replicating it like for like with a version bump.

Regarding these commits (btw, you can link commit hashes in PR comments for convenience πŸ™‚):

  • chore(fw): enable fw tests in (test_code.py) with solc 0.8.23-dev, d8c63bd: Enabling the "next" version here (this would be 0.8.24 in this PR) allows us (or the Solidity Team) to execute the framework tests (and therefore tox) using the current development version of solc, i.e.:
    pytest -c pytest-framework.ini 
    
    I typically clone the solidity repo and build from develop to test this, see the docs. Let me know if you have any issues.
  • chore(ci): run macos tox with solc 0.8.22 c86cdfa: I think I'd change this entry:
    - os: ubuntu-latest
    python: '3.12'
    solc: '0.8.21'
    evm-type: 'main'
    tox-cmd: 'tox'

    to run with 0.8.23, for now. Our matrix combinations are not exhaustive, but try to cover most configs, although not in isolation. We'll probably have to re-think this strategy at some point or potentially deprecate older versions of solc.

Regarding --yul-optimizations sequence the implementation is to be done in yul.py right? I'm also wondering what the issue is and the logic needed to solve it. Did adding an empty ``--yul-optimizations` lead to an error?

The task here is to work out whether we're doing everything we can to disable the optimizations solc performs when compiling Yul code (and whether anything has changed in this regard in 0.8.23). I've never tried --yul-optimizations; I just spotted it in the release notes and wondered whether we can improve the current situation in execution-spec-tests.

At the moment these are the options we use:

solc_args = (
self.binary,
"--evm-version",
self.evm_version,
*DEFAULT_SOLC_ARGS,

If 0.8.23 makes it easier to disable optimizations, it would be nice to add this. We would only add it to solc for versions >=0.8.23 obviously though.

If you're interested, feel free to dig in. If not, zero worries, we can add this to a separate issue or I can have a look πŸ™‚.

@richardgreg
Copy link
Contributor Author

I've pushed updates. I'd like to dig into the yul optimization task but as a separate task. From what you've stated the solution seems like an if statement that checks if the version is greater than or equal to 0.8.23 and adds --yul-optimizations as a default arg. My knowledge of the program is still superficial so I'd like to use the opportunity to explore the program deeply.

@richardgreg richardgreg changed the title [WIP]feat(docs): update for solc 0.8.23 support feat(docs): update for solc 0.8.23 support Jan 23, 2024
Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me! I just fixed up black and added a changelog entry.

Also thanks for adding #395.

@danceratopz danceratopz merged commit 7feae5b into ethereum:main Jan 24, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:fw Scope: Framework (evm|tools|forks|pytest) type:feat type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants