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

solc v0.8.22; shanghai, push0 support #886

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sbillig
Copy link
Collaborator

@sbillig sbillig commented May 17, 2023

What was wrong?

No support for push0, causing the wastage of several gas.

This updates to solc 0.8.22. I think it reduces gas for all simple tests, but unfortunately increases gas usage for the uniswap createPair test. I plan to look into that case and see what's up.

How was it fixed?

solc 0.8.20 0.8.22
evm crate had to be upgraded for tests; to keep the tests working I had to hack around a bunch of changes.
solc fails to generate json for the "irAst" output in cases with a lot of nesting in our generated Yul code, which happens for tests with a lot of asserts (binary_ops.fe and comp_ops.fe, in particular). I had to disable this output. (I'll create an issue for our perhaps less-than-ideal codegen)

@sbillig sbillig force-pushed the solc-0820 branch 3 times, most recently from be4c9ab to 85f61d3 Compare May 19, 2023 05:10
// The simple_open_auction `withdraw` call somehow uses less gas
// than the reported transaction cost.
// We're changing all this testing code anyway so I'm just gonna
// hack around this. Don't know what's going on.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Who am I to judge 😅🤭

@sbillig sbillig marked this pull request as ready for review November 2, 2023 23:40
@cburgdorf
Copy link
Collaborator

If it turns out that this will change the runtime code of the recently deployed contracts, then I will cut two releases just to make sure people have a way to verify the already deployed contracts.

@cburgdorf
Copy link
Collaborator

Ok, I verified that this does indeed result in different bytecode. I'm going to cut a release now without this PR and merge it after that. We can then cut another release shortly before devconnect that includes this and potentially other stuff.

@sbillig sbillig changed the title solc v0.8.20; shanghai, push0 support solc v0.8.22; shanghai, push0 support Nov 3, 2023
@sbillig
Copy link
Collaborator Author

sbillig commented Nov 3, 2023

Ok, I verified that this does indeed result in different bytecode. I'm going to cut a release now without this PR and merge it after that. We can then cut another release shortly before devconnect that includes this and potentially other stuff.

This doesn't have to be merged or released before devconnect; it can wait for some future release. I'm just trying to tie up some loose ends.

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.

2 participants