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

Interop: local devnet #11590

Merged
merged 22 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
138707c
local interop devnet
protolambda Aug 22, 2024
c794dbe
interop-devnet: experimental op-geth docker image, connect with op-su…
protolambda Sep 17, 2024
d5eb73e
interop-devnet: port and path fixes
protolambda Sep 17, 2024
a81b463
interop-devnet: datadir fix
protolambda Sep 17, 2024
ec72042
interop-local: more fixes
protolambda Sep 17, 2024
20cbfe5
interop-devnet: connect op-supervisor to L2 EL nodes using RPC
protolambda Sep 17, 2024
f1351f2
more fixes
protolambda Sep 17, 2024
58e5065
ops-bedrock: fix l2 op geth dockerfile for interop
protolambda Oct 28, 2024
749184f
interop-devnet: fix supervisor RPC add workaround
protolambda Oct 28, 2024
953aefc
interop-devnet: implement review suggestions
protolambda Oct 29, 2024
009e6d6
fixes from run-testing
axelKingsley Oct 29, 2024
7ccb2f5
Add op-deployer to dockerignore exceptions
axelKingsley Oct 30, 2024
7f5d5d2
use latest geth rc
axelKingsley Oct 30, 2024
7f0dfaf
use RW Locks in Update Functions
axelKingsley Oct 30, 2024
6ffaefd
add log for new cross-safe head
axelKingsley Oct 30, 2024
825883e
make updates much more frequent
axelKingsley Oct 30, 2024
dd63ff8
use LocalDB for LastDerivedFrom
axelKingsley Oct 30, 2024
a8b2276
Add log message for finalization update
axelKingsley Oct 30, 2024
f6c00d4
op-supervisor: fix db locking, fix crossdb usage
protolambda Oct 31, 2024
d498200
interop-devnet: use chain IDs as chain indices, since it's not transl…
protolambda Oct 31, 2024
1b67223
op-supervisor: cross-derived-from RPC method
protolambda Oct 31, 2024
8983a71
Work Process ErrFuture to Debug Log
axelKingsley Oct 31, 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
77 changes: 77 additions & 0 deletions interop-devnet/create-chains.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/bin/bash

set -eu

# Run this with workdir set as root of the repo
if [ -f "../versions.json" ]; then
echo "Running create-chains script."
else
echo "Cannot run create-chains script, must be in interop-devnet dir, but currently in:"
pwd
exit 1
fi

# Navigate to repository root
cd ..

# Check if already created
if [ -d ".devnet-interop" ]; then
echo "Already created chains."
exit 1
else
echo "Creating new interop devnet chain configs"
fi

export OP_INTEROP_MNEMONIC="test test test test test test test test test test test junk"

go run ./op-node/cmd interop dev-setup \
--artifacts-dir=packages/contracts-bedrock/forge-artifacts \
--foundry-dir=packages/contracts-bedrock \
--l1.chainid=900100 \
--l2.chainids=900200,900201 \
--out-dir=".devnet-interop" \
--log.format=logfmt \
--log.level=info

# create L1 CL genesis
eth2-testnet-genesis deneb \
axelKingsley marked this conversation as resolved.
Show resolved Hide resolved
--config=./ops-bedrock/beacon-data/config.yaml \
--preset-phase0=minimal \
--preset-altair=minimal \
--preset-bellatrix=minimal \
--preset-capella=minimal \
--preset-deneb=minimal \
--eth1-config=.devnet-interop/genesis/l1/genesis.json \
--state-output=.devnet-interop/genesis/l1/beaconstate.ssz \
--tranches-dir=.devnet-interop/genesis/l1/tranches \
--mnemonics=./ops-bedrock/mnemonics.yaml \
--eth1-withdrawal-address=0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
--eth1-match-genesis-time

echo "Writing env files now..."

# write env files for each L2 service

chain_env=".devnet-interop/env/l2/900200"
mkdir -p "$chain_env"
key_cmd="go run ./op-node/cmd interop devkey secret --domain=chain-operator --chainid=900200"
# op-node
echo "OP_NODE_P2P_SEQUENCER_KEY=$($key_cmd --name=sequencer-p2p)" >> "$chain_env/op-node.env"
# proposer
echo "OP_PROPOSER_PRIVATE_KEY=$($key_cmd --name=proposer)" >> "$chain_env/op-proposer.env"
echo "OP_PROPOSER_GAME_FACTORY_ADDRESS=$(jq -r .DisputeGameFactoryProxy .devnet-interop/deployments/l2/900200/addresses.json)" >> "$chain_env/op-proposer.env"
# batcher
echo "OP_BATCHER_PRIVATE_KEY=$($key_cmd --name=batcher)" >> "$chain_env/op-batcher.env"

chain_env=".devnet-interop/env/l2/900201"
mkdir -p "$chain_env"
key_cmd="go run ./op-node/cmd interop devkey secret --domain=chain-operator --chainid=900201"
# op-node
echo "OP_NODE_P2P_SEQUENCER_KEY=$($key_cmd --name=sequencer-p2p)" >> "$chain_env/op-node.env"
# proposer
echo "OP_PROPOSER_PRIVATE_KEY=$($key_cmd --name=proposer)" >> "$chain_env/op-proposer.env"
echo "OP_PROPOSER_GAME_FACTORY_ADDRESS=$(jq -r .DisputeGameFactoryProxy .devnet-interop/deployments/l2/900201/addresses.json)" >> "$chain_env/op-proposer.env"
# batcher
echo "OP_BATCHER_PRIVATE_KEY=$($key_cmd --name=batcher)" >> "$chain_env/op-batcher.env"
protolambda marked this conversation as resolved.
Show resolved Hide resolved

echo "Interop devnet setup is complete!"
14 changes: 14 additions & 0 deletions interop-devnet/depset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"dependencies": {
"900200": {
"chainIndex": "900200",
"activationTime": 0,
"historyMinTime": 0
},
"900201": {
"chainIndex": "900201",
"activationTime": 0,
"historyMinTime": 0
}
}
}
Loading