Run SUAVE with Docker
If you'd like to run SUAVE in Docker, this is the guide for you.
What you need
- Install and start Docker.
- Make sure you have
docker-compose
installed too, which should be part of the regular Docker setup (check withdocker compose version
ordocker-compose version
).
What to do
Clone suave-geth:
git clone https://github.com/flashbots/suave-geth.git
Get to the right place in the repo:
cd suave-geth/
Run SUAVE:
make devnet-up
1. Docker permission errors
It is likely best to create a new user group for Docker, rather than run the above command as sudo. You can do by running:
sudo usermod -aG docker $USER newgrp docker
Testing transactions
Test your node by deploying a contract and sending it some transactions:
go run suave/devenv/cmd/main.go
You should see something like the below printed to your terminal (addresses, txns, and ids will differ):
suave-geth$ go run suave/devenv/cmd/main.go
Step 0: Create and fund test accounts
- Funded test account: 0x66d5a8D6B34329c0639071275b3d78D29e11EbC6 (100000000)
Step 1: Deploy mev-share contract
- Mev share contract deployed: 0x8f21Fdd6B4f4CacD33151777A46c122797c8BF17
Step 2: Send bid
- Bid sent at txn: 0xb49debcdead2b306d6ab6282b88fdad7c8d6a33d87df34b79f56d141eae7c08a
- Bid id: 30bbc65298f24e67aaf5c95bf5f0686c
Step 3: Send backrun
- Backrun sent at txn: 0xcf7880e61e94aaab48c60655c321716ecab6edab752586448b0412e93a969889
- Backrun bid id: db98b83d02694fc2b13c042ad22c233
If you'd like to examine the Go code responsible for deploying contracts and sending transactions, you can do so here.
- You can stop your docker containers with:
make devnet-down
Troubleshooting
Docker not running
Make sure that Docker is running. On most Linux machines, you can do this with:
sudo systemctl start docker
You can check the current status with:
sudo systemctl status docker
If you installed Docker and still run into issues with docker-compose, you can try:
sudo apt install docker-compose
Unsupported version
If you're running an older version of Docker, you may get a message that looks like this:
ERROR: Version in "././suave/devenv/docker-compose.yml" is unsupported.
Go to the file in "/suave/devenv/docker-compose.yml" and change the first line to use 3.3 rather than 3.8.