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

[TT-950] Support for more eth1 clients #859

Merged
merged 42 commits into from
Mar 15, 2024
Merged

[TT-950] Support for more eth1 clients #859

merged 42 commits into from
Mar 15, 2024

Conversation

Tofel
Copy link
Contributor

@Tofel Tofel commented Mar 7, 2024

Tested with these EVM node ranges:

  • Geth: 1.9.1 - 1.13.14
  • Erigon: 2.40.0 - 2.58.1
  • Nethermind: 1.16.0 - 1.25.4
  • Besu: 22.1 - 24.1.2

Plus a bunch of other changes to private Ethereum network builder:

  • consensus layer can be skipped now
  • execution layer can be skipped if you're passing a custom docker image for it

Simplified version:

builder := NewEthereumNetworkBuilder()
_, err := builder.
  WithCustomDockerImages(map[ContainerType]string{
	  ContainerType_ExecutionLayer: fmt.Sprintf("hyperledger/besu:%s", AUTOMATIC_STABLE_LATEST_TAG)}).
Build()

Or with TOML:

[PrivateEthereumNetwork.CustomDockerImages]
execution_layer="hyperledger/besu:24.2.0-RC2"

Added two custom tags to our custom docker image handling:

  • latest_available
  • latest_stable

If you use them as shown in the example above we will fetch list of releases from Github and then either select latest one (even if it's a draft or pre-release) or latest stable.

Other changes:

  • simplified and more universal structure for eth1 and eth2 clients
  • Eth1 Geth always run with PoA consensus
  • Eth1 Nethermind always runs with PoA consensus
  • Eth1 Besu always runs with PoA consensus
  • Eth1 Erigon always runs with PoW consensus (simulated --fakepow)
  • consensus_type is deprecated and replaced with ethereum_version with two possible values: eth1 and eth2 (as these better capture the idea); backward compatibility is maintained.
  • evmclient will fail if main wallet has 0 balance when running on simulated network (as it would fail anyway during funding attempt)
  • EVMClient now has GetEthClient() method that return underlaying ethclient.Client (from go-ethereum)
  • Dedicated method for restarting Postgres DB (used by some VRF tests) that reuses old containers (allows to avoid random errors in the CI)
  • split docker-related e2e tests into 3 groups (defined by build tags) that run in 3 separate CI jobs
  • better errors for starting eth1/eth2 containers

Tested in this core PR with this new pipeline

Tested in this run that bumping go-ethereum would have failed, if tested with EVM node in v1.10.0. ✅

CCIP was tested with this branch here

@Tofel Tofel changed the title Tt 950 pow clients [TT-950] Support for more eth1 clients Mar 7, 2024
@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
11.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube

@Tofel Tofel merged commit 89f87c3 into main Mar 15, 2024
13 of 17 checks passed
@Tofel Tofel deleted the tt_950_pow_clients branch March 15, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants