Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
8a3ab51
Simplify CI
palango Aug 17, 2023
973e779
dependabot: no PRs for version updates
karlb Sep 13, 2023
cf57748
adding trivy scanning to the Docker files (#41)
pputman-clabs Sep 12, 2023
507aae5
Update op-geth
karlb Feb 7, 2024
c9e68b0
Add fee currency parameter to IntrinsicGas
karlb Feb 5, 2024
3535b73
Add forkdiff comparison to optimism (#32)
Aug 22, 2023
496473e
Add Celo contracts
pahor167 Aug 29, 2023
8e0a22a
Enable cel2 fork by default
karlb Sep 19, 2023
e458eaf
Use celo-org/op-geth container for devnet
karlb Sep 19, 2023
75fcc27
Change base fee recipient in TestFees
karlb Feb 13, 2024
c6221b2
Enable Cel2 in e2e tests
karlb Feb 13, 2024
f05c746
Add token duality e2e test
karlb Sep 27, 2023
1d6564b
Run new e2e tests as part of devnet CI job
karlb Sep 27, 2023
6469616
Add cel2 testnet setup code
karlb Aug 29, 2023
22ec6d1
Fix circle
palango May 16, 2024
dfc7a1d
Skip shellcheck for now
palango May 16, 2024
51beed1
Add license identifier to ISortedOracles
palango May 17, 2024
a27bb91
Add celo deployment to L2Genesis
palango May 15, 2024
2817c00
Disable SortedOracles in Genesis
karlb May 28, 2024
e30010c
Add more powerful MockSortedOracles
karlb Apr 3, 2024
73146a6
Add fee currency functions to MintableERC20
karlb Apr 22, 2024
f42be38
Update soldity pragma for interfaces
karlb Apr 22, 2024
7e1b0fe
Add Fee Currency directory
pahor167 May 21, 2024
c4afb09
Fix warning
pahor167 May 21, 2024
25c7c4d
address update + sorted oracles update
pahor167 May 22, 2024
ebfa521
register cUSD to FeeDirectory
pahor167 May 22, 2024
353a4b0
Disable cUSD in L2 genesis for now
karlb May 28, 2024
7933fbc
Update semver-lock
palango May 17, 2024
1d6226d
Fix Genesis contract count test
karlb May 28, 2024
47d1189
Update snapshots
karlb May 29, 2024
d39c360
GH Action to deploy op-contracts to Holesky
alvarof2 May 16, 2024
7d0807a
Fixes
alvarof2 May 16, 2024
57af499
Executable
alvarof2 May 16, 2024
77b5b52
Branch to commit
alvarof2 May 16, 2024
95c25ca
GH Action to deploy celo4 contracts
alvarof2 May 17, 2024
a97f4a9
--legacy for celo4 GH Action
alvarof2 May 17, 2024
092bf6f
envsubst for op-ufm
alvarof2 May 20, 2024
5e377d9
op-ufm GH Action
alvarof2 May 20, 2024
0a0f057
Image name
alvarof2 May 20, 2024
86afa19
Add feature flag for celo contract deployment
palango Jun 5, 2024
abef21a
Add `celo-migrate` tool for state migration
palango Aug 2, 2023
e438347
Remove config options for DB options
palango Jun 11, 2024
6e41571
Initial script to play with celo DB history migration
mcortesi Apr 29, 2024
2677854
Can Read All the headers
mcortesi Apr 29, 2024
cbbc17f
Adds new command to migrate ancients db
mcortesi Apr 30, 2024
da81742
Adds comment
mcortesi Apr 30, 2024
e88665a
Adds extension methods for transformation
mcortesi Apr 30, 2024
f3feeeb
Implements Transform CeloBody
mcortesi Apr 30, 2024
d3aff38
Adds impl that runs steps in a concurrent pipeline
mcortesi Apr 30, 2024
c1b2e7a
Adds transformHead, verify hashing works
mcortesi Apr 30, 2024
c1cca6e
add migration for non-frozen blocks
May 2, 2024
8787ce8
copy over entire db and modify in place, works with op-geth at piersy…
May 3, 2024
3ac4661
remove unecessary copying, cleanup code
May 3, 2024
f004979
close and reopen DBs
May 6, 2024
349aaf1
migrate newdb in place
May 6, 2024
9f841a4
saving progress
May 6, 2024
4ae2e22
Refactor code to improve database migration process
mcortesi May 7, 2024
2df677a
better logging
mcortesi May 7, 2024
f158be8
refactor: inline parMigrateAncientRange
mcortesi May 7, 2024
84d516a
Remove frozen blocks from nonAncient DB
mcortesi May 7, 2024
a48f897
check hash matches on nonAncients migration
mcortesi May 7, 2024
0fecde3
clean up branch
mcortesi May 7, 2024
f1d88a2
decode into new types
May 8, 2024
5c4a1e5
fix transformHeader
mcortesi May 8, 2024
393e96e
make old freezer not readonly so that .meta files are created
May 8, 2024
ba6dd59
update go.mod to use migration op-geth branch
May 10, 2024
b4733a8
add configurable memory limit
May 14, 2024
98589ef
add comment about memory
May 14, 2024
cb6bfe5
Added celo-dbmigrate Makefile target
jcortejoso May 15, 2024
a0c245b
Added dockerfile for celo-dbmigrate and celo-migrate tools
jcortejoso May 15, 2024
3eceff0
Workflow for running cel2-migration-tool
jcortejoso May 20, 2024
0db68ff
Update cel2-migration-tool image registry
jcortejoso May 20, 2024
45f126b
update op-geth to point to https://github.com/celo-org/op-geth/commit…
Jun 12, 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
814 changes: 13 additions & 801 deletions .circleci/config.yml

Large diffs are not rendered by default.

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/**'
50 changes: 50 additions & 0 deletions .github/workflows/docker-build-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Docker Build Scan
on:
pull_request:
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
needs: detect-files-changed
if: |
contains(needs.detect-files-changed.outputs.files-changed, 'op-chain-ops/cmd/celo-dbmigrate') ||
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')
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/auth-gcp-artifact-registry@v2.0
with:
workload-id-provider: 'projects/1094498259535/locations/global/workloadIdentityPools/gh-optimism/providers/github-by-repos'
service-account: 'celo-optimism-gh@devopsre.iam.gserviceaccount.com'
docker-gcp-registries: us-west1-docker.pkg.dev
- name: Build and push container
uses: celo-org/reusable-workflows/.github/actions/build-container@v2.0
with:
platforms: linux/amd64
registry: us-west1-docker.pkg.dev/devopsre/dev-images/cel2-migration-tool
tags: ${{ github.sha }}
context: ./
dockerfile: ./op-chain-ops/Dockerfile
push: true
trivy: false
41 changes: 41 additions & 0 deletions .github/workflows/docker-op-ufm-build-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Build op-ufm container and push to cLabs registry
on:
push:
branches:
- cel4
paths:
# Run if any of the following files are changed
- 'op-ufm/**'
workflow_dispatch:

jobs:
build:
runs-on: ['self-hosted', 'org', '8-cpu']
permissions: # Required for workload identity auth and push the trivy results to GitHub
contents: read
id-token: write
security-events: write
steps:

- name: Checkout
uses: actions/checkout@v4

- name: Authenticate to Google Cloud
uses: celo-org/reusable-workflows/.github/actions/auth-gcp-artifact-registry@main
with:
workload-id-provider: projects/1094498259535/locations/global/workloadIdentityPools/gh-optimism/providers/github-by-repos
service-account: celo-optimism-gh@devopsre.iam.gserviceaccount.com
access-token-lifetime: "60m"
docker-gcp-registries: us-west1-docker.pkg.dev

- name: Build, push and scan the container
uses: celo-org/reusable-workflows/.github/actions/build-container@main
with:
platforms: linux/amd64
registry: us-west1-docker.pkg.dev/devopsre/dev-images/op-ufm
tags: test
context: .
dockerfile: op-ufm/Dockerfile
push: true
trivy: false
33 changes: 33 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and publish forkdiff github-pages
permissions:
contents: write
on:
push:
branches:
- celo[0-9]+
jobs:
deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1000 # make sure to fetch the old commit we diff against

- name: Build forkdiff
uses: "docker://protolambda/forkdiff:0.1.0"
with:
args: -repo=/github/workspace -fork=/github/workspace/fork.yaml -out=/github/workspace/index.html

- name: Build pages
run: |
mkdir -p tmp/pages
mv index.html tmp/pages/index.html
touch tmp/pages/.nojekyll

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: tmp/pages
clean: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ __pycache__

# Ignore echidna artifacts
crytic-export

# vscode
.vscode/
Loading