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

fix: crosschain merge conflicts #88

Merged
merged 55 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
00f965d
dependabot(docker): bump ethereum/client-go in /ops-bedrock (#12229)
dependabot[bot] Oct 2, 2024
c54044f
fix(ct): error in deploy script (#12264)
smartcontracts Oct 2, 2024
91f67eb
op-program: Increase timeout for the verify job. (#12267)
ajsutton Oct 2, 2024
b117186
Move serialize from cannon to op-service (#12265)
mininny Oct 2, 2024
c8a9533
feat: Add ChainAssertions for deploySuperchain contracts (#12271)
maurelian Oct 2, 2024
83b91d9
feat(ct): add SOLIDITY_UPGRADES document (#12272)
smartcontracts Oct 2, 2024
daff281
maint(ci): add kontrol build to CI (#12266)
smartcontracts Oct 2, 2024
82cb8ff
Update op-geth depdency to 1.14.11 base (#12262)
0x00101010 Oct 2, 2024
a83c375
op-deployer: Test for existing OPCM (#12257)
mslipper Oct 3, 2024
f538497
op-deployer: Update artifacts url (#12278)
mslipper Oct 3, 2024
35426c1
maint(ct): move EAS contracts into vendor folder (#12277)
smartcontracts Oct 3, 2024
8eada51
Add error codes to ChainAssertions (#12279)
maurelian Oct 3, 2024
ce13164
dependabot(gomod): bump github.com/multiformats/go-multiaddr-dns (#12…
dependabot[bot] Oct 3, 2024
ae47d36
feat: deletes unused FPACOPS scripts (#12283)
maurelian Oct 3, 2024
6cf6cd1
Fix typos in dastate.go (#12223)
karlb Oct 3, 2024
c4119f1
feat: allow block time override (#12276)
mds1 Oct 3, 2024
1ab9775
doc: remove deleted .yml path (#12285)
r4525532 Oct 3, 2024
13d116a
feat: Delete scripts/fpac dir (#12286)
maurelian Oct 3, 2024
9e7d1ef
Update README.md (#12288)
raffaelemazzitelli Oct 3, 2024
a9f8330
Update SECURITY.md (#12290)
raffaelemazzitelli Oct 3, 2024
9c91fff
feat(ci): add local semgrep scanning (#12281)
smartcontracts Oct 3, 2024
6014026
Update SECURITY.md (#12293)
raffaelemazzitelli Oct 3, 2024
711bc7c
cannon: Fix 64-bit memory access (#12259)
Inphi Oct 3, 2024
b02dba0
Add binary deserialization to asterisc's state converter trace functi…
mininny Oct 4, 2024
289f074
feat: better e2e deploy check (#12309)
tynes Oct 4, 2024
0a40d05
feat: Replace deployImplementations with call to DeployImplementation…
maurelian Oct 4, 2024
7789e6a
feat: Add OPCM to deployImplementations (#12287)
maurelian Oct 4, 2024
f2096a6
dependabot(gomod): bump golang.org/x/time from 0.6.0 to 0.7.0 (#12327)
dependabot[bot] Oct 4, 2024
035129d
feat: Move DEFAULT_STARTING_ANCHOR_ROOTS to Constants library (#12332)
maurelian Oct 4, 2024
ca604d5
contracts: update chain assertions (#12323)
tynes Oct 4, 2024
f9a3052
Update SECURITY.md (#12294)
raffaele-oplabs Oct 5, 2024
8636b6e
feat: add sol-style-doc-comment locally (#12343)
smartcontracts Oct 5, 2024
df25b1f
feat(ci): allow solc warnings on tests (#12292)
maurelian Oct 5, 2024
1f62270
dependabot(gomod): bump golang.org/x/crypto from 0.27.0 to 0.28.0 (#1…
dependabot[bot] Oct 5, 2024
e9b5eeb
feat: add sol-expectrevert-no-args locally (#12342)
smartcontracts Oct 5, 2024
e165a7e
contracts: clean up deploy script abstractions (#12336)
tynes Oct 5, 2024
5a155ee
maint(ci): clean up semgrep rules and ignores (#12347)
smartcontracts Oct 6, 2024
8917511
feat(ci): use foundry profiles to set fuzz parameters (#12346)
smartcontracts Oct 6, 2024
d062c1c
Remove AddSingularBatch from ChannelOut interface (prefer AddBlock) (…
mdehoog Oct 7, 2024
f33a0a9
increase metric properly when blocks are requeued (#12326)
geoknee Oct 7, 2024
981ee6a
feat: add sol-style-malformed-require locally (#12340)
smartcontracts Oct 7, 2024
b460aa2
contracts-bedrock: cleanup `FeeVault` (#12338)
tynes Oct 7, 2024
35bbd80
contracts-bedrock: fixes `OptimismMintableERC721Factory` test (#12306)
tynes Oct 7, 2024
6d874d5
feat: add sol-style-malformed-revert locally (#12341)
smartcontracts Oct 7, 2024
fb8ac6b
feat(ct): add checks for unused imports (#12348)
smartcontracts Oct 7, 2024
a85ff0a
ci: Fix proofs team CI notification group name (#12362)
pauldowman Oct 7, 2024
77c91d0
fix(ci): add unused imports check to ci (#12360)
smartcontracts Oct 7, 2024
b4171c3
fix(ci): add MIPSInstructions as exception (#12361)
smartcontracts Oct 7, 2024
078e016
OPCM: DepolyOPChain additional testing checks. (#12355)
blmalone Oct 7, 2024
c938fdf
devnet: fix build issue (#12364)
tynes Oct 7, 2024
2412379
fix(ct): deploy MIPS2 properly (#12365)
smartcontracts Oct 8, 2024
8cb56d9
feat: add semgrep-scan-local to justfile (#12366)
smartcontracts Oct 8, 2024
fb7f306
op-program: Avoid parsing op-sepolia and op-mainnet rollup and chain …
ajsutton Oct 8, 2024
9f49b43
Merge branch 'develop' into fix/crosschain-merge-conflicts
agusduha Oct 8, 2024
ab1e074
fix: remove unused imports
agusduha Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 62 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ jobs:
condition: <<parameters.notify>>
steps:
- notify-failures-on-develop:
mentions: "@proofs-squad"
mentions: "@proofs-team"

cannon-build-test-vectors:
docker:
Expand Down Expand Up @@ -302,6 +302,28 @@ jobs:
- ".devnet-mt-cannon"
- notify-failures-on-develop

check-kontrol-build:
docker:
- image: <<pipeline.parameters.ci_builder_image>>
resource_class: xlarge
steps:
- checkout
- attach_workspace: { at: "." }
- install-contracts-dependencies
- check-changed:
patterns: contracts-bedrock
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Run Kontrol build
command: just kontrol-summary-full
working_directory: packages/contracts-bedrock
- run:
name: Build Kontrol summary files
command: forge build ./test/kontrol/proofs
working_directory: packages/contracts-bedrock
- notify-failures-on-develop

docker-build:
environment:
DOCKER_BUILDKIT: 1
Expand Down Expand Up @@ -594,6 +616,10 @@ jobs:
description: Timeout for running tests
type: string
default: 15m
test_profile:
description: Profile to use for testing
type: string
default: ci
parallelism: <<parameters.test_parallelism>>
steps:
- checkout
Expand Down Expand Up @@ -641,11 +667,9 @@ jobs:
TEST_FILES=$(echo "$TEST_FILES" | circleci tests split --split-by=timings)
TEST_FILES=$(echo "$TEST_FILES" | sed 's|^test/||')
MATCH_PATH="./test/{$(echo "$TEST_FILES" | paste -sd "," -)}"
export FOUNDRY_INVARIANT_RUNS=<<parameters.test_invariant_runs>>
export FOUNDRY_INVARIANT_DEPTH=<<parameters.test_invariant_depth>>
forge test --deny-warnings --fuzz-runs <<parameters.test_fuzz_runs>> --match-path "$MATCH_PATH"
forge test --match-path "$MATCH_PATH"
environment:
FOUNDRY_PROFILE: ci
FOUNDRY_PROFILE: <<parameters.test_profile>>
working_directory: packages/contracts-bedrock
no_output_timeout: <<parameters.test_timeout>>
- run:
Expand Down Expand Up @@ -697,6 +721,8 @@ jobs:
command: interfaces-check-no-build
- run-contracts-check:
command: size-check
- run-contracts-check:
command: unused-imports-check-no-build

contracts-bedrock-validate-spacers:
docker:
Expand Down Expand Up @@ -868,9 +894,14 @@ jobs:
module:
description: Go Module Name
type: string
uses_artifacts:
description: Uses contract artifacts
type: boolean
default: false
docker:
- image: <<pipeline.parameters.ci_builder_image>>
resource_class: xlarge
circleci_ip_ranges: true
steps:
- checkout
- restore_cache:
Expand All @@ -881,6 +912,10 @@ jobs:
keys:
- golang-build-cache-test-<<parameters.module>>-{{ checksum "go.sum" }}
- golang-build-cache-test-
- when:
condition: <<parameters.uses_artifacts>>
steps:
- attach_workspace: { at: "." }
- run:
name: Install components
command: |
Expand All @@ -892,7 +927,7 @@ jobs:
- run:
name: run tests
command: |
gotestsum --format=testname --junitfile=/tmp/test-results/<<parameters.module>>.xml --jsonfile=/tmp/testlogs/log.json \
ENABLE_ANVIL=true SEPOLIA_RPC_URL="https://ci-sepolia-l1.optimism.io" gotestsum --format=testname --junitfile=/tmp/test-results/<<parameters.module>>.xml --jsonfile=/tmp/testlogs/log.json \
-- -parallel=8 -coverpkg=github.com/ethereum-optimism/optimism/... -coverprofile=coverage.out ./...
working_directory: <<parameters.module>>
- save_cache:
Expand Down Expand Up @@ -1109,7 +1144,7 @@ jobs:
exit 1
fi
- notify-failures-on-develop:
mentions: "@proofs-squad"
mentions: "@proofs-team"

cannon-stf-verify:
docker:
Expand Down Expand Up @@ -1144,6 +1179,9 @@ jobs:
diff_branch:
type: string
default: develop
scan_command:
type: string
default: semgrep ci --timeout=100
environment:
TEMPORARY_BASELINE_REF: << parameters.diff_branch >>
SEMGREP_REPO_URL: << pipeline.project.git_url >>
Expand Down Expand Up @@ -1175,7 +1213,7 @@ jobs:
# --timeout (in seconds) limits the time per rule and file.
# SEMGREP_TIMEOUT is the same, but docs have conflicting defaults (5s in CLI flag, 1800 in some places)
# https://semgrep.dev/docs/troubleshooting/semgrep-app#if-the-job-is-aborted-due-to-taking-too-long
command: semgrep ci --timeout=100
command: << parameters.scan_command >>
# If semgrep hangs, stop the scan after 20m, to prevent a useless 5h job
no_output_timeout: 20m
- notify-failures-on-develop
Expand Down Expand Up @@ -1233,7 +1271,7 @@ jobs:
make verify-sepolia
working_directory: op-program
- notify-failures-on-develop:
mentions: "@proofs-squad"
mentions: "@proofs-team"

op-program-compat:
docker:
Expand Down Expand Up @@ -1354,6 +1392,9 @@ workflows:
- contracts-bedrock-build:
# Build with just core + script contracts.
skip_pattern: test
- check-kontrol-build:
requires:
- contracts-bedrock-build
- contracts-bedrock-tests:
# Test everything except PreimageOracle.t.sol since it's slow.
name: contracts-bedrock-tests
Expand All @@ -1370,9 +1411,7 @@ workflows:
test_parallelism: 1
test_list: git diff origin/develop...HEAD --name-only -- './test/**/*.t.sol' | sed 's|packages/contracts-bedrock/||'
test_timeout: 1h
test_fuzz_runs: 10000
test_invariant_runs: 128
test_invariant_depth: 512
test_profile: ciheavy
- contracts-bedrock-coverage
- contracts-bedrock-checks:
requires:
Expand All @@ -1381,6 +1420,9 @@ workflows:
requires:
- contracts-bedrock-build
- semgrep-scan
- semgrep-scan:
name: semgrep-scan-local
scan_command: semgrep scan --timeout=100 --config=./.semgrep --error .
- go-lint:
requires:
- go-mod-download
Expand Down Expand Up @@ -1416,7 +1458,6 @@ workflows:
parameters:
module:
- op-batcher
- op-chain-ops
- op-node
- op-proposer
- op-challenger
Expand All @@ -1428,6 +1469,13 @@ workflows:
- go-test:
name: semver-natspec-tests
module: packages/contracts-bedrock/scripts/checks/semver-natspec
- go-test:
name: op-chain-ops-tests
module: op-chain-ops
uses_artifacts: true
requires:
- go-mod-download
- contracts-bedrock-build
- go-test-kurtosis:
name: op-chain-ops-integration
module: op-chain-ops
Expand Down Expand Up @@ -1680,7 +1728,7 @@ workflows:
target: test-cannon
parallelism: 8
notify: true
mentions: "@proofs-squad"
mentions: "@proofs-team"
requires:
- contracts-bedrock-build
- cannon-prestate
Expand Down
83 changes: 83 additions & 0 deletions .semgrep/sol-rules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
rules:
- id: sol-safety-deployutils-args
languages: [solidity]
severity: ERROR
message: _args parameter should be wrapped with DeployUtils.encodeConstructor
pattern-regex: DeployUtils\.(create1|create2|create1AndSave|create2AndSave)\s*\(\s*\{[^}]*?_args\s*:\s*(?!\s*DeployUtils\.encodeConstructor\()\s*[^}]*?\}\s*\)

- id: sol-style-input-arg-fmt
languages: [solidity]
severity: ERROR
message: Named inputs to functions must be prepended with an underscore
pattern-regex: function\s+\w+\s*\(\s*([^)]*?\b\w+\s+(?!_)(?!memory\b)(?!calldata\b)(?!storage\b)(?!payable\b)\w+\s*(?=,|\)))
paths:
exclude:
- op-chain-ops/script/testdata/scripts/ScriptExample.s.sol
- packages/contracts-bedrock/scripts/libraries/Solarray.sol
- packages/contracts-bedrock/scripts/interfaces/IGnosisSafe.sol
- packages/contracts-bedrock/src/universal/interfaces/IWETH.sol
- packages/contracts-bedrock/src/universal/WETH98.sol
- packages/contracts-bedrock/src/L2/interfaces/ISuperchainWETH.sol
- packages/contracts-bedrock/src/L2/SuperchainWETH.sol
- packages/contracts-bedrock/src/governance/interfaces/IGovernanceToken.sol
- packages/contracts-bedrock/src/governance/GovernanceToken.sol

- id: sol-style-return-arg-fmt
languages: [solidity]
severity: ERROR
message: Named return arguments to functions must be appended with an underscore
pattern-regex: returns\s*(\w+\s*)?\(\s*([^)]*?\b\w+\s+(?!memory\b)(?!calldata\b)(?!storage\b)(?!payable\b)\w+(?<!_)\s*(?=,|\)))
paths:
exclude:
- op-chain-ops/script/testdata/scripts/ScriptExample.s.sol
- packages/contracts-bedrock/scripts/libraries/Solarray.sol
- packages/contracts-bedrock/scripts/interfaces/IGnosisSafe.sol
- packages/contracts-bedrock/src/dispute/interfaces/IPermissionedDisputeGame.sol
- packages/contracts-bedrock/src/dispute/interfaces/IFaultDisputeGame.sol

- id: sol-style-doc-comment
languages: [solidity]
severity: ERROR
message: Javadoc-style comments are not allowed, use `///` style doc comments instead
pattern-regex: (\/\*\*\n(\s+\*\s.*\n)+\s+\*\/)

- id: sol-expectrevert-no-args
languages: [solidity]
severity: ERROR
message: vm.expectRevert() must specify the revert reason
patterns:
- pattern: vm.expectRevert()

- id: sol-style-malformed-require
languages: [solidity]
severity: ERROR
message: Require statement style is malformed
patterns:
- pattern: require(..., $ERR);
- pattern-not: require($ERR);
- focus-metavariable: $ERR
- pattern-not-regex: \"(\w+:\s[^"]+)\"
- pattern-not-regex: string\.concat\(\"(\w+:\s[^"]+)\"\,[^"]+\)
- pattern-not-regex: \"([a-zA-Z0-9\s]+-[a-zA-Z0-9\s]+)\"
- pattern-not-regex: \"([a-zA-Z0-9\s]+-[a-zA-Z0-9\s]+-[a-zA-Z0-9\s]+)\"
paths:
exclude:
- packages/contracts-bedrock/src/libraries/Bytes.sol
- packages/contracts-bedrock/src/legacy/LegacyMintableERC20.sol
- packages/contracts-bedrock/src/cannon/MIPS.sol
- packages/contracts-bedrock/src/cannon/MIPS2.sol
- packages/contracts-bedrock/src/cannon/libraries/MIPSMemory.sol
- packages/contracts-bedrock/src/cannon/libraries/MIPSInstructions.sol

- id: sol-style-malformed-revert
languages: [solidity]
severity: ERROR
message: Revert statement style is malformed
patterns:
- pattern: revert($MSG);
- pattern-not: revert $ERR(...);
- focus-metavariable: $MSG
- pattern-not-regex: \"(\w+:\s[^"]+)\"
paths:
exclude:
- packages/contracts-bedrock/src/cannon/libraries/MIPSInstructions.sol
27 changes: 1 addition & 26 deletions .semgrepignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ vendor/
*.min.js

# Common test paths
# TODO: Tests should conform to semgrep too.
test/
tests/

Expand All @@ -17,29 +18,3 @@ tests/

# Semgrep-action log folder
.semgrep_logs/

op-chain-ops/script/testdata
op-chain-ops/script/testdata/scripts/ScriptExample.s.sol

packages/*/node_modules
packages/*/test

# TODO: Define these exclusions inside of the semgrep rules once those rules
# are all defined locally in the repository instead of the semgrep app.

# Contracts: autogenerated solidity library
packages/contracts-bedrock/scripts/libraries/Solarray.sol

# Contracts: vendor interfaces
packages/contracts-bedrock/scripts/interfaces/IGnosisSafe.sol
packages/contracts-bedrock/src/EAS/

# Contracts: deliberate exclusions
packages/contracts-bedrock/src/universal/WETH98.sol
packages/contracts-bedrock/src/universal/interfaces/IWETH.sol
packages/contracts-bedrock/src/L2/SuperchainWETH.sol
packages/contracts-bedrock/src/L2/interfaces/ISuperchainWETH.sol
packages/contracts-bedrock/src/governance/GovernanceToken.sol
packages/contracts-bedrock/src/governance/interfaces/IGovernanceToken.sol
packages/contracts-bedrock/src/dispute/interfaces/IFaultDisputeGame.sol
packages/contracts-bedrock/src/dispute/interfaces/IPermissionedDisputeGame.sol
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ Also, all labels can be seen by visiting the [labels page][labels]

When altering label names or deleting labels there are a few things you must be aware of.

- This may affect the mergify bot's use of labels. See the [mergify config](.github/mergify.yml).
- If the https://github.com/ethereum-optimism/optimism/labels/S-stale label is altered, the [close-stale](.github/workflows/close-stale.yml) workflow should be updated.
- If the https://github.com/ethereum-optimism/optimism/labels/M-dependabot label is altered, the [dependabot config](.github/dependabot.yml) file should be adjusted.
- Saved label filters for project boards will not automatically update. These should be updated if label names change.
Expand Down
8 changes: 4 additions & 4 deletions bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,7 @@ def devnet_deploy(paths):
wait_for_rpc_server('127.0.0.1:9545')

# Print out the addresses being used for easier debugging.
l2_output_oracle = addresses['L2OutputOracleProxy']
dispute_game_factory = addresses['DisputeGameFactoryProxy']
batch_inbox_address = rollup_config['batch_inbox_address']
log.info(f'Using L2OutputOracle {l2_output_oracle}')
log.info(f'Using DisputeGameFactory {dispute_game_factory}')
log.info(f'Using batch inbox {batch_inbox_address}')

# Set up the base docker environment.
Expand All @@ -264,7 +260,11 @@ def devnet_deploy(paths):
# Must be done selectively because op-proposer throws if both are set.
if DEVNET_L2OO:
docker_env['L2OO_ADDRESS'] = l2_output_oracle
l2_output_oracle = addresses['L2OutputOracleProxy']
log.info(f'Using L2OutputOracle {l2_output_oracle}')
else:
dispute_game_factory = addresses['DisputeGameFactoryProxy']
log.info(f'Using DisputeGameFactory {dispute_game_factory}')
docker_env['DGF_ADDRESS'] = dispute_game_factory
docker_env['DG_TYPE'] = '254'
docker_env['PROPOSAL_INTERVAL'] = '12s'
Expand Down
4 changes: 2 additions & 2 deletions cannon/Dockerfile.diff
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ COPY --from=cannon-v2 /usr/local/bin/cannon /usr/local/bin/cannon-v2
# verify the latest singlethreaded VM behavior against cannon-v2
RUN cd cannon && make diff-singlethreaded-2-cannon -e OTHER_CANNON=/usr/local/bin/cannon-v2
RUN --mount=type=cache,target=/root/.cache/go-build cd cannon && \
make diff-singlethreaded-2-cannon -e OTHER_CANNON=/usr/local/bin/cannon-v2 \
GOOS=$TARGETOS GOARCH=$TARGETARCH GITCOMMIT=$GIT_COMMIT GITDATE=$GIT_DATE
make diff-singlethreaded-2-cannon -e OTHER_CANNON=/usr/local/bin/cannon-v2 \
GOOS=$TARGETOS GOARCH=$TARGETARCH GITCOMMIT=$GIT_COMMIT GITDATE=$GIT_DATE
2 changes: 1 addition & 1 deletion cannon/cmd/load_elf.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"github.com/ethereum-optimism/optimism/cannon/mipsevm/program"
"github.com/ethereum-optimism/optimism/cannon/mipsevm/singlethreaded"
"github.com/ethereum-optimism/optimism/cannon/mipsevm/versions"
"github.com/ethereum-optimism/optimism/cannon/serialize"
openum "github.com/ethereum-optimism/optimism/op-service/enum"
"github.com/ethereum-optimism/optimism/op-service/ioutil"
"github.com/ethereum-optimism/optimism/op-service/jsonutil"
"github.com/ethereum-optimism/optimism/op-service/serialize"
)

var (
Expand Down
Loading