Skip to content

Commit

Permalink
Merge pull request #225 from ethereum-optimism/10-23-feat_monorepo_ad…
Browse files Browse the repository at this point in the history
…d_scripts_for_installing_monorepo_version

feat(monorepo): add scripts for installing monorepo version
  • Loading branch information
jakim929 authored Oct 23, 2024
2 parents 1aae025 + aac6b25 commit 0085952
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 45 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ env:
FOUNDRY_PROFILE: ci

jobs:
check-versions-monorepo:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup
uses: ./.github/actions/setup

- name: Check versions
run: just check-monorepo-versions

contracts-tests:
runs-on: ubuntu-latest
steps:
Expand Down
30 changes: 25 additions & 5 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,32 @@ test-go:
start:
go run ./...

install-abigen:
go install github.com/ethereum/go-ethereum/cmd/abigen@$(jq -r .abigen < versions.json)
version-monorepo-contracts:
cd contracts/lib/optimism && \
git rev-parse HEAD

version-monorepo-go:
go list -m -f '{{"{{"}}.Version{{"}}"}}' github.com/ethereum-optimism/optimism

check-monorepo-versions:
#!/usr/bin/env bash
./scripts/check-versions.sh $(just version-monorepo-contracts) $(just version-monorepo-go)
force-install-monorepo-version:
fetch-monorepo-contracts version:
cd contracts/lib/optimism && \
forge install ethereum-optimism/optimism@$(cat ../../../monorepo-commit-hash) --no-commit
git fetch origin {{version}}

install-monorepo-go version:
go get github.com/ethereum-optimism/optimism@{{version}}

install-monorepo-contracts version: (fetch-monorepo-contracts version)
cd contracts && \
forge install ethereum-optimism/optimism@{{version}} --no-commit

install-monorepo version: (install-monorepo-go version) (install-monorepo-contracts version)

install-abigen:
go install github.com/ethereum/go-ethereum/cmd/abigen@$(jq -r .abigen < versions.json)

calculate-artifact-url:
#!/usr/bin/env bash
Expand All @@ -38,4 +58,4 @@ generate-monorepo-bindings: install-abigen
generate-genesis: build-contracts
go run ./genesis/cmd/main.go --monorepo-artifacts $(just calculate-artifact-url) --periphery-artifacts ./contracts/out --outdir ./genesis/generated

generate-all: generate-genesis generate-monorepo-bindings
generate-all: generate-genesis generate-monorepo-bindings
2 changes: 1 addition & 1 deletion contracts/lib/optimism
Submodule optimism updated 37 files
+7 −50 .circleci/config.yml
+1 −1 .semgrepignore
+1 −1 README.md
+2 −3 docker-bake.hcl
+5 −1 justfile
+1 −1 op-batcher/batcher/channel_config_test.go
+3 −3 op-chain-ops/genesis/testdata/test-deploy-config-full.json
+4 −0 op-chain-ops/genesis/withdrawal_network.go
+29 −7 op-chain-ops/genesis/withdrawal_network_test.go
+2 −0 op-chain-ops/script/context.go
+22 −0 op-chain-ops/script/script.go
+14 −12 op-challenger/config/config.go
+2 −0 op-challenger/flags/flags.go
+6 −2 op-challenger/game/fault/register_task.go
+71 −0 op-challenger/game/fault/register_task_test.go
+4 −4 op-challenger/game/fault/trace/prestates/multi.go
+11 −5 op-challenger/game/fault/trace/prestates/multi_test.go
+0 −1 op-challenger/game/fault/trace/vm/kona_server_executor.go
+8 −0 op-deployer/pkg/deployer/inspect/flags.go
+198 −0 op-deployer/pkg/deployer/inspect/semvers.go
+1 −1 op-deployer/pkg/deployer/opcm/standard.go
+8 −0 op-deployer/pkg/deployer/pipeline/downloader.go
+6 −0 op-program/Makefile
+1 −1 op-program/prestates/releases.go
+13 −2 op-program/prestates/releases.json
+86 −0 op-program/prestates/verify/verify.go
+9 −2 op-program/scripts/build-prestates.sh
+5 −5 op-service/eth/account_proof.go
+37 −1 op-service/eth/account_proof_test.go
+1 −1 op-service/eth/types.go
+2 −2 op-service/sources/eth_client.go
+1 −4 ops/docker/proofs-tools/Dockerfile
+6 −1 packages/contracts-bedrock/justfile
+2 −2 packages/contracts-bedrock/semver-lock.json
+3 −3 packages/contracts-bedrock/src/L2/GasPriceOracle.sol
+397 −0 semgrep/sol-rules.t.sol
+27 −15 semgrep/sol-rules.yaml
14 changes: 7 additions & 7 deletions genesis/generated/900-l1-genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"depositContractAddress": "0x0000000000000000000000000000000000000000"
},
"nonce": "0x0",
"timestamp": "0x671856b9",
"timestamp": "0x67191ed8",
"extraData": "0x",
"gasLimit": "0x1c9c380",
"difficulty": "0x0",
Expand Down Expand Up @@ -299,7 +299,7 @@
"0x0000000000000000000000000000000000000000000000000000000000000035": "0x0000000000000000000000811d626a3444c5c10fa01607ee11efbeaf19b0ff00",
"0x0000000000000000000000000000000000000000000000000000000000000037": "0x000000000000000000000000fb295aa436f23be2bd17678adf1232bdec02fed1",
"0x0000000000000000000000000000000000000000000000000000000000000038": "0x00000000000000000000000094e2e1fcbfd1099b450b2d5ac1f1701327361163",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x000000000000000000000000000000000000000000000000671856b900000001",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x00000000000000000000000000000000000000000000000067191ed800000001",
"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000fa16d7079aab573acdf911dd58e4457a20547548",
"0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x000000000000000000000000d98e0b378583bbcc8183184ce053aecbd15f22e5"
},
Expand All @@ -315,7 +315,7 @@
"0x0000000000000000000000000000000000000000000000000000000000000035": "0x0000000000000000000000811d626a3444c5c10fa01607ee11efbeaf19b0ff00",
"0x0000000000000000000000000000000000000000000000000000000000000037": "0x000000000000000000000000fd19a33f8d757b8ea93bb2b40b1cde946c1e1f4d",
"0x0000000000000000000000000000000000000000000000000000000000000038": "0x000000000000000000000000124efba5858a36f53726e107481e71d9060d84e0",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x000000000000000000000000000000000000000000000000671856b900000001",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x00000000000000000000000000000000000000000000000067191ed800000001",
"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000fa16d7079aab573acdf911dd58e4457a20547548",
"0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x0000000000000000000000000c2405b5f131d7fe2e1f49e41e8a20d8e4179e7e"
},
Expand Down Expand Up @@ -521,7 +521,7 @@
"0x0000000000000000000000000000000000000000000000000000000000000035": "0x0000000000000000000000811d626a3444c5c10fa01607ee11efbeaf19b0ff00",
"0x0000000000000000000000000000000000000000000000000000000000000037": "0x00000000000000000000000025782c27ef09d9173f8f274bead411bb9ac5417c",
"0x0000000000000000000000000000000000000000000000000000000000000038": "0x000000000000000000000000ed76b1d812dad3a322fdc3d766f251d51a78c3a9",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x000000000000000000000000000000000000000000000000671856b900000001",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x00000000000000000000000000000000000000000000000067191ed800000001",
"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000fa16d7079aab573acdf911dd58e4457a20547548",
"0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x00000000000000000000000048ff3b8ac58f74a9060dadfd60093d71a2e0b2ea"
},
Expand Down Expand Up @@ -830,7 +830,7 @@
"0x0000000000000000000000000000000000000000000000000000000000000035": "0x0000000000000000000000811d626a3444c5c10fa01607ee11efbeaf19b0ff00",
"0x0000000000000000000000000000000000000000000000000000000000000037": "0x00000000000000000000000083e3463f6d53730367af74ad398779760b6404dd",
"0x0000000000000000000000000000000000000000000000000000000000000038": "0x0000000000000000000000000a4bf4bfdbd1155df635021f4558eef0754e3706",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x000000000000000000000000000000000000000000000000671856b900000001",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x00000000000000000000000000000000000000000000000067191ed800000001",
"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000fa16d7079aab573acdf911dd58e4457a20547548",
"0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x000000000000000000000000041ce2550a7925b7307fb1253962a3a6d89e7135"
},
Expand Down Expand Up @@ -937,7 +937,7 @@
"0x0000000000000000000000000000000000000000000000000000000000000035": "0x0000000000000000000000811d626a3444c5c10fa01607ee11efbeaf19b0ff00",
"0x0000000000000000000000000000000000000000000000000000000000000037": "0x000000000000000000000000489d9f7f107dfca422f31f7b9d90d27442c76d64",
"0x0000000000000000000000000000000000000000000000000000000000000038": "0x000000000000000000000000ed5f8f44f210716c76111f7973acbddb39784d73",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x000000000000000000000000000000000000000000000000671856b900000001",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x00000000000000000000000000000000000000000000000067191ed800000001",
"0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc": "0x000000000000000000000000fa16d7079aab573acdf911dd58e4457a20547548",
"0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103": "0x000000000000000000000000702ff7bf17315db7a068039006515a1c9a40c1c0"
},
Expand Down Expand Up @@ -1266,7 +1266,7 @@
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000000000000000000000000000001": "0x000000000000000000000000000000000000000000000000000000003b9aca00",
"0x0000000000000000000000000000000000000000000000000000000000000032": "0x000000000000000000000000000000000000000000000000000000000000dead",
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x000000000000000000000000000000000000000000000000671856b900000000"
"0x000000000000000000000000000000000000000000000000000000000000003b": "0x00000000000000000000000000000000000000000000000067191ed800000000"
},
"balance": "0x0",
"nonce": "0x1"
Expand Down
8 changes: 2 additions & 6 deletions genesis/generated/901-l2-genesis.json

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions genesis/generated/902-l2-genesis.json

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions genesis/generated/903-l2-genesis.json

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions genesis/generated/904-l2-genesis.json

Large diffs are not rendered by default.

Loading

0 comments on commit 0085952

Please sign in to comment.