Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add kiln instructions (do not merge WIP) #3590

Merged
merged 3 commits into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/the_nimbus_book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Quickstart
- [Run the beacon node](./quick-start.md)
- [Run a validator](./run-a-validator.md)
- [Run Kiln](./kiln.md)

# How-to (beacon node)
- [Install dependencies](./install.md)
Expand Down
118 changes: 118 additions & 0 deletions docs/the_nimbus_book/src/kiln.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Run Kiln

Kiln is the latest long-running merge testnet. It provides the perfect opportunity to verify your setup works as expected through the proof-of-stake transition and in a post-merge context. If you come across any issues, please [report them here](https://github.com/status-im/nimbus-eth2/issues).

> **N.B.** Post merge, Node runners will need to run both a consensus and execution layer client.

## 1. Preparation

#### 1.1 Download configs

To download the merge testnet configurations, run:

```
git clone https://github.com/eth-clients/merge-testnets.git
cd merge-testnets/kiln
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a question of how much to mirror the Kiln launchpad instructions, which this is obviously doing, and reasonably so.

Mostly, it's fine, and they're good instructions, but I'm not sure that their methods of using merge-testnets/kiln as the current working directory is ideal. It kind of pollutes the git repo.

It might be better to adjust the instructions later to refer to merge-testnets/kiln/genesis.json or similar in various places where they currently assume the current working directory.

Or, maybe not -- there's an argument for keeping this as parallel and interchangeable with the Launchpad instructions as feasible, in which case, well.

```

#### 1.2 Generate secret
To generate and write the JWT secret to a file, run:
```
openssl rand -hex 32 | tr -d "\n" > "/tmp/jwtsecret"
```

You will need to pass this file to both the Execution Client and the Consensus Client (the JWT secret is an authentication mechanism between CL/EL).


## 2. Execution client

> We recommend running either Nethermind or Geth with Nimbus

### Nethermind

#### 2.1N Clone and build
Clone and build the `kiln` branch of Nethermind:

```
git clone --recursive -b kiln https://github.com/NethermindEth/nethermind.git
cd nethermind/src/Nethermind
dotnet build Nethermind.sln -c Release
```

#### 2.2N Start the client
Start Nethermind:

```
cd kiln/nethermind/src/Nethermind/Nethermind.Runner
dotnet run -c Release -- --config kiln --JsonRpc.Host=0.0.0.0 --JsonRpc.JwtSecretFile=/tmp/jwtsecret
```

### Geth

#### 2.1G Clone and build

Clone and build the `merge-kiln-v2` branch from Marius' fork of Geth:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that's what the launchpad instructions say, and this is currently mostly a copy of those, but https://github.com/MariusVanDerWijden/go-ethereum/commits/merge-kiln-v2 was abandoned a month ago, and now one can use the master Geth repo branch with the --kiln instructions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other advantage is that it'd mean that the Geth instructions wouldn't be dependent on the merge-testnets/kiln location, because it'd be using its own internal copy of that.


```
git clone -b merge-kiln-v2 https://github.com/MariusVanDerWijden/go-ethereum.git
cd go-ethereum
make geth
cd ..
```

#### 2.2G Start the client

Start Geth:

```
cd kiln
./go-ethereum/build/bin/geth init genesis.json --datadir "geth-datadir"
./go-ethereum/build/bin/geth --datadir "geth-datadir" --http --http.api="engine,eth,web3,net,debug" --ws --ws.api="engine,eth,web3,net,debug" --http.corsdomain "*" --networkid=1337802 --syncmode=full --authrpc.jwtsecret=/tmp/jwtsecret --bootnodes "enode://c354db99124f0faf677ff0e75c3cbbd568b2febc186af664e0c51ac435609badedc67a18a63adb64dacc1780a28dcefebfc29b83fd1a3f4aa3c0eb161364cf94@164.92.130.5:30303" console

```

## 3. Nimbus

#### 3.1 Clone and build Nimbus from source

Clone and build Nimbus from source from the `kiln-dev-auth` branch:

```
git clone --branch=kiln-dev-auth https://github.com/status-im/nimbus-eth2.git
cd nimbus-eth2
make update OVERRIDE=1
make nimbus_beacon_node
cd ..
```

#### 3.2 Start the client

Start Nimbus:

```
nimbus-eth2/build/nimbus_beacon_node \
--network=merge-testnets/kiln \
--web3-url=ws://127.0.0.1:8551 \
--rest \
--metrics \
--log-level=DEBUG \
--terminal-total-difficulty-override=20000000000000 \
--jwt-secret="/tmp/jwtsecret"
```

## Useful resources

- Kiln [landing page](https://kiln.themerge.dev/): add the network to your browser wallet, view block explorers, request funds from the faucet, and connect to a JSON RPC endpoint.

- Kiln [validator launchpad](https://kiln.launchpad.ethereum.org/en/): make a deposit for your validator.

- [EF launchpad notes](https://notes.ethereum.org/@launchpad/kiln): how to run a node on Kiln

- [Ethereum On Arm Kiln RP4 image](https://ethereum-on-arm-documentation.readthedocs.io/en/latest/kiln/kiln-testnet.html): Run Nimbus on a raspberry pi or using an AWS AMI

<br/>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bunch of empty lines at the end?