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: upgrade solidity 0.8.22 #651

Merged
merged 9 commits into from
Aug 28, 2024
Merged

feat: upgrade solidity 0.8.22 #651

merged 9 commits into from
Aug 28, 2024

Conversation

ilpepepig
Copy link

@ilpepepig ilpepepig commented Aug 25, 2024

Closes DTT-289

About the decision to use ^0.8.19 instead of locking 0.8.22.

The good: don't force integrators to use 0.8.22

  1. Extensions and strategies are meant to be used and inherited by integrators. They might need to use other external contracts as well that have different compiler requirements, for example hedgey vesting contracts or a particular openzeppelin release. For this, locking the compiler version could be limitting.
  2. Integrators can use the latest compiler versions, reducing vulnerability risks and benefitting from optimizations and new features (transient storage for example).
  3. Most EVM chains support PUSH0 by now, which was introduced in 0.8.20 (Shanghai). However, in case someone wants to deploy on a chain which doesn't, allowing to use solidity 0.8.19 gives flexibility to easily do so.

The bad

  1. Even non-breaking updates to solidity can introduce subtle changes that potentially lead to vulnerabilities, so auditing contracts that support many compiler versions requires more effort and won't be able to predict the contracts behavior under new upgrades.

Copy link

linear bot commented Aug 26, 2024

Copy link

@0xAustrian 0xAustrian left a comment

Choose a reason for hiding this comment

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

Looks good!

@0xOneTony 0xOneTony marked this pull request as ready for review August 27, 2024 10:48
Copy link
Member

@thelostone-mc thelostone-mc left a comment

Choose a reason for hiding this comment

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

LGTM but curious if we it make sense to bump the version for others pragma solidity ^0.8.19; to pragma solidity ^0.8.22;
Would there be side-effects cause of this ? @ilpepepig

@ilpepepig
Copy link
Author

LGTM but curious if we it make sense to bump the version for others pragma solidity ^0.8.19; to pragma solidity ^0.8.22; Would there be side-effects cause of this ? @ilpepepig

My main concern was PUSH0 not being supported everywhere, but looking into this https://push0.info/ it seems like all the relevant chains support it already. I guess it won't be an issue to use pragma solidity ^0.8.22 after all.

Other than that, the more compiler versions we support, the more likely integrators won't have issues integrating extensions and strategies with other third party contracts that might lock their contracts at a lower solidity version.

I think I'd rather leave it at pragma solidity ^0.8.19; but I don't have a strong opinion on this. Whatever the rest thinks it's best I'm ok.

@0xOneTony
Copy link

I think it's okey to keep it ^0.8.19 like ilpepe mentioned, we have defined 0.8.22 on foundry.toml so I think this is enough

@0xOneTony 0xOneTony merged commit 2bedcc9 into v2.1 Aug 28, 2024
1 check passed
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.

4 participants