-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from andytudhope/how-to-setup
How to setup
- Loading branch information
Showing
17 changed files
with
348 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
--- | ||
title: Setup SUAVE | ||
description: Start running SUAVE and participating in the chain itself | ||
keywords: | ||
- build | ||
- suave | ||
- setup | ||
- practice | ||
--- | ||
|
||
# Setup SUAVE | ||
|
||
## Docker | ||
|
||
### What you need | ||
|
||
1. Install Docker. You can find general directions [here](https://docs.docker.com/get-docker/). | ||
1. If you're running Ubuntu or Debian, we recommend [this specific guide](https://docs.docker.com/engine/install/ubuntu/#installation-methods). | ||
2. Make sure you have `docker-compose` installed too. The should just happen when you install Docker. | ||
1. Check with `docker-compose version` (Docker Engine) or `docker compose version` (Docker Desktop). | ||
3. We do not have high RAM, disk, or bandwidth requirements. This section should work on most consumer laptops. | ||
|
||
### What to do | ||
|
||
1. Clone suave-geth: | ||
```bash | ||
git clone https://github.com/flashbots/suave-geth.git | ||
``` | ||
2. Get to the right place in the repo: | ||
```bash | ||
cd suave-geth/suave/devenv/ | ||
``` | ||
3. Run SUAVE: | ||
```bash | ||
docker-compose up -d | ||
``` | ||
|
||
### What just happened | ||
|
||
You just setup SUAVE and it's now running as a daemon process (which happened because of the `-d` flag we used in the `docker-compose` command). Well done! | ||
|
||
There are two kinds of SUAVE nodes, both participating in the same p2p network. We start them both in this setup. The "SUAVE Chain node" is a full node and the "MEVM node" is a full node with the ability to run confidential computation and broadcast the results. | ||
|
||
1. Read more about [confidential computation](/reference/confidential-computation) and the [APIs we've built to enable it](/reference/confidential-computation#apis). | ||
2. Dig deeper in the [architecture of the MEVM](/reference/MEVM#architecture). | ||
3. Browse a full list of the [precompiles this gives you access to in any smart contract](/reference/precompiles). | ||
|
||
### Common problems | ||
|
||
<details> | ||
<summary>1. Docker not running</summary> | ||
<div> | ||
<div> | ||
<div> | ||
Make sure that Docker is running before trying <code>docker-compose up -d</code>. On most Linux machines, you can do this with:<br/> | ||
<code> | ||
sudo systemctl start docker | ||
</code><br/><br/> | ||
Or just check the current status with:<br/> | ||
<code> | ||
sudo systemctl status docker | ||
</code> | ||
</div> | ||
</div> | ||
</div> | ||
</details> | ||
|
||
<details> | ||
<summary>2. Using Docker Desktop</summary> | ||
<div> | ||
<div> | ||
If you're using Docker Desktop, it's likely that you need to use <code>docker compose up -d</code> (without the <code>-</code>). | ||
</div> | ||
</div> | ||
</details> | ||
|
||
<details> | ||
<summary>3. Older OS won't shut down</summary> | ||
<div> | ||
<div> | ||
<div> | ||
Depending on your OS version and the way you installed Docker, you might have issues switching your new MEVM node off again. If so:<br/> | ||
<code> | ||
sudo killall containerd-shim | ||
</code><br/><br/> | ||
Now you should be able to run:<br/> | ||
<code> | ||
sudo docker-compose down | ||
</code> | ||
</div> | ||
</div> | ||
</div> | ||
</details> | ||
|
||
## 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 | ||
|
||
1. [Install go](https://go.dev/doc/install). | ||
|
||
### What to do | ||
|
||
1. Clone the repo and build the adapted geth client first with: | ||
```bash | ||
git clone https://github.com/flashbots/suave-geth.git | ||
cd suave-geth | ||
make geth | ||
``` | ||
2. Run the MEVM node first: | ||
```bash | ||
./build/bin/geth --dev --dev.gaslimit 30000000 --datadir suave_dev --http --ws \ | ||
--allow-insecure-unlock --unlock "0xb5feafbdd752ad52afb7e1bd2e40432a485bbb7f" \ | ||
--keystore ./suave/devenv/suave-ex-node/keystore/ | ||
``` | ||
3. Press `Enter` when prompted for a password | ||
4. In a new terminal, run the SUAVE Chain node: | ||
```bash | ||
./build/bin/geth --dev --dev.gaslimit 30000000 --http --http.port 8555 --ws --ws.port 8556 --authrpc.port 8561 | ||
``` | ||
|
||
### What to do next | ||
|
||
You can now run any `geth` command you like, with an additional `--suave` flag. Start by generating a new account (in another terminal): | ||
|
||
```bash | ||
./build/bin/geth --suave account new | ||
``` | ||
|
||
Consult the help page for anything else you need to do: | ||
```bash | ||
./build/bin/geth --suave help | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
title: Overview | ||
hide_title: true | ||
description: The home page of the knowledge base | ||
keywords: | ||
- flashbots | ||
- docs | ||
--- | ||
|
||
import AlignItems from "@site/src/components/AlignItems/AlignItems.tsx"; | ||
import Grid from "@site/src/components/Grid/Grid.tsx"; | ||
import GridBlock from "@site/src/components/GridBlock/GridBlock.tsx"; | ||
|
||
# Welcome to SUAVE | ||
|
||
If MEV remains centralized, we cannot realise the promises that crypto offers. | ||
|
||
SUAVE is our way to _decentralize the block building_ role by creating an open marketplace for mechanisms that innovate on both block building algorithms and order flow auctions. Such "MEV applications" can sustainably eliminate the centralizing forces in block building by creating a shared sequencing layer for anything effected by MEV. | ||
|
||
_Sharing the same sequencing layer_ reduces the economic centralization pressure on all of us, enabling: | ||
|
||
<Grid> | ||
<GridBlock symbol="I." title="Blockchains"> | ||
to stay decentralized | ||
</GridBlock> | ||
<GridBlock symbol="II." title="Block builders"> | ||
to capture cross-domain MEV | ||
</GridBlock> | ||
<GridBlock symbol="III." title="Validators"> | ||
to maximize their revenue | ||
</GridBlock> | ||
<GridBlock symbol="IV." title="Humans"> | ||
to transact fairly, with the best execution. | ||
</GridBlock> | ||
</Grid> | ||
|
||
SUAVE is _unifying infrastructure_ that allows honest MEV actors to profit more than dishonest ones, aligning our incentives around shared ownership rather than private economies of scale. | ||
|
||
We must make sure block building - and the power it implies - ends up meaningfully decentralized, because crypto must end up decentralized, because humanity needs decentralization in its financial systems, now more than ever. | ||
|
||
## About this site | ||
|
||
This site encourages you to move through a specific flow in order to start building the _future of coordination_. | ||
|
||
1. Begin with **[tutorials](/tutorials/index)**. These are _learning-oriented_. They focus on practical skills, not theoretical knowledge. Our goal with the tutorials is that you enjoy the experience and gain confidence, not that you become an expert. | ||
2. Grow with the **[how-to guides](/build/index)**. These are _task-oriented_. You can think of them like recipes. Following a recipe requires basic competence (hence why we start with tutorials). Recipes do not give you context or history: they will help you do stuff. All the recipes taken together help frame the picture of what SUAVE can enable you to do, in general. | ||
3. Consult the **[references](/reference/index)**. These are _information-oriented_ and provide you with up-to-date certainty about what interfaces and precompiles SUAVE provides and where to find them. These are our treasure maps, which tell you what you need to know about the territory you're working in, without having to go and constantly check yourself. | ||
4. Refine your **[understanding](/understand/index)**. These are _discussion-oriented_. These are designed to provide you with insight into the "deep why". Why is it meaningful to work on MEV? The discussions this section invites weave everything together. | ||
|
||
<AlignItems horizontal="center" vertical="center" sideMargin={0}> | ||
<div> | ||
<img alt="Fairier Transformers" src={require('/static/img/diatraxis.png').default} /> | ||
</div> | ||
</AlignItems> | ||
|
||
## About Flashbots | ||
|
||
Our primary focus is to enable a permissionless, transparent, and fair ecosystem for MEV. We achieve this in three ways: _Illuminate the Dark Forest_ of MEV activity, _Democratize Extraction_, and _Distribute Benefits_. | ||
|
||
We focus on: | ||
|
||
- _Product_: engineering products to fulfill our mission. | ||
- _Coordination_: organizing processes, interfacing with external teams in the ecosystem, and maximizing our impact. | ||
- _Research_: open, transparent, and collaborative research to tackle short and long term research questions relevant to MEV. | ||
|
||
You can interact with Flashbots on [Discord](https://discord.gg/7hvTycdNcK), [Github](https://github.com/flashbots/), and our [Discourse forum](https://collective.flashbots.net/). We have dedicated channels on Discord for each of our efforts and welcome your contributions. Our work is open source and you can follow our progress in each Github repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.