Skip to content

Commit b088580

Browse files
authored
Remove example blacklist (flashbots#56)
This one was not maintained and it's the responsibility of the entity running the builder to decide on and maintain a blacklist
1 parent e72580c commit b088580

File tree

4 files changed

+60
-104
lines changed

4 files changed

+60
-104
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ profile.cov
4747
/dashboard/assets/package-lock.json
4848

4949
**/yarn-error.log
50+
/ofac_blacklist.json
51+
/blacklist.json

README.md

Lines changed: 56 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
[geth readme](README.original.md)
22

3-
# Builder API
3+
# Flashbots Block Builder
44

5-
Builder API implementing [builder spec](https://github.com/ethereum/builder-specs), making geth into a standalone block builder.
5+
This project implements the Flashbots block builder, based on go-ethereum (geth).
6+
7+
See also: https://docs.flashbots.net/flashbots-mev-boost/block-builders
68

79
Run on your favorite network, including Mainnet, Goerli, Sepolia and local devnet. Instructions for running a pos local devnet can be found [here](https://github.com/avalonche/eth-pos-devnet).
810

@@ -32,68 +34,67 @@ Builder-related options:
3234
$ geth --help
3335
3436
BUILDER
35-
37+
3638
--builder (default: false)
3739
Enable the builder
38-
40+
3941
--builder.beacon_endpoint value (default: "http://127.0.0.1:5052")
4042
Beacon endpoint to connect to for beacon chain data [$BUILDER_BEACON_ENDPOINT]
41-
43+
4244
--builder.bellatrix_fork_version value (default: "0x02000000")
4345
Bellatrix fork version. [$BUILDER_BELLATRIX_FORK_VERSION]
44-
46+
4547
--builder.dry-run (default: false)
4648
Builder only validates blocks without submission to the relay
47-
49+
4850
--builder.genesis_fork_version value (default: "0x00000000")
4951
Gensis fork version. [$BUILDER_GENESIS_FORK_VERSION]
50-
52+
5153
--builder.genesis_validators_root value (default: "0x0000000000000000000000000000000000000000000000000000000000000000")
5254
Genesis validators root of the network. [$BUILDER_GENESIS_VALIDATORS_ROOT]
53-
55+
5456
--builder.listen_addr value (default: ":28545")
5557
Listening address for builder endpoint [$BUILDER_LISTEN_ADDR]
56-
58+
5759
--builder.local_relay (default: false)
5860
Enable the local relay
59-
61+
6062
--builder.no_bundle_fetcher (default: false)
6163
Disable the bundle fetcher
62-
64+
6365
--builder.relay_secret_key value (default: "0x2fc12ae741f29701f8e30f5de6350766c020cb80768a0ff01e6838ffd2431e11")
6466
Builder local relay API key used for signing headers [$BUILDER_RELAY_SECRET_KEY]
65-
67+
6668
--builder.remote_relay_endpoint value
6769
Relay endpoint to connect to for validator registration data, if not provided
6870
will expose validator registration locally [$BUILDER_REMOTE_RELAY_ENDPOINT]
69-
71+
7072
--builder.secondary_remote_relay_endpoints value
7173
Comma separated relay endpoints to connect to for validator registration data
7274
missing from the primary remote relay, and to push blocks for registrations
7375
missing from or matching the primary [$BUILDER_SECONDARY_REMOTE_RELAY_ENDPOINTS]
74-
76+
7577
--builder.secret_key value (default: "0x2fc12ae741f29701f8e30f5de6350766c020cb80768a0ff01e6838ffd2431e11")
7678
Builder key used for signing blocks [$BUILDER_SECRET_KEY]
77-
78-
--builder.validation_blacklist value (default: "ofac_blacklist.json")
79+
80+
--builder.validation_blacklist value (default: "")
7981
Path to file containing blacklisted addresses, json-encoded list of strings.
80-
Default assumes CWD is repo's root
81-
82+
8283
--builder.validator_checks (default: false)
8384
Enable the validator checks
8485
8586
MINER
8687
8788
--miner.algotype value (default: "mev-geth")
8889
Block building algorithm to use [=mev-geth] (mev-geth, greedy)
89-
90-
--miner.blocklist value
90+
91+
--miner.blocklist value
9192
flashbots - Path to JSON file with list of blocked addresses. Miner will ignore
9293
txs that touch mentioned addresses.
9394
94-
--miner.extradata value
95+
--miner.extradata value
9596
Block extra data set by the miner (default = client version)
96-
97+
9798
METRICS
9899
99100
--metrics.builder value (default: false)
@@ -109,10 +110,19 @@ BUILDER_TX_SIGNING_KEY - private key of the builder used to sign payment transac
109110

110111
To enable metrics on the builder you will need to enable metrics with the flags `--metrics --metrics.addr 127.0.0.1 --metrics.builder` which will run
111112
a metrics server serving at `127.0.0.1:6060/debug/metrics`. This will record performance metrics such as block profit and block building times.
112-
The full list of metrics can be found in `miner/metrics.go`.
113+
The full list of metrics can be found in `miner/metrics.go`.
113114

114115
See the [metrics docs](https://geth.ethereum.org/docs/monitoring/metrics) for geth for more documentation.
115116

117+
## Blacklisting addresses
118+
119+
If you want to reject transactions interacting with certain addresses, save the addresses in json file with an array of strings. Deciding whether to use such a list, as well as maintaining it, is your own responsibility.
120+
121+
- for block building, use `--miner.blocklist`
122+
- for validation, use `--builder.validation_blacklist`
123+
124+
--
125+
116126
## Details of the implementation
117127

118128
There are two parts of the builder.
@@ -161,18 +171,33 @@ Miner is responsible for block creation. Request from the `builder` is routed to
161171
* Builder can filter transactions touching a particular set of addresses.
162172
If a bundle or transaction touches one of the addresses it is skipped. (see `--miner.blocklist` flag)
163173

164-
## Bundle Movement
174+
## Bundle Movement
165175

166-
There are two ways bundles are moved to builders
176+
There are two ways bundles are moved to builders
167177

168-
1. via API -`sendBundle`
178+
1. via API -`sendBundle`
169179
2. via Database - `flashbotsextra.IDatabaseService`
170180

171-
### `fetcher` service
172-
* Fetcher service is part of `flashbotsextra.IDatabaseService` which is responsible for fetching the bundles from db and pushing into mev bundles queue which will be processed by builder.
173-
* Fetcher is a background process which fetches high priority and low priority bundles from db.
174-
* Fetcher fetches `500` high priority bundles on every head change, and `100` low priority bundles in the interval of every `2 seconds`.
181+
### `fetcher` service
182+
* Fetcher service is part of `flashbotsextra.IDatabaseService` which is responsible for fetching the bundles from db and pushing into mev bundles queue which will be processed by builder.
183+
* Fetcher is a background process which fetches high priority and low priority bundles from db.
184+
* Fetcher fetches `500` high priority bundles on every head change, and `100` low priority bundles in the interval of every `2 seconds`.
175185

176186
## Block builder diagram
177187

178188
![block builder diagram](docs/builder/builder-diagram.png "Block builder diagram")
189+
190+
---
191+
192+
# Security
193+
194+
If you find a security vulnerability in this project or any other initiative
195+
related to proposer/builder separation in Ethereum, please let us know sending
196+
an email to [email protected].
197+
198+
---
199+
200+
# License
201+
202+
The code in this project is free software under the [LGPL License](COPYING.LESSER).
203+

cmd/utils/flags.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,8 @@ var (
705705
}
706706
BuilderBlockValidationBlacklistSourceFilePath = &cli.StringFlag{
707707
Name: "builder.validation_blacklist",
708-
Usage: "Path to file containing blacklisted addresses, json-encoded list of strings. Default assumes CWD is repo's root",
709-
Value: "ofac_blacklist.json",
708+
Usage: "Path to file containing blacklisted addresses, json-encoded list of strings",
709+
Value: "",
710710
Category: flags.BuilderCategory,
711711
}
712712
BuilderEnableLocalRelay = &cli.BoolFlag{

ofac_blacklist.json

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)