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

Updating Core smart contracts to Solidity 0.8 #11141

Draft
wants to merge 50 commits into
base: release/core-contracts/12
Choose a base branch
from

Conversation

pahor167
Copy link
Contributor

@pahor167 pahor167 commented Jul 15, 2024

Description

Updating Core smart contracts to Solidity 0.8

What works:

  1. All major core smart contracts are moved to 0.8
  2. Foundry build works
  3. Truffle build works
  4. Foundry tests work

What is yet missing:

  • Truffle migration is broken
  1. There is problem with linking libraries that are now migrated to 0.8 - Currently it is partly fixed but it needs further investigation for Signers library which is currently causing errors when running truffle tests: yarn build:ts && yarn --cwd packages/protocol test common/
  • Anvil devchain migration is broken
  1. Again the problem is with libraries that are build in first step of anvil devchain. I tried to update paths but it needs further investigation.
  • Since OZ broke storage in AddressSet we need to upgrade AddressSet 0.5 to 0.8 manually rather then use OZ 0.8 AddressSet

struct AddressSet { // Position of the value in the values array, plus 1 because index 0 // means a value is not in the set. mapping (address => uint256) index; address[] values; }

vs

struct AddressSet { Set _inner; }

It seems it was design decision rather than security decision which should allow us to simply update AddressSet from 0.5 to 0.8.

@pahor167 pahor167 requested review from a team as code owners July 15, 2024 11:13
@pahor167 pahor167 requested a review from alvarof2 July 15, 2024 11:13
Copy link

gitguardian bot commented Jul 15, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
10538986 Triggered Generic High Entropy Secret f5321bf packages/protocol/scripts/foundry/constants.sh View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@pahor167 pahor167 changed the base branch from master to release/core-contracts/12 July 15, 2024 11:14
@pahor167 pahor167 marked this pull request as draft July 15, 2024 11:15
Copy link

socket-security bot commented Jul 25, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] None 0 109 kB gnsps

🚮 Removed packages: npm/[email protected]

View full report↗︎

@pahor167 pahor167 changed the title Update Governance to Solidity0.8 Updating Core smart contracts to Solidity 0.8 Jul 26, 2024
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.

1 participant