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
It is highly advised that if you did decide to play around with these Docker containers that you use an existing Ethereum enviroment builder
4
-
instead of trying to put all the pieces together. That's especially important for Proof-Of-Stake networks, where the setup is a multi-stage
5
-
operation that needs to be executed in specific order and where multiple containers need access to the same (or shared) state.
3
+
If you plan to experiment with these Docker containers, **use an existing Ethereum environment builder** rather than assembling components manually. This is particularly important for Proof-of-Stake (PoS) networks, where the setup involves multi-stage operations and shared state across multiple containers.
6
4
7
-
By default, each of supported clients has a default image version that's defined [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/lib/docker/ethereum/images.go).
8
-
All of them apart from Reth, come in two flavours: one that is a Proof-Of-Stake (Ethereum 2.0) network and another that's a Proof-Of-Work/Authority (Ethereum 1.0). Reth has only the former
9
-
since the latter was never implemented by its creators.
5
+
Each supported client has a default image version defined [here](https://github.com/smartcontractkit/chainlink-testing-framework/blob/main/lib/docker/ethereum/images.go). Clients (except Reth) are available in two flavors:
All of these epehemeral networks are using a grossly simplified configuration that is composed of a single blockchain node. Technically that's also true, in case of PoS networks,
12
-
even though they are running three containers:
13
-
* execution layer container
14
-
* consensus layer container
15
-
* validator
9
+
Reth supports only PoS networks.
10
+
11
+
These ephemeral networks use a simplified configuration with a single blockchain node. For PoS, three containers simulate this:
12
+
- Execution layer
13
+
- Consensus layer
14
+
- Validator
16
15
17
16
> [!NOTE]
18
-
> We use our own fork of [Ethereum Genesis Generator](https://github.com/ethpandaops/ethereum-genesis-generator) to
19
-
> create genesis files both for PoW/PoA and PoS Ethereum networks.
20
-
21
-
## Execution Layer
22
-
Following execution layers are available
23
-
* Besu
24
-
* Erigon
25
-
* Geth
26
-
* Nethermind
27
-
* Reth
28
-
29
-
## Consensus Layer
30
-
Only one consensus client is available: Prysm.
31
-
32
-
# Quick start
33
-
The simplest of starting a new Ethereum network is by specifying only the execution layer:
17
+
> We use a fork of [Ethereum Genesis Generator](https://github.com/ethpandaops/ethereum-genesis-generator) to create genesis files for PoS networks.
18
+
19
+
---
20
+
21
+
## Execution Layer Clients
22
+
The following execution layer clients are available:
23
+
- Besu
24
+
- Erigon
25
+
- Geth
26
+
- Nethermind
27
+
- Reth
28
+
29
+
## Consensus Layer Client
30
+
-**Prysm** (the only available consensus client).
31
+
32
+
---
33
+
34
+
# Quick Start
35
+
36
+
The simplest way to start an Ethereum network is by specifying the execution layer only:
37
+
34
38
```go
35
39
builder:=NewEthereumNetworkBuilder()
36
40
cfg, err:= builder.
@@ -45,15 +49,14 @@ if err != nil {
45
49
panic(err)
46
50
}
47
51
```
52
+
If no version is specified, **Ethereum 1.0 (pre-Merge)** will be used.
48
53
49
-
If no Ethereum version is specified, Ethereum 1.0 (pre-Merge) will be used.
54
+
### Starting Ethereum 2.0 Networks
55
+
To start an Ethereum 2.0 network, add the Ethereum version parameter:
50
56
51
-
# Ethereum 2 network
52
-
To start Ethereum 2.0 network you need to pass one more parameter to the builder:
When passing custom docker image for execution layer you don't need to use neither `WithEthereumVersion()` nor `WithExecutionLayer()` functions
104
-
as we will get these from the Docker image.
105
-
106
106
> [!NOTE]
107
-
> There are two useful "synthetic" Docker tags you can use with custom images:
108
-
> -`latest_available` - which represents the latest release (including pre-releases)
109
-
> -`latest_stable` - which represents latest **stable** release
107
+
> Use the `latest_available` tag for the most recent release, including pre-releases, or the `latest_stable` tag for the latest officially stable release. The `latest_available` may include beta or development versions, whereas `latest_stable` ensures compatibility with production environments.
108
+
109
+
---
110
+
111
+
# Advanced Options
112
+
113
+
## Connect to Existing Docker Networks
114
+
By default, a new random Docker network is created. To use an existing one:
110
115
111
-
# Existing Docker network(s)
112
-
By default, the chain will be started on a new Docker network with random name. If you want it to connect to existing one instead, use the following option:
Below you will find a description of easily customisable parameters of the chain or its startup.
126
-
127
-
## Slots per epoch and seconds per slot (Ethereum 2.0 only)
128
-
These parameters control how fast epochs progress.
129
-
130
-
`Seconds per slot` represents the number of seconds that validator have to vote on blocks.
131
-
The lower the value the faster the epoch finalisation. If it's too low, validators will not be
132
-
able to vote and no new blocks will be produced. Minimum allowed value is `3`.
133
-
134
-
`Slots per epoch` represent the number of voting runds per epoch. The lower the number, the faster
135
-
the finalization. Minimum allowed value is `2.`
136
-
137
-
## ChainID
138
-
Can be anything as long as it's an integer.
139
-
140
-
## Addresses to fund
141
-
Addresses that will be funded with `9000000000000000000000000000 wei` in the genesis.
124
+
## Chain Customization
142
125
143
-
## Hard Forks (Ethereum 2.0 only)
144
-
Map of hard fork name to epoch, in which the fork should happen. Has to be `> 0`. It's useful for testing
145
-
how software will behave during the fork. Currently, the only fork that's supported is `Deneb`, but it can
146
-
only be used with Docker images that belong to "pre-Deneb times" and running on `Shanghai` version of Ethereum 2.0
147
-
(so pretty old versions). For the latest images there are no supported future forks as of time of this documentation
148
-
creation there were no dates set for any of the incoming forks (which means none of them is supported by neither
149
-
execution nor consensus layer clients).
126
+
### Ethereum 2.0 Parameters
127
+
-**Seconds per slot**: This defines how many seconds validators have to propose and vote on blocks. Lower values accelerate block production and epoch finalization but can cause issues if validators fail to keep up. The minimum allowed value is `3`.
128
+
-**Slots per epoch**: Determines the number of slots (voting rounds) per epoch. Lower values mean epochs finalize faster, but fewer voting rounds can impact network stability. The minimum value is `2`.
129
+
-**Genesis delay**: The extra delay (in seconds) before the genesis block starts. This ensures all containers (execution, consensus, and validator) are up and running before block production begins.
130
+
-**Validator count**: Specifies the number of validators in the network. A higher count increases the robustness of block validation but requires more resources. The minimum allowed value is `4`.
150
131
151
-
## Validator count (Ethereum 2.0 only)
152
-
Number of validators to run. `4` is a minimum allowed.
132
+
### General Parameters
133
+
-**ChainID**: Integer value for the chain.
134
+
-**Addresses to fund**: Pre-fund accounts in the genesis block.
153
135
154
-
## Genesis Delay (Ethereum 2.0 only)
155
-
Extra delay added to genesis block timestamp to be sure that both layers are up and running before it happens. Increasing it could be
156
-
useful in case of running on very slow system.
157
-
158
-
## Default values
159
-
Default chain config comes with the following values:
0 commit comments