Run a computor
Our goal
Participating in SUAVE requires running what we call a "SUAVE computor". A SUAVE computor is two nodes in a trenchcoat, both participating in the same p2p network. We're going to start both in this guide.
The "MEVM node" is a full node that can run confidential computation and broadcast the results. You need to run it in order to act on information you receive. You need to run one MEVM node per blockchain you're operating on. Right now, we support Ethereum L1, but more blockchains will become available as we add the necessary precompiles, like
simulatePolygonBundle
orbuildOptimismBlock
etc.The "SUAVE Chain node" is also a full node. You need to run it in order to receive information about transactions on any domain that broadcasts to the SUAVE chain. You only need to run one of these.
Docker
What you need
- Install and start Docker. You can find general directions here.
- If you're running Ubuntu or Debian, we recommend this specific guide.
- Make sure you have
docker-compose
installed too. The should just happen when you install Docker.- Check with
docker-compose version
(Docker Engine) ordocker compose version
(Docker Desktop).
- Check with
- We do not have high RAM, disk, or bandwidth requirements. This section should work on most consumer laptops.
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 (depending on your docker setup, you may need to run this as
sudo
):
make devnet-up
Optional testing
- If you'd like to test your node by deploying a contract and sending it some transactions, you can do so by running:
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
What just happened
Both the MEVM and the SUAVE Chain node are now running in separate containers, which means your local SUAVE dev environment is ready to go. If you followed through with Step 4 above, you've also deployed a contract in your local environment and sent some transactions to it.
- Learn more about the contract you deployed in our how to write a contract guide.
- Understand the term SUAVE computor in greater detail.
- Dig deeper in the architecture of the MEVM and the APIs available.
- Read more about confidential data storage.
- Browse a full list of SUAVE precompiles.
- If you'd like to examine the Go code responsible for deploying contracts and sending transactions, you can do so here.
Common problems
1. Docker not running
docker-compose up -d
. On most Linux machines, you can do this with:sudo systemctl start docker
Or just check the current status with:
sudo systemctl status docker
Build it yourself
The docker-compose
version above sets up SUAVE using simple defaults. If you'd like to run the binaries yourself and customise what is happening, read on.
What you need
What to do
- Clone the repo and build SUAVE:
git clone https://github.com/flashbots/suave-geth.git
cd suave-geth
make suave
- Run the MEVM instance first:
./build/bin/suave --dev --dev.gaslimit 30000000 --datadir suave --http --ws \
--allow-insecure-unlock --unlock "0xb5feafbdd752ad52afb7e1bd2e40432a485bbb7f" \
--keystore ./suave/devenv/suave-ex-node/keystore/
- Press
Enter
when prompted for a password - In a new terminal, run the Chain instance:
./build/bin/suave --dev --dev.gaslimit 30000000 --http --http.port 8555 --ws --ws.port 8556 --authrpc.port 8561
What to do next
You can now run any SUAVE command you like. Start by generating a new account (in another terminal):
./build/bin/suave --suave account new
If the --datadir
flag is not set, a geth client stores data in the $HOME/.ethereum
directory. Depending on the chain you use, it creates a subdirectory. For example, if you run Sepolia, geth creates $HOME/.ethereum/sepolia/
. So, if you use the --suave
flag, your data ends up in $HOME/.ethereum/suave/...
.
Consult the help page for anything else you need to do:
./build/bin/suave --suave help