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

build(nitro-protocol): upgrade Solidity version #1839

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

maxpushka
Copy link

@maxpushka maxpushka commented Jan 3, 2024

Upgrade Solidity version

Body

  • Upgraded and pinned version (with ^) in solidity pragma
  • Updated gas benchmarks
  • Generated adjudicator bindings

Restricting major compiler version allow contract inheritance to compile with higher solidity versions, loosely coupling the versions. Hence, the risk of introducing breaking changes into the project is lowered. Major version increments (as per semantic versioning) usually include changes that are not backwards-compatible. Using the caret symbol helps maintain stability in the project.

How Has This Been Tested?

Tests were run with yarn test


Code quality

  • I have written clear commit messages
  • I have performed a self-review of my own code
  • This change does not have an unduly wide scope
  • I have separated logic changes from refactor changes (formatting, renames, etc.)

Copy link

netlify bot commented Jan 3, 2024

Deploy Preview for nitro-payment-demo canceled.

Name Link
🔨 Latest commit 6087949
🔍 Latest deploy log https://app.netlify.com/sites/nitro-payment-demo/deploys/65957f70fe7f2e00088f9a2f

Copy link

netlify bot commented Jan 3, 2024

👷 Deploy Preview for nitrodocs processing.

Name Link
🔨 Latest commit 6087949
🔍 Latest deploy log https://app.netlify.com/sites/nitrodocs/deploys/65957f702fd71e00089a16b8

@maxpushka maxpushka changed the title build/upgrade solidity build(nitro-protocol): upgrade Solidity version Jan 3, 2024
@NiloCK
Copy link
Contributor

NiloCK commented Jan 5, 2024

Updating compiler target is OK, and I'm also fine with including the ^ modifier.

Q: should all compiler pragmas include the ^? Seems right now like only the "core" contracts / interfaces do.

Problem: after running the tests, this seems to have broken some dependencies.

First guess at root cause is that the simulatedbackend service used in the tests does not implement PUSH0, which was added in 0.8.20. See: https://medium.com/coinmonks/push0-opcode-a-significant-update-in-the-latest-solidity-version-0-8-20-ea028668028a

First guess at a fix would be to update the go-ethereum dependencies that the SimulatedBackend uses.

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