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

Palango/celo9 #237

Closed
wants to merge 163 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
36f093a
op-chain-ops/script: cleanup and improve console logging (#11629)
protolambda Aug 28, 2024
0dcccf6
cannon: Fix stack patching (#11632)
Inphi Aug 29, 2024
aebf669
Archive contract artifacts (#11626)
mslipper Aug 29, 2024
e53a86a
cannon: Add MTCannon-specific differential tests (#11605)
mbaxter Aug 29, 2024
c7b91ab
Conductor and sequencer p2p refactoring (#11455)
anacrolix Aug 29, 2024
323e688
test: fix standard bridge interop tests (#11668)
agusduha Aug 29, 2024
7373ce7
- make state publishing loop abort if the txpool state is not good (#…
roberto-bayardo Aug 29, 2024
db8154b
dependabot(gomod): bump github.com/hashicorp/raft from 1.7.0 to 1.7.1…
dependabot[bot] Aug 29, 2024
d520441
Use context interrupts consistently in more places (#11511)
anacrolix Aug 30, 2024
f370113
test: fix superchain erc20 invariants (#11688)
agusduha Aug 30, 2024
814c9de
feat: add createX preinstall (#29) (#11618)
agusduha Aug 30, 2024
3e68cf0
Update contracts publish job to use env vars rather than contexts (#1…
mslipper Aug 30, 2024
18f6453
op-program: Prune L1 blocks after advancing origin (#11530)
ajsutton Aug 31, 2024
96ecb2e
npmrc: delete (#11699)
tynes Aug 31, 2024
c198a89
Increase executor size on contract publisher (#11701)
mslipper Aug 31, 2024
8ab4d3d
feat(op-program): Use `PebbleDB` for `DiskKV` (#11705)
clabby Sep 2, 2024
4c211fa
Revert "feat(op-program): Use `PebbleDB` for `DiskKV` (#11705)" (#11707)
ajsutton Sep 2, 2024
9452aa6
op-service/txmgr: multiple fixes / improvements (#11614)
roberto-bayardo Sep 2, 2024
42085ce
chore(op-service): Remove `reth` receipts source (#11706)
clabby Sep 2, 2024
375b976
fix: op-challenger move.go cli command wasn't cancellable (#11716)
samlaf Sep 3, 2024
957e13d
feat: add ERC-5202 Blueprint library with initial tests (#11700)
mds1 Sep 3, 2024
5b907dc
chore: Fix lint error (#11714)
ajsutton Sep 3, 2024
669a0fb
maint: no kontrol summaries in PRs (#11725)
smartcontracts Sep 3, 2024
337749f
feat: check interface differences in CI (#11677)
smartcontracts Sep 4, 2024
72eff5f
add comment to SingularBatch.Timestamp (#11720)
zhiqiangxu Sep 4, 2024
e80d23b
op-program: Use PebbleDB for DiskKV (Reapply with fixes) (#11709)
ajsutton Sep 4, 2024
5a1a18d
fix: SuperchainWETH fuzz flake with bad sender (#11728)
smartcontracts Sep 4, 2024
f8b421b
Fix copy-paste typo (#11731)
geoknee Sep 4, 2024
e0f6e1e
maint: add interfaces for legacy contracts (#11625)
smartcontracts Sep 4, 2024
2f10fb7
Slim down contracts-bedrock package (#11723)
mslipper Sep 4, 2024
1f0d8a8
fix: properly check all interfaces (#11734)
smartcontracts Sep 4, 2024
31f408b
feat: update interface validation script to check semver (#11740)
smartcontracts Sep 4, 2024
3410109
challenger: Introduce StateConverter to abstract loading VM states (#…
ajsutton Sep 4, 2024
f63cba6
fix: flake tests (#11742)
0xDiscotech Sep 4, 2024
2272a5d
repo: bump foundry (#11746)
tynes Sep 4, 2024
3f7a8ad
Revert "challenger: Introduce StateConverter to abstract loading VM s…
clabby Sep 4, 2024
c2d0911
cannon: Run expensive tests in parallel (#11739)
Inphi Sep 5, 2024
224c5fd
op-node: sequencer should clear inconsistent asyncGossip buffer on se…
protolambda Sep 5, 2024
64b4b30
Simplify CI
palango Aug 17, 2023
7d4540e
dependabot: no PRs for version updates
karlb Sep 13, 2023
95c06b6
adding trivy scanning to the Docker files (#41)
pputman-clabs Sep 12, 2023
4a14825
Update op-geth
karlb Feb 7, 2024
8c854ec
Add fee currency parameter to IntrinsicGas
karlb Feb 5, 2024
659906a
Add forkdiff comparison to optimism (#32)
Aug 22, 2023
10435b4
Add Celo contracts
pahor167 Aug 29, 2023
a1f203a
Enable cel2 fork by default
karlb Sep 19, 2023
313b17b
Use celo-org/op-geth container for devnet
karlb Sep 19, 2023
4670f0a
Change base fee recipient in TestFees
karlb Feb 13, 2024
92470f8
Enable Cel2 in e2e tests
karlb Feb 13, 2024
8cb5dff
Add token duality e2e test
karlb Sep 27, 2023
6fe1444
Run new e2e tests as part of devnet CI job
karlb Sep 27, 2023
bce3835
Add cel2 testnet setup code
karlb Aug 29, 2023
66672c4
Fix circle
palango May 16, 2024
9121e71
Skip shellcheck for now
palango May 16, 2024
2120d53
Add license identifier to ISortedOracles
palango May 17, 2024
951e9f2
Add celo deployment to L2Genesis
palango May 15, 2024
8964ae8
Disable SortedOracles in Genesis
karlb May 28, 2024
86a7a69
Add more powerful MockSortedOracles
karlb Apr 3, 2024
96c8cad
Add fee currency functions to MintableERC20
karlb Apr 22, 2024
2ad4ba1
Update soldity pragma for interfaces
karlb Apr 22, 2024
df28d59
Add Fee Currency directory
pahor167 May 21, 2024
e9dc933
address update + sorted oracles update
pahor167 May 22, 2024
9a53c98
register cUSD to FeeDirectory
pahor167 May 22, 2024
9b2c42f
Disable cUSD in L2 genesis for now
karlb May 28, 2024
b63bd24
Fix Genesis contract count test
karlb May 28, 2024
b4e3488
GH Action to deploy op-contracts to Holesky
alvarof2 May 16, 2024
b2466bc
Fixes
alvarof2 May 16, 2024
a2dd7a0
Executable
alvarof2 May 16, 2024
a6bbfeb
Branch to commit
alvarof2 May 16, 2024
ce14bcf
GH Action to deploy celo4 contracts
alvarof2 May 17, 2024
0614feb
--legacy for celo4 GH Action
alvarof2 May 17, 2024
6a1d12a
envsubst for op-ufm
alvarof2 May 20, 2024
384a87f
op-ufm GH Action
alvarof2 May 20, 2024
29b4971
Image name
alvarof2 May 20, 2024
0ad289d
Add feature flag for celo contract deployment
palango Jun 5, 2024
e2d0b7b
Add `celo-migrate` tool for state migration
palango Aug 2, 2023
d564404
Remove config options for DB options
palango Jun 11, 2024
b456fb0
Change config script to pass verification on deploy (#150)
rkachowski Jun 14, 2024
770b84b
IOracle to MockSortedOracles
pahor167 Jun 18, 2024
01b083c
Remove cel2-testnet directory (#156)
karlb Jun 19, 2024
6849b8d
Included some extra customization to config.sh file
jcortejoso Jun 13, 2024
8e40d60
Update config-vars-celo.sh
jcortejoso Jun 21, 2024
543c04a
Exposed DEPLOY_CELO_CONTRACTS in envrc
jcortejoso Jun 24, 2024
083a616
Deploy Celo contracts on devnet
karlb Jun 24, 2024
e8162d5
Update op-geth for devnet
karlb Jun 24, 2024
fea9e49
Set devAccount[0] as owner of FeeCurrencyDirectory
karlb Jun 24, 2024
1fad55c
Combine Cel2 migration scripts (#148)
alecps Jun 25, 2024
8b18964
Set balance of `CeloDistributionSchedule` contract (#162)
palango Jun 26, 2024
762bbb9
state-migration: Set ParentBeaconRoot (#176)
palango Jun 26, 2024
2294b21
Update op-geth (both go.mod and devnet container)
karlb Jun 26, 2024
3320fe1
state-migration: Set address of distribution schedule (#177)
palango Jun 26, 2024
5845ad2
Add e2e test for bridging WETH to L2
karlb Jun 25, 2024
6b7b643
Log out l2 predeploy addresses.
rkachowski Jun 27, 2024
18300c7
Log config location.
rkachowski Jun 27, 2024
63144dd
Add map script.
rkachowski Jun 27, 2024
4674dcb
state-migration: Read total supply directly from state (#182)
palango Jun 28, 2024
32661d2
Fix l2 block older than l1 origin error (#184) (#187)
alecps Jun 28, 2024
7852910
Update plasma-eigenda config
jcortejoso Jun 26, 2024
d83cd01
Trigger workflow changes
jcortejoso Jun 27, 2024
0883135
File trigger updated
jcortejoso Jun 27, 2024
ba9bf6a
Update docker-build-scan.yaml
jcortejoso Jun 28, 2024
f30b7ad
Migration script fixes (#179)
piersy Jul 1, 2024
d98d648
Fix shellcheck.
rkachowski Jul 10, 2024
4227c03
Fix migration script gap in migrated blocks (#189)
piersy Jul 3, 2024
963c929
Use name AbstractFeeCurrency to avoid confusion
karlb Jul 1, 2024
aee5a9d
ci: Add shellcheck job (#191)
palango Jul 9, 2024
ed12590
Use custom gas token in devnet deployment
ezdac Jun 10, 2024
82afc97
Rename NativeToken to CeloTokenL1
ezdac Jun 20, 2024
d981f29
Use ERC1967 proxy and init from Safe
ezdac Jun 20, 2024
572328e
Fix deployCeloContracts config not set for celo devnet
ezdac Jun 24, 2024
74eb1b9
Add CeloTokenL1 chain assertions
ezdac Jun 26, 2024
7a5e130
Fix deploy script for when useCustomGasToken=false
ezdac Jun 26, 2024
7a981ea
Read OptimismPortal initial balance from custom gas token
ezdac Jun 26, 2024
630ae1a
Deploy multicall contract on devnet L1
ezdac Jun 13, 2024
7d7d9b6
Add viem E2E testsuite
ezdac Jun 10, 2024
0b00054
Fix l1-deployments check
ezdac Jun 27, 2024
be816e8
Add celo devnet-allocs CI test
ezdac Jul 3, 2024
0cc31e4
Change OptimismPortal spec definition signature
ezdac Jul 4, 2024
e0c7c6f
Remove deploy-config check for CustomGasToken
ezdac Jul 4, 2024
5e8cdf5
Include CustomGasToken config in getting-started
ezdac Jul 4, 2024
e8c2ed0
Use L2OutputOracle in celo e2e tests
ezdac Jul 4, 2024
a823149
Update plasma config
jcortejoso Jul 4, 2024
bba3e2a
Trigger container building in all commits (temporary)
jcortejoso Jul 4, 2024
451247c
Fix CI env var for celo allocs
ezdac Jul 17, 2024
dc0f9f5
Add docker-build job to CircleCI
ezdac Jul 17, 2024
60db08a
Run Celo E2E test in CircleCI
ezdac Jul 17, 2024
3a4844c
Update node packages for e2e test
ezdac Jul 17, 2024
c7d79aa
Add node dependency caching
ezdac Jul 17, 2024
e2b92b5
Add pre-migration command to migration script (#192)
alecps Jul 30, 2024
d1a618c
state-migration: Fail if account would be overwritten (#202)
palango Aug 1, 2024
bc8b5d2
Cosmetic changes to the migration script
lvpeschke Jul 31, 2024
57930b0
migration: Remove remaining todos (#211)
palango Aug 13, 2024
ed297d8
Use RPC URLs from env in JS tests
karlb Aug 19, 2024
88ed1c6
migration: Add tests (#217)
palango Aug 22, 2024
3a39fbc
migration: Add working allowlist for Alfajores (#220)
palango Aug 23, 2024
4216178
Create funding.json
marekolszewski Sep 5, 2024
0451305
Adapt migration code to changes in StateDB
palango Sep 11, 2024
67364d1
Remove state op-hearbeat builds
palango Sep 12, 2024
bdb949e
Update semver-lock
karlb Sep 10, 2024
3bdcff9
Update snapshots
karlb May 29, 2024
a9c3128
Temporarily skip tests after rebase
karlb Sep 13, 2024
104e796
Exclude L1 fees from withdrawal test
karlb Sep 16, 2024
ec15b1c
Exclude L1 fees from TestCustomGasToken
karlb Sep 17, 2024
6fb1c41
migration: Set fields correctly for migration block (#212)
palango Sep 17, 2024
7aa3391
build: Fix outdated dockerfile (#224)
palango Sep 17, 2024
f2d1fad
migration: Enable Granite (#226)
palango Sep 17, 2024
63e4225
feat: initial goroutine blob submission implementation
samlaf Aug 22, 2024
580b8c4
chore(batcher): make altda wg wait + log only when useAltDa is true
samlaf Sep 3, 2024
33f31f7
refactor: batcher altda submission code into its own function
samlaf Sep 3, 2024
5d327f1
test: refactor batcher e2e test to only count batcher txs
samlaf Sep 3, 2024
58a7331
chore: log errors from wait functions
samlaf Sep 5, 2024
c09292a
chore: refactor and minimize time that e2e batcher system tests can run
samlaf Sep 5, 2024
112d0a4
chore: lower timeout duration in test
samlaf Sep 5, 2024
ab98153
fix(batcher): maxConcurentDARequests was not being initialized
samlaf Sep 10, 2024
6feda1a
Update deployment scripts
jcortejoso Sep 11, 2024
e899a82
Write genesis file in state migration (#219)
alecps Sep 18, 2024
8fb98c3
Increase MaxFrameLen to 16 MB
jcortejoso Sep 17, 2024
072de8b
Fix migration (#232)
piersy Sep 20, 2024
c9987bd
op-node: Add option to only use finalized blocks as l1origin in seque…
palango Sep 23, 2024
9c107bd
migration: Overwrite create2deployer code (#233)
palango Sep 23, 2024
04445db
Update base comit in fork.yml
palango Sep 24, 2024
a1af4b2
Simplify CI
palango Sep 24, 2024
c4262fc
contracts: Update allowed interface list with Celo interfaces
palango Sep 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
759 changes: 107 additions & 652 deletions .circleci/config.yml

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions .envrc.example
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,18 @@ export ETHERSCAN_API_KEY=
# Private key to use for contract deployments, you don't need to worry about
# this for the Getting Started guide.
export PRIVATE_KEY=

# CELO additional configuration
export ENABLE_GOVERNANCE=false
export FUNDS_DEV_ACCOUNTS=false
export USE_ALTDA=false
# Set to false if migrating state from a Celo L1. True for new testnets
export DEPLOY_CELO_CONTRACTS=false

export USE_CUSTOM_GAS_TOKEN=true
# Set to "0x0000000000000000000000000000000000000000" when the contract
# should get deployed (via create2) on L1 as part of the deploy script.
# Set to the deployed contract address when already deployed on L1
# This only works when USE_CUSTOM_GAS_TOKEN=true
export CUSTOM_GAS_TOKEN_ADDRESS=0x0000000000000000000000000000000000000000

8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ updates:
day: "tuesday"
time: "14:30"
timezone: "America/New_York"
open-pull-requests-limit: 10
open-pull-requests-limit: 0
commit-message:
prefix: "dependabot(docker): "
labels:
Expand All @@ -20,7 +20,7 @@ updates:
day: "tuesday"
time: "14:30"
timezone: "America/New_York"
open-pull-requests-limit: 10
open-pull-requests-limit: 0
commit-message:
prefix: "dependabot(actions): "
labels:
Expand All @@ -33,7 +33,7 @@ updates:
day: "tuesday"
time: "14:30"
timezone: "America/New_York"
open-pull-requests-limit: 10
open-pull-requests-limit: 0
versioning-strategy: "auto"
commit-message:
prefix: "dependabot(npm): "
Expand All @@ -47,7 +47,7 @@ updates:
day: "tuesday"
time: "14:30"
timezone: "America/New_York"
open-pull-requests-limit: 10
open-pull-requests-limit: 0
commit-message:
prefix: "dependabot(gomod): "
labels:
Expand Down
99 changes: 99 additions & 0 deletions .github/workflows/contracts-celo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Alfajores-Holesky Deploy Celo4 L1 Contracts
on:
workflow_dispatch:
inputs:
deploy_contracts:
required: false
type: boolean
default: true
contracts_tag:
required: false
type: string
default: 'celo4'
deployment_context:
required: false
type: string
default: 'test-celo4'
l2_chain_id:
required: false
default: '42069'

jobs:
deploy-contracts:
runs-on: ubuntu-latest
permissions: # Must change the job token permissions to use Akeyless JWT auth
id-token: write
contents: read
if: ${{ ! startsWith(github.triggering_actor, 'akeyless') }}
env:
DEPLOY_CONTRACTS: ${{ github.event_name == 'push' && 'true' || inputs.deploy_contracts }}
CONTRACTS_TAG: ${{ github.event_name == 'push' && 'op-contracts/v1.3.0' || inputs.contracts_tag }}
DEPLOYMENT_CONTEXT: ${{ github.event_name == 'push' && 'test' || inputs.deployment_context }}
L2_CHAIN_ID: ${{ github.event_name == 'push' && '42069' || inputs.l2_chain_id }}
L1_CHAIN_ID: '17000' # Holesky
L1_RPC_URL: 'https://ethereum-holesky-rpc.publicnode.com'
GS_ADMIN_ADDRESS: '0xb2397dF29AFB4B4661559436180019bEb7912985'
GS_BATCHER_ADDRESS: '0x7fDBe8F4D22ab511340667d7Ce5675568d09eBB4'
GS_PROPOSER_ADDRESS: '0xdCf30236Fa0aBE2ca0BEc2eE0a2F40b16A144DB3'
GS_SEQUENCER_ADDRESS: '0x3e2Df8efB6fA1d6E6021572a99BB67BA9ab2C59D'
steps:

- name: "Get GitHub Token from Akeyless"
id: get_auth_token
uses:
docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest
with:
api-url: https://api.gateway.akeyless.celo-networks-dev.org
access-id: p-kf9vjzruht6l
dynamic-secrets: '{"/dynamic-secrets/keys/github/optimism/contents=write,pull_requests=write":"PAT"}'

# "/static-secrets/devops-circle/alfajores/op-testnet-alfajores/HOLESKY_QUICKNODE_URL":"L1_RPC_URL",
- name: Akeyless get secrets
uses: docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest
with:
api-url: https://api.gateway.akeyless.celo-networks-dev.org
access-id: p-kf9vjzruht6l
static-secrets: '{
"/static-secrets/devops-circle/alfajores/op-testnet-alfajores/GS_ADMIN_PRIVATE_KEY":"GS_ADMIN_PRIVATE_KEY"
}'

- name: "Checkout"
uses: actions/checkout@v4
with:
token: ${{ env.PAT }}
submodules: recursive
fetch-depth: 0

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

- name: Generate config JSON
run: |
cd packages/contracts-bedrock
./scripts/getting-started/config-vars-celo.sh

- name: Deploy L1 contracts
if: ${{ env.DEPLOY_CONTRACTS != 'false' }}
run: |
export IMPL_SALT=$(openssl rand -hex 32)
cd packages/contracts-bedrock
echo "Broadcasting ..."
forge script scripts/Deploy.s.sol:Deploy --private-key $GS_ADMIN_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL --legacy

- name: Generate genesis files
run: |
mkdir -p l2-config-files/$DEPLOYMENT_CONTEXT
cd op-node
go run cmd/main.go genesis l2 \
--deploy-config ../packages/contracts-bedrock/deploy-config/$DEPLOYMENT_CONTEXT.json \
--l1-deployments ../packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT/.deploy \
--outfile.l2 ../l2-config-files/$DEPLOYMENT_CONTEXT/genesis-$(date +%s).json \
--outfile.rollup ../l2-config-files/$DEPLOYMENT_CONTEXT/rollup-$(date +%s).json \
--l1-rpc $L1_RPC_URL

- name: "Commit genesis files"
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[Automatic] - Commit genesis files'
branch: alvarof2/contracts
file_pattern: 'l2-config-files packages/contracts-bedrock/**'
117 changes: 117 additions & 0 deletions .github/workflows/contracts-op-stack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Alfajores-Holesky Deploy OP-Stack L1 Contracts
on:
workflow_dispatch:
inputs:
deploy_contracts:
required: false
type: boolean
default: true
contracts_tag:
required: false
type: string
default: 'op-contracts/v1.3.0'
deployment_context:
required: false
type: string
default: 'test-alvaro'
l2_chain_id:
required: false
default: '42069'

jobs:
deploy-contracts:
runs-on: ubuntu-latest
permissions: # Must change the job token permissions to use Akeyless JWT auth
id-token: write
contents: read
if: ${{ ! startsWith(github.triggering_actor, 'akeyless') }}
env:
DEPLOY_CONTRACTS: ${{ github.event_name == 'push' && 'true' || inputs.deploy_contracts }}
CONTRACTS_TAG: ${{ github.event_name == 'push' && 'op-contracts/v1.3.0' || inputs.contracts_tag }}
DEPLOYMENT_CONTEXT: ${{ github.event_name == 'push' && 'test' || inputs.deployment_context }}
L2_CHAIN_ID: ${{ github.event_name == 'push' && '42069' || inputs.l2_chain_id }}
L1_CHAIN_ID: '17000' # Holesky
L1_RPC_URL: 'https://ethereum-holesky-rpc.publicnode.com'
GS_ADMIN_ADDRESS: '0xb2397dF29AFB4B4661559436180019bEb7912985'
GS_BATCHER_ADDRESS: '0x7fDBe8F4D22ab511340667d7Ce5675568d09eBB4'
GS_PROPOSER_ADDRESS: '0xdCf30236Fa0aBE2ca0BEc2eE0a2F40b16A144DB3'
GS_SEQUENCER_ADDRESS: '0x3e2Df8efB6fA1d6E6021572a99BB67BA9ab2C59D'
steps:

- name: "Get GitHub Token from Akeyless"
id: get_auth_token
uses:
docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest
with:
api-url: https://api.gateway.akeyless.celo-networks-dev.org
access-id: p-kf9vjzruht6l
dynamic-secrets: '{"/dynamic-secrets/keys/github/optimism/contents=write,pull_requests=write":"PAT"}'

# "/static-secrets/devops-circle/alfajores/op-testnet-alfajores/HOLESKY_QUICKNODE_URL":"L1_RPC_URL",
- name: Akeyless get secrets
uses: docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest
with:
api-url: https://api.gateway.akeyless.celo-networks-dev.org
access-id: p-kf9vjzruht6l
static-secrets: '{
"/static-secrets/devops-circle/alfajores/op-testnet-alfajores/GS_ADMIN_PRIVATE_KEY":"GS_ADMIN_PRIVATE_KEY"
}'

- name: "Checkout"
uses: actions/checkout@v4
with:
token: ${{ env.PAT }}
submodules: recursive
fetch-depth: 0

- name: "Checkout OP Repo"
uses: actions/checkout@v4
with:
repository: 'ethereum-optimism/optimism'
ref: '${{ env.CONTRACTS_TAG }}'
path: ethereum-optimism
submodules: recursive
fetch-depth: 0

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

- name: Generate config JSON
run: |
cd packages/contracts-bedrock
./scripts/getting-started/config-vars-op-stack.sh
cp deploy-config/$DEPLOYMENT_CONTEXT.json /home/runner/work/optimism/optimism/ethereum-optimism/packages/contracts-bedrock/deploy-config/$DEPLOYMENT_CONTEXT.json

- name: Deploy L1 contracts
if: ${{ env.DEPLOY_CONTRACTS != 'false' }}
run: |
export IMPL_SALT=$(openssl rand -hex 32)
cd ethereum-optimism/packages/contracts-bedrock
echo "Broadcasting ..."
forge script scripts/Deploy.s.sol:Deploy --private-key $GS_ADMIN_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL --legacy
mkdir -p /home/runner/work/optimism/optimism/packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT
cp deployments/$DEPLOYMENT_CONTEXT/.deploy /home/runner/work/optimism/optimism/packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT/.deploy

- name: Copy old .deploy file if contracts not deployed
if: ${{ env.DEPLOY_CONTRACTS == 'false' }}
run: |
mkdir -p ethereum-optimism/packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT
cp packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT/.deploy ethereum-optimism/packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT/.deploy

- name: Generate genesis files
run: |
mkdir -p l2-config-files/$DEPLOYMENT_CONTEXT
cd ethereum-optimism/op-node
go run cmd/main.go genesis l2 \
--deploy-config ../packages/contracts-bedrock/deploy-config/$DEPLOYMENT_CONTEXT.json \
--l1-deployments ../packages/contracts-bedrock/deployments/$DEPLOYMENT_CONTEXT/.deploy \
--outfile.l2 ../../l2-config-files/$DEPLOYMENT_CONTEXT/genesis-$(date +%s).json \
--outfile.rollup ../../l2-config-files/$DEPLOYMENT_CONTEXT/rollup-$(date +%s).json \
--l1-rpc $L1_RPC_URL

- name: "Commit genesis files"
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: '[Automatic] - Commit genesis files'
branch: alvarof2/contracts
file_pattern: 'l2-config-files packages/contracts-bedrock/**'
102 changes: 102 additions & 0 deletions .github/workflows/docker-build-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Docker Build Scan
on:
pull_request:
branches:
- 'master'
- 'celo*'
push:
branches:
- 'master'
- 'celo*'
workflow_dispatch:

jobs:
detect-files-changed:
runs-on: ubuntu-latest
outputs:
files-changed: ${{ steps.detect-files-changed.outputs.all_changed_files }}
steps:
- uses: actions/checkout@v4
- name: Detect files changed
id: detect-files-changed
uses: tj-actions/changed-files@v44
with:
separator: ','

build-cel2-migration-tool:
runs-on: ubuntu-latest
env:
GIT_COMMIT: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
needs: detect-files-changed
if: |
contains(needs.detect-files-changed.outputs.files-changed, 'go.sum') ||
contains(needs.detect-files-changed.outputs.files-changed, 'op-chain-ops/cmd/celo-migrate') ||
contains(needs.detect-files-changed.outputs.files-changed, 'op-chain-ops/Dockerfile') ||
contains(needs.detect-files-changed.outputs.files-changed, '.github/workflows/docker-build-scan.yaml') ||
github.event_name == 'workflow_dispatch' ||
true
permissions:
contents: read
id-token: write
security-events: write
steps:
- uses: actions/checkout@v4
- name: Login at GCP Artifact Registry
uses: celo-org/reusable-workflows/.github/actions/[email protected]
with:
workload-id-provider: 'projects/1094498259535/locations/global/workloadIdentityPools/gh-optimism/providers/github-by-repos'
service-account: '[email protected]'
docker-gcp-registries: us-west1-docker.pkg.dev
- name: Build and push container
uses: celo-org/reusable-workflows/.github/actions/[email protected]
with:
platforms: linux/amd64
registry: us-west1-docker.pkg.dev/devopsre/dev-images/cel2-migration-tool
tags: ${{ env.GIT_COMMIT }}
context: ./
dockerfile: ./op-chain-ops/Dockerfile
push: true
trivy: false

# Build op-node op-batcher op-proposer using docker-bake
build-op-stack:
runs-on: ubuntu-latest
needs: detect-files-changed
if: |
contains(needs.detect-files-changed.outputs.files-changed, 'go.sum') ||
contains(needs.detect-files-changed.outputs.files-changed, 'ops/docker') ||
contains(needs.detect-files-changed.outputs.files-changed, 'op-node/') ||
contains(needs.detect-files-changed.outputs.files-changed, 'op-batcher/') ||
contains(needs.detect-files-changed.outputs.files-changed, 'op-proposer/') ||
contains(needs.detect-files-changed.outputs.files-changed, 'op-service/') ||
contains(needs.detect-files-changed.outputs.files-changed, '.github/workflows/docker-build-scan.yaml') ||
github.event_name == 'workflow_dispatch' ||
true
permissions:
contents: read
id-token: write
security-events: write
env:
GIT_COMMIT: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
GIT_DATE: ${{ github.event.head_commit.timestamp }}
IMAGE_TAGS: ${{ (github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/celo')) && 'latest,' || '') }}${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
REGISTRY: us-west1-docker.pkg.dev
REPOSITORY: blockchaintestsglobaltestnet/dev-images
steps:
- uses: actions/checkout@v4
- name: Login at GCP Artifact Registry
uses: celo-org/reusable-workflows/.github/actions/[email protected]
with:
workload-id-provider: 'projects/1094498259535/locations/global/workloadIdentityPools/gh-optimism/providers/github-by-repos'
service-account: '[email protected]'
docker-gcp-registries: us-west1-docker.pkg.dev
# We need a custom steps as it's using docker bake
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/bake-action@v5
with:
push: true
source: .
files: docker-bake.hcl
targets: op-node,op-batcher,op-proposer
Loading
Loading