Run a node
Our goal​
A SUAVE node is two nodes in a trenchcoat, both participating in the same p2p network. We're going to start both in this guide.
The "MEVM instance" 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 (i.e. run confidential computation). You need to run one MEVM instance per domain. Right now, we support Ethereum L1, but more domains will become available as we add the necessary precompiles, like
simulatePolygonBundle
orbuildOptimismBlock
etc. This will mean running many MEVM instances: one for each domain.The "Chain instance" 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, as everyone should broadcast their hints on SUAVE.
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 easily 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 instance and the Chain instance 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 and what those transactions are in our worked examples.
- Read more about confidential computation and the APIs we've built to enable it.
- Dig deeper in the architecture of the MEVM.
- Browse a full list of the precompiles this gives you access to in builder solidity.
- 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 the adapted geth client first with:
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_dev --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