Skip to content

Commit

Permalink
feat: add op-erigon - mininny (#38)
Browse files Browse the repository at this point in the history
* feat: add op-erigon

* feat: add op-erigon

* add erigon test

* add notifications

* fix erigon

* add wait statement for funding address

---------

Co-authored-by: Minhyuk Kim <kimminhyuk1004@gmail.com>
  • Loading branch information
barnabasbusa and mininny authored Jun 19, 2024
1 parent 1d10311 commit c69bf34
Show file tree
Hide file tree
Showing 15 changed files with 319 additions and 32 deletions.
23 changes: 23 additions & 0 deletions .github/tests/blockscout.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
optimism_package:
- participants:
- el_type: op-geth
network_params:
name: op-rollup-one
network_id: '3151909'
additional_services:
- blockscout
- participants:
- el_type: op-geth
network_params:
name: op-rollup-two
network_id: '3151910'
additional_services:
- blockscout
ethereum_package:
participants:
- el_type: geth
- el_type: reth
network_params:
preset: minimal
additional_services:
- blockscout
27 changes: 12 additions & 15 deletions .github/tests/multiple_l2s.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
optimism_package:
- participants:
- el_type: op-geth
network_params:
name: op-rollup-one
network_id: "3151909"
additional_services:
- blockscout
- participants:
- el_type: op-geth
network_params:
name: op-rollup-two
network_id: "3151910"
additional_services:
- blockscout
- participants:
- el_type: op-geth
network_params:
name: op-rollup-one
network_id: '3151909'
additional_services: []
- participants:
- el_type: op-geth
network_params:
name: op-rollup-two
network_id: '3151910'
additional_services: []
ethereum_package:
participants:
- el_type: geth
Expand All @@ -21,4 +19,3 @@ ethereum_package:
preset: minimal
additional_services:
- dora
- blockscout
12 changes: 12 additions & 0 deletions .github/tests/op-erigon.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
optimism_package:
participants:
- el_type: op-erigon
cl_type: op-node
ethereum_package:
participants:
- el_type: geth
- el_type: reth
network_params:
preset: minimal
additional_services:
- dora
3 changes: 2 additions & 1 deletion .github/tests/op-geth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ ethereum_package:
- el_type: reth
network_params:
preset: minimal

additional_services:
- dora
3 changes: 2 additions & 1 deletion .github/tests/op-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ optimism_package:
cl_type: op-node
- el_type: op-reth
cl_type: op-node
- el_type: op-erigon
cl_type: op-node
ethereum_package:
participants:
- el_type: geth
Expand All @@ -12,4 +14,3 @@ ethereum_package:
preset: minimal
additional_services:
- dora

3 changes: 2 additions & 1 deletion .github/tests/op-reth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ ethereum_package:
- el_type: reth
network_params:
preset: minimal

additional_services:
- dora
3 changes: 2 additions & 1 deletion .github/tests/single_l2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ ethereum_package:
- el_type: reth
network_params:
preset: minimal

additional_services:
- dora
14 changes: 7 additions & 7 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
echo "Skipping ./.github/tests/mix-with-tools-mev.yaml"
fi
# - name: Notify
# if: cancelled() || failure()
# uses: Ilshidur/action-discord@master
# env:
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
# with:
# args: "The nightly test for ${{matrix.file_name}} on ethereum-package has failed find it here ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- name: Notify
if: cancelled() || failure()
uses: Ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
with:
args: "The nightly test for ${{matrix.file_name}} on ethereum-package has failed find it here ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,23 @@ optimism_package:
participants:
# EL(Execution Layer) Specific flags
# The type of EL client that should be started
# Valid values are op-geth, op-reth
# Valid values are:
# op-geth
# op-reth
# op-erigon
- el_type: geth

# The Docker image that should be used for the EL client; leave blank to use the default for the client type
# Defaults by client:
# - op-geth: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:latest
# - op-reth: parithoshj/op-reth:latest
# - op-erigon: testinprod/op-erigon:latest
el_image: ""

# CL(Consensus Layer) Specific flags
# The type of CL client that should be started
# Valid values are op-node, ?
# Valid values are:
# op-node
cl_type: op-node

# The Docker image that should be used for the CL client; leave blank to use the default for the client type
Expand All @@ -72,16 +77,21 @@ optimism_package:
network_params:
# Network name, used to enable syncing of alternative networks
# Defaults to "kurtosis"
# You can sync any public network by setting this to the network name (e.g. "mainnet", "sepolia", "holesky")
# You can sync any devnet by setting this to the network name (e.g. "dencun-devnet-12", "verkle-gen-devnet-2")
network: "kurtosis"

# The network ID of the network.
# Must be unique for each network (if you run multiple networks)
# Defaults to "2151908"
network_id: "2151908"

# Seconds per slots
seconds_per_slot: 2

# Name of your rollup.
# Must be unique for each rollup (if you run multiple rollups)
# Defaults to "op-kurtosis"
name: "op-kurtosis"

# Additional services to run alongside the network
# Defaults to []
# Available services:
Expand Down
3 changes: 2 additions & 1 deletion main.star
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def run(plan, args):
# Deploy the L1
plan.print("Deploying a local L1")
l1 = ethereum_package.run(plan, ethereum_args)

plan.print(l1.network_params)
# Get L1 info
all_l1_participants = l1.all_participants
l1_network_params = l1.network_params
Expand All @@ -33,6 +33,7 @@ def run(plan, args):
contract_deployer.deploy_factory_contract(plan, l1_priv_key, l1_config_env_vars)

# Deploy L2s
plan.print("Deploying a local L2")
if type(args["optimism_package"]) == "dict":
l2_services_suffix = "" # no suffix if one l2
l2_launcher.launch_l2(
Expand Down
1 change: 1 addition & 0 deletions network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ optimism_package:
participants:
- el_type: op-geth
- el_type: op-reth
- el_type: op-erigon
additional_services:
- blockscout
ethereum_package:
Expand Down
3 changes: 2 additions & 1 deletion src/contracts/contract_deployer.star
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ def deploy_l2_contracts(
"sleep 3",
"cd /workspace/optimism/packages/contracts-bedrock",
"./scripts/getting-started/config.sh",
"sleep 5",
'jq \'. + {"fundDevAccounts": true, "useInterop": true}\' $DEPLOY_CONFIG_PATH > tmp.$$.json && mv tmp.$$.json $DEPLOY_CONFIG_PATH',
# sleep till gs_admin_address is funded
"while true; do sleep 1; echo 'GS_ADMIN_ADDRESS is not yet funded...'; if [ \"$(web3 balance $GS_ADMIN_ADDRESS)\" != \"0\" ]; then echo 'GS_ADMIN_ADDRESS is funded!'; break; fi; done",
"forge script scripts/Deploy.s.sol:Deploy --private-key $GS_ADMIN_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL",
"sleep 3",
"CONTRACT_ADDRESSES_PATH=$DEPLOYMENT_OUTFILE forge script scripts/L2Genesis.s.sol:L2Genesis --sig 'runWithStateDump()' --chain-id $L2_CHAIN_ID",
Expand Down
Loading

0 comments on commit c69bf34

Please sign in to comment.