Important
Prerequisites
Before you start, make sure you have the following installed on your machine:
- Go
- Rust
- Docker
- Make
- Kurtosis CLI (installed later in the setup process)
Run the following to download the dependencies, build, and run the project:
make deps build run
All the components, including sequencer, gateway, portal, and follower nodes will start in a new kurtosis enclave. To test sending transactions, you can use make test-tx
Run make
to see the available commands:
$ make
build-op-geth ποΈ Build OP geth from op-eth directory
build-op-node ποΈ Build OP node from optimism directory
build-portal ποΈ Build based portal from based directory
build-gateway ποΈ Build based gateway from based directory
build ποΈ Build
clean π§Ή Clean
deps π Install all dependencies
gateway π Run the gateway
help π Show help for each of the Makefile recipes
logs π Show logs
restart π Restart
run-follower π Run a single follower node with RPC enabled.
run π Run
Warning
This will remove the based-op enclave.
Run the following to restart the project:
make restart
To view the logs, run the following:
make op-node-logs // OP node logs
make op-reth-logs // OP reth logs
make gateway-logs // Based gateway logs
make portal-logs // Based portal logs
make logs SERVICE=<service> // Replace <service> with the service name
make build-portal // Build the local portal docker image, named `based_portal_local`
make build-gateway // Build the local gateway docker image, named `based_gateway_local`
make build-op-geth // Builds the modified op-geth image, named `based_op_geth`
make build-op-node // Build the modified op-node image, named `based_op_node`
To run multiple OP nodes with kurtosis, edit the config.yml
file adding more items to the participants
vector:
optimism_package:
chains:
- participants:
# Vanilla Stack (OP-Node, OP-EL) for the Sequencer
- el_type: op-reth
cl_type: op-node
cl_image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:latest
# Follower Node Stack 1 (BOP-Node, BOP-EL)
- el_type: op-geth
el_image: based_op_geth
el_extra_params:
- --rollup.sequencerhttp
- http://host.docker.internal:9997
cl_type: op-node
cl_image: based_op_node
cl_extra_params:
- --rpc.enable-based
# Follower Node Stack 2 (BOP-Node, BOP-EL)
- el_type: op-geth
el_image: based_op_geth
el_extra_params:
- --rollup.sequencerhttp
- http://host.docker.internal:9997
cl_type: op-node
cl_image: based_op_node
cl_extra_params:
- --rpc.enable-based
mev_type: based-portal
mev_params:
based_portal_image: based_portal_local
builder_host: "172.17.0.1"
builder_port: "9997"
additional_services:
- blockscout
ethereum_package:
participants:
- el_type: geth
# This is fixed because v1.15.0 (latest) introduces braking changes
el_image: ethereum/client-go:v1.14.13
Wallets commonly use a high polling interval for the transaction receipt. To be able to see the preconfirmation speed, we modify Rabby to speed up that interval. You can test it compiling it:
make build-rabby
And importing it to your browser locally (see Firefox or Chrome references). The compiled extension directory is rabby/dist
for Google Chrome, and rabby/dist-mv2
for Mozilla Firefox.
Warning
You need to have our modified Rabby extension installed.
- Open your Rabby extension.
- Import, create a new wallet, or use your existing one.
- Click on "More".
- Scroll down to the "Settings" section.
- Click on "Add Custom Network".
- Fill the form with the following values:
- Network Name:
Based-OP
- RPC URL:
http://localhost:8545
- Chain ID:
2151908
- Symbol:
ETH
- Block Explorer URL:
<TODO>
- Network Name:
- Check the "This network supports preconfirmations" option.
- Click on "Confirm".
Now, you have added your local follower node RPC as the custom network.
Warning
You need to have our modified Rabby extension installed and connected to your local follower node.
- Open your Rabby extension.
- Click on "Send".
- Click on the "Chain" dropdown and select "Based-OP".
- Fill the form.
- Click on "Send".
- Sign the transaction.
- Enjoy.