You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-31Lines changed: 56 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
[geth readme](README.original.md)
2
2
3
-
# Builder API
3
+
# Flashbots Block Builder
4
4
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
6
8
7
9
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).
8
10
@@ -32,68 +34,67 @@ Builder-related options:
32
34
$ geth --help
33
35
34
36
BUILDER
35
-
37
+
36
38
--builder (default: false)
37
39
Enable the builder
38
-
40
+
39
41
--builder.beacon_endpoint value (default: "http://127.0.0.1:5052")
40
42
Beacon endpoint to connect to for beacon chain data [$BUILDER_BEACON_ENDPOINT]
41
-
43
+
42
44
--builder.bellatrix_fork_version value (default: "0x02000000")
--builder.genesis_validators_root value (default: "0x0000000000000000000000000000000000000000000000000000000000000000")
52
54
Genesis validators root of the network. [$BUILDER_GENESIS_VALIDATORS_ROOT]
53
-
55
+
54
56
--builder.listen_addr value (default: ":28545")
55
57
Listening address for builder endpoint [$BUILDER_LISTEN_ADDR]
56
-
58
+
57
59
--builder.local_relay (default: false)
58
60
Enable the local relay
59
-
61
+
60
62
--builder.no_bundle_fetcher (default: false)
61
63
Disable the bundle fetcher
62
-
64
+
63
65
--builder.relay_secret_key value (default: "0x2fc12ae741f29701f8e30f5de6350766c020cb80768a0ff01e6838ffd2431e11")
64
66
Builder local relay API key used for signing headers [$BUILDER_RELAY_SECRET_KEY]
65
-
67
+
66
68
--builder.remote_relay_endpoint value
67
69
Relay endpoint to connect to for validator registration data, if not provided
68
70
will expose validator registration locally [$BUILDER_REMOTE_RELAY_ENDPOINT]
69
-
71
+
70
72
--builder.secondary_remote_relay_endpoints value
71
73
Comma separated relay endpoints to connect to for validator registration data
72
74
missing from the primary remote relay, and to push blocks for registrations
73
75
missing from or matching the primary [$BUILDER_SECONDARY_REMOTE_RELAY_ENDPOINTS]
74
-
76
+
75
77
--builder.secret_key value (default: "0x2fc12ae741f29701f8e30f5de6350766c020cb80768a0ff01e6838ffd2431e11")
76
78
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: "")
79
81
Path to file containing blacklisted addresses, json-encoded list of strings.
80
-
Default assumes CWD is repo's root
81
-
82
+
82
83
--builder.validator_checks (default: false)
83
84
Enable the validator checks
84
85
85
86
MINER
86
87
87
88
--miner.algotype value (default: "mev-geth")
88
89
Block building algorithm to use [=mev-geth] (mev-geth, greedy)
89
-
90
-
--miner.blocklist value
90
+
91
+
--miner.blocklist value
91
92
flashbots - Path to JSON file with list of blocked addresses. Miner will ignore
92
93
txs that touch mentioned addresses.
93
94
94
-
--miner.extradata value
95
+
--miner.extradata value
95
96
Block extra data set by the miner (default = client version)
96
-
97
+
97
98
METRICS
98
99
99
100
--metrics.builder value (default: false)
@@ -109,10 +110,19 @@ BUILDER_TX_SIGNING_KEY - private key of the builder used to sign payment transac
109
110
110
111
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
111
112
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`.
113
114
114
115
See the [metrics docs](https://geth.ethereum.org/docs/monitoring/metrics) for geth for more documentation.
115
116
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
+
116
126
## Details of the implementation
117
127
118
128
There are two parts of the builder.
@@ -161,18 +171,33 @@ Miner is responsible for block creation. Request from the `builder` is routed to
161
171
* Builder can filter transactions touching a particular set of addresses.
162
172
If a bundle or transaction touches one of the addresses it is skipped. (see `--miner.blocklist` flag)
163
173
164
-
## Bundle Movement
174
+
## Bundle Movement
165
175
166
-
There are two ways bundles are moved to builders
176
+
There are two ways bundles are moved to builders
167
177
168
-
1. via API -`sendBundle`
178
+
1. via API -`sendBundle`
169
179
2. via Database - `flashbotsextra.IDatabaseService`
170
180
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`.
0 commit comments