Closed ClaytonNorthey92 closed 3 months ago
To make everything go e2e, we'll need:
admin
, batcher
, proposer
, and user
)admin
, batcher
, and proposer
roles (these can be hard-coded, no need to generate new ones like we have to do in regular manual e2e on Sepolia)./deploy-opl1contracts.sh
) using the admin
ETH address./generate-l2config.sh
)op-geth
, op-node
, op-batcher
, and op-proposer
binaries with the appropriate config for the addresses we are using for the batcher and proposerop-node
will connect to our bss
container already running in the current e2e environmentThen we can check correct e2e behavior:
op-node
correctly creates new L2 blocks which are accepted by op-geth
op-node
is sending new L2 keystones to BSS
user
address to the L1 deposit contract, and see the native token balance of the address update in op-geth
after waiting 20(?) blocks; this can also be done with an RPC call to op-geth
user
address to the ETH address corresponding to the public key used by the popminer
.op-node
is successfully calculating PoP payouts - which can be seen by running an RPC call against op-geth
to get the tHEMI ERC-20 token balance of the address corresponding to the public key of the pop miner
. Check balance against token contract 0x4200000000000000000000000000000000000042
after sufficient keystones for a PoP payout (currently 250 but we can reduce this delay in e2e - see below)popminer
address to the user
address (must be done after sending ETH from user
to popminer
to pay fees)op-node
and making sure they work and return the same information as the corresponding queries ran on BFG
directlyAnd we can expand e2e tests in the future to include:
user
, making calls against op-geth
to check the expected state of smart contracts (like putting liquidity in a DEX and trading against it - might require deploying a test ERC-20 contract too).op-geth
RPC calls.batcher
and making sure op-node
eventually reorgs enpty blocks into the chain once the batcher publication allowance period has elapsedoptimism-sdk
which talks to op-geth
)optimism-sdk
)We can tweak some Optimism variables to make the e2e test go faster:
Confirmation
Problem
As of now, our local network only spins up the bitcoin+hemi services. This gives us 100% control over out bitcoin environment. We want to do the same for the ethereum/optimism side.
Suggested solution
We need to run an ethereum node in the ethereum version of running bitcoind in regtest mode. Do that then set up the rest of the optimism network to all run locally. Outside of downloading dependencies, this should be totally isolated and not require internet connection.
add these services to
./e2e/docker-compose.yml
Additional Information
@max-sanchez to provide additional details