Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0e80687
change devnet deployment celo env vars
ezdac Jan 31, 2025
b32aba1
ci: change e2e job
ezdac Jan 31, 2025
dbfb1ed
Fix and refactor celo e2e tests
ezdac Oct 15, 2024
6a8e200
Use Deno in circleci for celo-test
ezdac Feb 3, 2025
39fd9e2
Update Deno dependencies
ezdac Feb 4, 2025
8ac359f
Fix teardown in deno test runner
ezdac Feb 4, 2025
ebe674b
Use L1 RPC via --rpc-url
ezdac Feb 4, 2025
562fc55
Fix missing `--broadcast` for forge create v0.3.0
ezdac Feb 4, 2025
c341bbf
celo-test-util: allow for no timeout in poll-function
ezdac Feb 12, 2025
a428ffd
celo-test-runner: remove overwrite-permissions
ezdac Feb 12, 2025
f7fd22c
celo-test-runner: add address-file and test-account seedphrase options
ezdac Feb 12, 2025
02571a0
WIP: new updates and fixes
ezdac Feb 21, 2025
422bddd
WIP: test improvements
ezdac Feb 21, 2025
6cf213b
WIP: withdraw action improvement
ezdac Feb 21, 2025
4c425f2
Add .env documentation
ezdac Feb 21, 2025
fa438c3
Add baklava configuration
ezdac Feb 21, 2025
b960581
Remove shell runner
ezdac Feb 21, 2025
8461f5a
improve test-accounts funding
ezdac Feb 24, 2025
90a3980
Rename initial fault-game wait function
ezdac Feb 24, 2025
2f1b579
Fix seed-phrase wrapped with resolve()
ezdac Feb 24, 2025
3a5aa95
Fix test context counting
ezdac Feb 24, 2025
cd3fa71
Change tokenduality test signature
ezdac Feb 24, 2025
a9140d5
Rename contracts address file for devnet
ezdac Feb 24, 2025
7f86433
Add example privkey information for baklava
ezdac Feb 24, 2025
c0e72b2
Add dryrun contracts
ezdac Mar 20, 2025
901b0c9
Add exponential backoff to pollFunction
ezdac Mar 20, 2025
3428492
Account for gas in funding
ezdac Mar 20, 2025
70466c5
Account for gas in withdraw test
ezdac Mar 20, 2025
d05090f
CHECKPOINT: save new tests
ezdac Mar 23, 2025
38d404d
CHECKPOINT: add new tests, add artifact storage
ezdac Mar 24, 2025
5ad7370
CHECKPOINT: fix funding for mainnet
ezdac Mar 24, 2025
f3a6dda
Update l1 contracts to new dryrun deployment
ezdac Mar 25, 2025
4e7b6f9
Add sleeps in between writes for rpc node congestion
ezdac Mar 25, 2025
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
52 changes: 31 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ jobs:
cp -r .devnet/ .devnet-mt-cannon/
- run:
name: Generate Celo allocs
command: DEVNET_L2OO="true" DEVNET_CELO="true" make devnet-allocs
command: DEVNET_L2OO="false" DEVNET_ALTDA="true" GENERIC_ALTDA="true" DEVNET_CELO="true" make devnet-allocs
- run:
name: Copy Celo allocs to .devnet-celo
command: cp -r .devnet/ .devnet-celo/
Expand Down Expand Up @@ -259,12 +259,7 @@ jobs:
- ".devnet-altda"
- ".devnet-altda-generic"
- ".devnet-mt-cannon"
- ".devnet-celo/addresses.json"
- ".devnet-celo/allocs-l1.json"
- ".devnet-celo/allocs-l2-delta.json"
- ".devnet-celo/allocs-l2-ecotone.json"
- ".devnet-celo/allocs-l2-fjord.json"
- ".devnet-celo/addresses.json"
- ".devnet-celo"
- notify-failures-on-develop

docker-build:
Expand Down Expand Up @@ -1039,12 +1034,15 @@ jobs:
condition:
equal: ['celo', <<parameters.variant>>]
steps:
- run:
name: Set DEVNET_ALTDA = true
command: echo 'export DEVNET_ALTDA=true' >> $BASH_ENV
- run:
name: Set GENERIC_ALTDA = true
command: echo 'export GENERIC_ALTDA=true' >> $BASH_ENV
- run:
name: Set DEVNET_CELO = true
command: echo 'export DEVNET_CELO=true' >> $BASH_ENV
- run:
name: Set DEVNET_L2OO = true
command: echo 'export DEVNET_L2OO=true' >> $BASH_ENV
- when:
condition:
equal: ['altda-generic', <<parameters.variant>>]
Expand Down Expand Up @@ -1138,25 +1136,37 @@ jobs:
command: make devnet-test
- when:
condition:
equal: ['celo', <<parameters.variant>>]
equal: ['celo', <<parameters.variant>>]
steps:
# TODO: include this in the base image directly
- run:
name: install Deno v2.
command: |
curl -fsSL https://deno.land/install.sh | DENO_INSTALL=$HOME/.local sh -s v2.1.9 &&
echo 'export PATH=$HOME/.local/bin/:${PATH}' >> $BASH_ENV
- run:
name: set Deno cache path in env
command: |
echo 'export DENO_DIR=$HOME/.cache/deno' >> $BASH_ENV
- restore_cache:
key: v1-celo-deps-{{ checksum "op-e2e/celo/package-lock.json" }}
# install dependencies
key: deno-cache-v2-{{ checksum "op-e2e/celo/deno.lock" }}
paths:
- ~/.cache/deno
- run:
working_directory: op-e2e/celo
name: install dependencies
command: npm install
# save any changes to the cache
name: Cache Deno Dependencies
working_directory: op-e2e/celo
command: deno run cache-deps
- save_cache:
key: v1-celo-deps-{{ checksum "op-e2e/celo/package-lock.json" }}
key: deno-cache-v2-{{ checksum "op-e2e/celo/deno.lock" }}
paths:
- op-e2e/celo/node_modules
- ~/.cache/deno
- run:
working_directory: op-e2e/celo
environment:
CELOTEST_SPAWN_DEVNET: false
working_directory: op-e2e/celo
name: Run Celo e2e tests
command: |
SPAWN_DEVNET=false ./run_all_tests.sh
deno run test
- run:
name: Dump op-node logs
command: |
Expand Down
22 changes: 13 additions & 9 deletions bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,27 @@ def main():

def init_devnet_l1_deploy_config(paths, update_timestamp=False):
deploy_config = read_json(paths.devnet_config_template_path)
if update_timestamp:
deploy_config['l1GenesisBlockTimestamp'] = '{:#x}'.format(int(time.time()))
if DEVNET_L2OO:
deploy_config['useFaultProofs'] = False
if DEVNET_ALTDA:
deploy_config['useAltDA'] = True
if GENERIC_ALTDA:
deploy_config['daCommitmentType'] = "GenericCommitment"
if DEVNET_CELO:
deploy_config['useFaultProofs'] = True
deploy_config['useCustomGasToken'] = True
deploy_config['gasPriceOracleScalar'] = 0
# 'gasPriceOracleScalar' has to be zero in order for those
# to work
deploy_config['gasPriceOracleBlobBaseFeeScalar'] = 0
deploy_config['gasPriceOracleBaseFeeScalar'] = 0

deploy_config['useCustomGasToken'] = True
deploy_config['deployCeloContracts'] = True
# Usage of the zero address in combination of the useCustomGasToken == True
# will deploy a new contract
deploy_config['customGasTokenAddress'] = "0x0000000000000000000000000000000000000000"
if update_timestamp:
deploy_config['l1GenesisBlockTimestamp'] = '{:#x}'.format(int(time.time()))
if DEVNET_L2OO:
deploy_config['useFaultProofs'] = False
if DEVNET_ALTDA:
deploy_config['useAltDA'] = True
if GENERIC_ALTDA:
deploy_config['daCommitmentType'] = "GenericCommitment"
write_json(paths.devnet_config_path, deploy_config)

def devnet_l1_allocs(paths):
Expand Down
17 changes: 17 additions & 0 deletions op-e2e/celo/.baklava.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export CELOTEST_L1_RPCURL='https://ethereum-holesky-rpc.publicnode.com'
export CELOTEST_L2_RPCURL='https://baklava-forno.celo-testnet.org'
export CELOTEST_L1_CHAINID=17000
export CELOTEST_L2_CHAINID=62320
export CELOTEST_MONOREPOPATH='../../'
export CELOTEST_TESTDIRPATH='./tests/'
export CELOTEST_ARTIFACTSDIRPATH='./artifacts/baklave'
export CELOTEST_ADDRESSES_L1_FILEPATH='./networks/62320/contracts-l1.json'
export CELOTEST_ADDRESSES_L2_FILEPATH='./networks/62320/celo-contracts.json'
# overwrite this to a key with funds
# this is the key for the address: 0x030632d4dF4337f1E68185d362F4f8625cF93e05
export CELOTEST_FUNDER_PRIVATEKEY="0xc30ed659e31b7ae41af336ea65bcecc26d3a4bd8b162d6ed663486d3d65da767"
# overwrite this, the default key is publicly known:
export CELOTEST_ACCOUNTS_SEEDPHRASE="this purse lady disagree hand journey sight group stay quote tenant clown"
export CELOTEST_SPAWN_DEVNET=false
export CELOTEST_USE_FAULTPROOFS=true
export CELOTEST_USE_ALTDA=true
48 changes: 48 additions & 0 deletions op-e2e/celo/.default.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# RPC URL of an L2 node to test against
export CELOTEST_L2_RPCURL='http://localhost:9545'

# RPC URL of an L2 node to test against
# - has to be the L1 used for the above specified L2's derivation
export CELOTEST_L1_RPCURL='http://localhost:8545'

# expected Chain-Id of the above specified L1
export CELOTEST_L1_CHAINID=900

# expected Chain-Id of the above specified L2
export CELOTEST_L2_CHAINID=901

# root path of the `optimism` monorepo. used for e.g. contract source code location
# and local devnet instantiation
export CELOTEST_MONOREPOPATH='../../'

# path of the "@celo-test/runner" compatible directory where tests are located
# see package README for more information
export CELOTEST_TESTDIRPATH='./tests/'
export CELOTEST_ARTIFACTSDIRPATH='./artifacts/default'

# `make devnet-allocs` optimism compatible output for the optimism L1 contracts
export CELOTEST_ADDRESSES_L1_FILEPATH='../../.devnet/addresses.json'

# `celocli network:contracts --json` (compatible) output for the relevant celo contracts.
# What contracts need to be specified is dependent on what is required in the individual tests
# The contracts addresses will be injected into the test context's viem L2 client chain data.
export CELOTEST_ADDRESSES_L2_FILEPATH='./networks/901/celo-contracts.json'

# a funded account's private key.
# has to have native balance on L1 and L2, funds will get distributed to test-accounts.
# (here private-key of: m/44'/60'/0'/0/11 of "test test test test test test test test test test test junk")
export CELOTEST_FUNDER_PRIVATEKEY="0x701b615bbdfb9de65240bc28bd21bbc0d996645a3dd57e7b12bc2bdf6f192c82"

# seedphrase used to generate accounts for concurrently running tests, will get funded on demand by the funder (see above)
export CELOTEST_ACCOUNTS_SEEDPHRASE="output volume pigeon concert double live dial tonight force history plug cluster"

# spawn/cleanup the local devnet before/after running the tests
export CELOTEST_SPAWN_DEVNET=true

# use faultproofs in the local devnet
# OR expect fault-proofs when running against another network
export CELOTEST_USE_FAULTPROOFS=true

# use the alt-da in the local devnet
# OR expect using alt-da when running against another network
export CELOTEST_USE_ALTDA=true
11 changes: 11 additions & 0 deletions op-e2e/celo/.mainnet-dryrun.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export CELOTEST_L1_RPCURL='https://eth.drpc.org'
export CELOTEST_L2_RPCURL='https://forno.celo.org/cel2'
export CELOTEST_L1_CHAINID=1
export CELOTEST_L2_CHAINID=42220
export CELOTEST_MONOREPOPATH='../../'
export CELOTEST_TESTDIRPATH='./tests/'
export CELOTEST_ADDRESSES_L1_FILEPATH='./networks/42220-dryrun/contracts-l1.json'
export CELOTEST_ADDRESSES_L2_FILEPATH='./networks/42220-dryrun/celo-contracts.json'
export CELOTEST_SPAWN_DEVNET=false
export CELOTEST_USE_FAULTPROOFS=true
export CELOTEST_USE_ALTDA=true
4 changes: 0 additions & 4 deletions op-e2e/celo/.prettierrc.toml

This file was deleted.

3 changes: 0 additions & 3 deletions op-e2e/celo/babel.config.cjs

This file was deleted.

1 change: 1 addition & 0 deletions op-e2e/celo/contracts/L2StandardBridge.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions op-e2e/celo/contracts/OptimismMintableERC20Factory.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions op-e2e/celo/contracts/StandardBridge.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions op-e2e/celo/contracts/TestBridgeToken.json

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions op-e2e/celo/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"tasks": {
"test": "deno test --allow-write='./' --allow-read --allow-run --allow-net='127.0.0.1,localhost' --allow-env --env-file=.default.env --env-file=.env main.test.ts"
"test-baklava": "deno test --allow-write='./' --allow-read --allow-run --allow-net --allow-env --env-file=.baklava.env main.test.ts"
"test-dryrun": "deno test --allow-write='./' --allow-read --allow-run --allow-net --allow-env --env-file=.mainnet-dryrun.env main.test.ts"
"cache-deps": "deno cache main.test.ts"
},
"workspace": [
"./packages/celo-test-runner",
"./packages/celo-test-util",
"./packages/celo-test-viem"
],
"imports": {
"@celo/celocli": "npm:@celo/celocli@^6.0.0",
"@dx/reflect": "jsr:@dx/reflect@^0.2.14",
"@std/assert": "jsr:@std/assert@^1.0.11",
"@std/dotenv": "jsr:@std/dotenv@^0.225.3",
"@std/expect": "jsr:@std/expect@^1.0.13",
"@std/io": "jsr:@std/io@^0.225.2",
"@std/testing": "jsr:@std/testing@^1.0.9",
"reverse-mirage": "npm:reverse-mirage@^1.1.0",
"viem": "npm:viem@^2.22.21"
},
}
Loading
Loading