Skip to content

Commit

Permalink
Merge pull request #341 from NethermindEth/release-v1.3.0
Browse files Browse the repository at this point in the history
Release v1.3.0
  • Loading branch information
stdevMac authored Dec 11, 2023
2 parents 416c803 + 0a3e6a9 commit 840b14a
Show file tree
Hide file tree
Showing 74 changed files with 962 additions and 601 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ jobs:
name: Build sedge
strategy:
matrix:
go: ["1.19"]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: ubuntu-latest
go: '1.19'
- os: macos-latest
go: '1.19'
- os: windows-latest
go: '1.21'
runs-on: ${{ matrix.os }}

steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- develop
workflow_dispatch:

jobs:
build:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ jobs:
name: Run unit tests
strategy:
matrix:
go: ["1.19"]
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
go: '1.19'
- os: windows-latest
go: '1.21'
runs-on: ${{ matrix.os }}

steps:
Expand Down
21 changes: 19 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.3.0] - 2023-12-11

### Added

- New `--latest` flag to `sedge generate` subcommands to use the latest version of the image in the clients.
- Integrate Holesky network.

### Fixed

- Remove TTD of the params, test cases, command flags and geth patch for custom testnets.

### Changed

- Remove default bootnodes for networks managed by clients.
- Remove custom configurations for Chiado and instead use the clients configuration.
- Update client images.

## [v1.2.3] - 2023-08-16

### Added
Expand Down Expand Up @@ -109,8 +126,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Rename sedge data directory name to `sedge-data` instead of `docker-compose-scripts`.
- Update mev-boost relay URLs.
- Fixed validator restart failure. Validator never restarts, but has a better and safer start-up method:
- Validator waits a grace period (2 epochs) before starting.
- Validator waits for the consensus sync to finish: verifying that the `/eth/v1/node/health` consensus endpoint
- Validator waits a grace period (2 epochs) before starting.
- Validator waits for the consensus sync to finish: verifying that the `/eth/v1/node/health` consensus endpoint
returns with the HTTP code 200 in the newly added `validator-blocker` docker-compose service. This replace the
older track sync method.
- Updated installation script for docker and docker compose in Linux flavours.
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Sedge is a one-click node setup tool for PoS network/chain validators and nodes
- [Mainnet](#mainnet)
- [Sepolia](#sepolia)
- [Goerli](#goerli)
- [Holesky](#holesky)
- [Gnosis](#gnosis)
- [Chiado (Gnosis testnet)](#chiado-gnosis-testnet)
- [CL clients with Mev-Boost](#cl-clients-with-mev-boost)
Expand Down Expand Up @@ -156,6 +157,15 @@ Users acknowledge that no warranty is being made of a successful installation. S
| Erigon | Prysm | Prysm |
| Besu | Teku | Teku |

### Holesky

| Execution | Consensus | Validator |
| ---------- |------------|------------|
| Geth | Lighthouse | Lighthouse |
| Nethermind | Lodestar | Lodestar |
| Erigon | Teku | Teku |
| Besu | Prysm | Prysm |

### Gnosis

| Execution | Consensus | Validator |
Expand Down
42 changes: 42 additions & 0 deletions cli/actions/generation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import (
"testing"
"time"

"github.com/distribution/reference"

"github.com/NethermindEth/sedge/cli/actions"
"github.com/NethermindEth/sedge/configs"
"github.com/NethermindEth/sedge/internal/pkg/clients"
Expand Down Expand Up @@ -250,6 +252,17 @@ func TestGenerateDockerCompose(t *testing.T) {
ContainerTag: "sampleTag",
},
},
genTestData{
name: fmt.Sprintf("execution: %s, consensus: %s, validator: %s, network: %s, no validator, with latest", executionCl, consensusCl, consensusCl, network),
genData: generate.GenData{
ExecutionClient: &clients.Client{Name: executionCl, Type: "execution"},
ConsensusClient: &clients.Client{Name: consensusCl, Type: "consensus"},
Services: []string{"execution", "consensus"},
Network: network,
ContainerTag: "sampleTag",
LatestVersion: true,
},
},
)
}
}
Expand Down Expand Up @@ -303,6 +316,16 @@ func TestGenerateDockerCompose(t *testing.T) {
assert.Equal(t, services.DefaultSedgeExecutionClient+"-sampleTag", cmpData.Services.Execution.ContainerName)
}

// Check ecImage has the right format
ecImageVersion := envData["EC_IMAGE_VERSION"]
named, err := reference.ParseNormalizedNamed(ecImageVersion)
assert.NoError(t, err, "invalid image", ecImageVersion)

// Test that the execution image is set to latest if flag --latest is provided
if tc.genData.LatestVersion {
assert.True(t, strings.HasSuffix(named.String(), ":latest"))
}

// Check that mev-boost service is not set when execution only
if tc.genData.ValidatorClient == nil && tc.genData.ConsensusClient == nil {
assert.Nil(t, cmpData.Services.Mevboost)
Expand All @@ -326,6 +349,15 @@ func TestGenerateDockerCompose(t *testing.T) {
assert.True(t, contains(t, cmpData.Services.Consensus.Command, tc.genData.CheckpointSyncUrl), "Checkpoint Sync URL not found in consensus service command: %s", cmpData.Services.Consensus.Command)
}

// Check ccImage has the right format
ccImageVersion := envData["CC_IMAGE_VERSION"]
named, err := reference.ParseNormalizedNamed(ccImageVersion)
assert.NoError(t, err, "invalid image", ccImageVersion)

// Test that the consensus image is set to latest if flag --latest is provided
if tc.genData.LatestVersion {
assert.True(t, strings.HasSuffix(named.String(), ":latest"))
}
// Validate Execution API and AUTH URLs
apiEndpoint, authEndpoint := envData["EC_API_URL"], envData["EC_AUTH_URL"]
if tc.genData.ExecutionApiUrl != "" {
Expand Down Expand Up @@ -378,6 +410,16 @@ func TestGenerateDockerCompose(t *testing.T) {
prysmURL = strings.TrimPrefix(prysmURL, "http://")
prysmURL = strings.TrimPrefix(prysmURL, "https://")

// Check vlImage has the right format
vlImageVersion := envData["VL_IMAGE_VERSION"]
named, err := reference.ParseNormalizedNamed(vlImageVersion)
assert.NoError(t, err, "invalid image", vlImageVersion)

// Test that the consensus image is set to latest if flag --latest is provided
if tc.genData.LatestVersion {
assert.True(t, strings.HasSuffix(named.String(), ":latest"))
}

// Check Consensus API URL is set and is valid
uri, err := url.ParseRequestURI(envData["CC_API_URL"])
assert.Nil(t, err)
Expand Down
2 changes: 1 addition & 1 deletion cli/actions/importKeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func setupLodestarValidatorImport(dockerClient client.APIClient, serviceManager
// CMD
var preset string
switch options.Network {
case "mainnet", "goerli", "sepolia":
case "mainnet", "goerli", "sepolia", "holesky":
preset = "mainnet"
case "gnosis", "chiado":
preset = "gnosis"
Expand Down
2 changes: 1 addition & 1 deletion cli/actions/jwt_secrets.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (s *sedgeActions) CreateJWTSecrets(options CreateJWTSecretOptions) (string,
// Generate JWT secret if necessary
var err error
jwtPath := options.JWTPath
if jwtPath == "" && configs.NetworksConfigs()[options.Network].RequireJWT {
if jwtPath == "" && !configs.NetworksConfigs()[options.Network].NoJWT {
return handleJWTSecret(options.GenerationPath)
} else if filepath.IsAbs(jwtPath) { // Ensure jwtPath is absolute
if jwtPath, err = filepath.Abs(jwtPath); err != nil {
Expand Down
14 changes: 2 additions & 12 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const (
NetworkSepolia = "sepolia"
NetworkGnosis = "gnosis"
NetworkChiado = "chiado"
NetworkHolesky = "holesky"
NetworkCustom = "custom"

NodeTypeFullNode = "full-node"
Expand Down Expand Up @@ -136,7 +137,6 @@ func setupFullNode(p ui.Prompter, o *CliCmdOptions, a actions.SedgeActions, deps
inputCustomNetworkConfig,
inputCustomChainSpec,
inputCustomGenesis,
inputCustomTTD,
inputCustomDeployBlock,
inputExecutionBootNodes,
inputConsensusBootNodes,
Expand Down Expand Up @@ -209,7 +209,6 @@ func setupExecutionNode(p ui.Prompter, o *CliCmdOptions, a actions.SedgeActions,
if o.genData.Network == NetworkCustom {
if err := runPromptActions(p, o,
inputCustomChainSpec,
inputCustomTTD,
inputExecutionBootNodes,
); err != nil {
return err
Expand Down Expand Up @@ -617,7 +616,7 @@ func runPromptActions(p ui.Prompter, o *CliCmdOptions, actions ...promptAction)
}

func selectNetwork(p ui.Prompter, o *CliCmdOptions) error {
options := []string{NetworkMainnet, NetworkGoerli, NetworkSepolia, NetworkGnosis, NetworkChiado}
options := []string{NetworkMainnet, NetworkGoerli, NetworkSepolia, NetworkGnosis, NetworkChiado, NetworkHolesky}
index, err := p.Select("Select network", "", options)
if err != nil {
return err
Expand Down Expand Up @@ -662,10 +661,6 @@ func selectExecutionClient(p ui.Prompter, o *CliCmdOptions) (err error) {
Type: "execution",
}
o.genData.ExecutionClient.SetImageOrDefault("")
// Patch Geth image if network needs TTD to be set
if o.genData.ExecutionClient.Name == "geth" && o.genData.Network == NetworkMainnet {
o.genData.ExecutionClient.Image = "ethereum/client-go:v1.10.26"
}
return nil
}

Expand Down Expand Up @@ -826,11 +821,6 @@ func inputCustomGenesis(p ui.Prompter, o *CliCmdOptions) (err error) {
return absPathInPlace(&o.genData.CustomGenesisPath)
}

func inputCustomTTD(p ui.Prompter, o *CliCmdOptions) (err error) {
o.genData.CustomTTD, err = p.Input("Custom TTD (Terminal Total Difficulty)", "0", false, ui.DigitsStringValidator)
return
}

func inputCustomDeployBlock(p ui.Prompter, o *CliCmdOptions) (err error) {
o.genData.CustomDeployBlock, err = p.Input("Custom deploy block", "0", false, ui.DigitsStringValidator)
return
Expand Down
Loading

0 comments on commit 840b14a

Please sign in to comment.