Skip to content

Commit 367e949

Browse files
Ruteriavalonche
authored andcommitted
Implement geth-embedded builder API
1 parent a38f410 commit 367e949

File tree

19 files changed

+1922
-47
lines changed

19 files changed

+1922
-47
lines changed

README.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
## Go Ethereum
1+
[geth readme](README.original.md)
22

33
Official Golang execution layer implementation of the Ethereum protocol.
44

5-
[![API Reference](
6-
https://camo.githubusercontent.com/915b7be44ada53c290eb157634330494ebe3e30a/68747470733a2f2f676f646f632e6f72672f6769746875622e636f6d2f676f6c616e672f6764646f3f7374617475732e737667
7-
)](https://pkg.go.dev/github.com/ethereum/go-ethereum?tab=doc)
8-
[![Go Report Card](https://goreportcard.com/badge/github.com/ethereum/go-ethereum)](https://goreportcard.com/report/github.com/ethereum/go-ethereum)
9-
[![Travis](https://travis-ci.com/ethereum/go-ethereum.svg?branch=master)](https://travis-ci.com/ethereum/go-ethereum)
10-
[![Discord](https://img.shields.io/badge/discord-join%20chat-blue.svg)](https://discord.gg/nthXNEv)
5+
Builder API implementing [builder spec](https://github.com/ethereum/builder-specs), making geth into a standalone block builder.
116

12-
Automated builds are available for stable releases and the unstable master branch. Binary
13-
archives are published at https://geth.ethereum.org/downloads/.
7+
Run on your favorite network, including Kiln and local devnet.
148

15-
## Building the source
9+
Requires forkchoice update to be sent for block building, on public testnets run beacon node modified to send forkchoice update on every slot [example modified beacon client (lighthouse)](https://github.com/flashbots/lighthouse)
1610

1711
For prerequisites and detailed build instructions please read the [Installation Instructions](https://geth.ethereum.org/docs/getting-started/installing-geth).
1812

@@ -132,33 +126,40 @@ called [*Rinkeby*](https://www.rinkeby.io) which is operated by members of the c
132126
$ geth --rinkeby console
133127
```
134128

135-
### Configuration
129+
### Full node on the Ropsten test network
136130

137-
As an alternative to passing the numerous flags to the `geth` binary, you can also pass a
138-
configuration file via:
131+
In addition to Görli and Rinkeby, Geth also supports the ancient Ropsten testnet. The
132+
Ropsten test network is based on the Ethash proof-of-work consensus algorithm. As such,
133+
it has certain extra overhead and is more susceptible to reorganization attacks due to the
134+
network's low difficulty/security.
139135

140-
```shell
141-
$ geth --config /path/to/your_config.toml
142-
```
136+
Builder API has two hooks into geth:
137+
* On forkchoice update, changing the payload attributes feeRecipient to the one registered for next slot's validator
138+
* On new sealed block, consuming the block as the next slot's proposed payload
143139

144-
To get an idea of how the file should look like you can use the `dumpconfig` subcommand to
145-
export your existing configuration:
140+
## Limitations
146141

147-
```shell
148-
$ geth --your-favourite-flags dumpconfig
149-
```
142+
* Blocks are only built on forkchoice update call from beacon node
143+
* Only works post-Bellatrix, fork version is static
144+
* Does not accept external blocks
145+
* Does not have payload cache, only the latest block is available
150146

151-
*Note: This works only with `geth` v1.6.0 and above.*
147+
## Usage
152148

153-
#### Docker quick start
154-
155-
One of the quickest ways to get Ethereum up and running on your machine is by using
156-
Docker:
149+
To get an idea of how the file should look like you can use the `dumpconfig` subcommand to
150+
export your existing configuration:
157151

158-
```shell
159-
docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \
160-
-p 8545:8545 -p 30303:30303 \
161-
ethereum/client-go
152+
Builder API options:
153+
```
154+
$ geth --help
155+
BUILDER API OPTIONS:
156+
--builder.validator_checks Enable the validator checks
157+
--builder.secret_key value Builder API key used for signing headers (default: "0x2fc12ae741f29701f8e30f5de6350766c020cb80768a0ff01e6838ffd2431e11") [$BUILDER_SECRET_KEY]
158+
--builder.listen_addr value Listening address for builder endpoint (default: ":28545") [$BUILDER_LISTEN_ADDR]
159+
--builder.genesis_fork_version value Gensis fork version (default: "0x02000000") [$BUILDER_GENESIS_FORK_VERSION]
160+
--builder.bellatrix_fork_version value Bellatrix fork version (default: "0x02000000") [$BUILDER_BELLATRIX_FORK_VERSION]
161+
--builder.genesis_validators_root value Genesis validators root of the network (static). For kiln use 0x99b09fcd43e5905236c370f184056bec6e6638cfc31a323b304fc4aa789cb4ad (default: "0x0000000000000000000000000000000000000000000000000000000000000000") [$BUILDER_GENESIS_VALIDATORS_ROOT]
162+
--builder.beacon_endpoint value Beacon endpoint to connect to for beacon chain data (default: "http://127.0.0.1:5052") [$BUILDER_BEACON_ENDPOINT]
162163
```
163164

164165
This will start `geth` in snap-sync mode with a DB memory allowance of 1GB, as the

0 commit comments

Comments
 (0)