Skip to content

Commit

Permalink
Release v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AntiD2ta authored Apr 7, 2023
2 parents e596ce2 + fbfd8c9 commit ec494bd
Show file tree
Hide file tree
Showing 22 changed files with 301 additions and 70 deletions.
17 changes: 17 additions & 0 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.1.0] - 2023-04-07

### Added

- Unit tests

### Changed

- Update client images to Shapella-ready version.
- Update Nethermind client settings. Use default JSON-RPC modules, Prunning Cache size, and Snap Sync mode.
- Update Goerli checkpoint sync to use [this]( https://goerli.checkpoint-sync.ethpandaops.io).

### Fixed

- Fix Erigon command line flags.
- Checkpoint sync URL prompt is not longer mandatory.

## [v1.0.0] - 2023-3-23

### Added
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,16 @@ The following roadmap covers the main features and ideas we want to implement bu
- [x] Windows support
- [x] Bug fixes

### Version 1.0 (Current)
### Version 1.0

- [x] Full Ethereum PoS support with MEV-Boost
- [x] Set up and run only one node (execution/consensus/validator)
- [x] Keystore generation
- [x] Slashing protection

### Version 1.X
### Version 1.X (Current)

- [ ] Support Erigon on Gnosis
- [ ] Include monitoring tool for alerting, tracking validator balance, and tracking sync progress and status of nodes
- [ ] More tests!!!
- [ ] Support for Nimbus client
Expand Down
8 changes: 4 additions & 4 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ func checkCLIDependencies(p ui.Prompter, o *CliCmdOptions, a actions.SedgeAction
return err
}
}
return fmt.Errorf("%w: %s. To install dependencies if supported run: 'sedge deps install", ErrMissingDependencies, strings.Join(pendingDependencies, ", "))
return fmt.Errorf("%w: %s. To install dependencies if supported run: 'sedge deps install'", ErrMissingDependencies, strings.Join(pendingDependencies, ", "))
}
// for _, s := range supported {
// if err := depsMgr.Install(s); err != nil {
Expand Down Expand Up @@ -975,17 +975,17 @@ func inputImportSlashingProtectionFrom(p ui.Prompter, o *CliCmdOptions) (err err
}

func inputExecutionAPIUrl(p ui.Prompter, o *CliCmdOptions) (err error) {
o.genData.ExecutionApiUrl, err = p.InputURL("Execution API URL", "", false)
o.genData.ExecutionApiUrl, err = p.InputURL("Execution API URL", "", true)
return
}

func inputExecutionAuthUrl(p ui.Prompter, o *CliCmdOptions) (err error) {
o.genData.ExecutionAuthUrl, err = p.InputURL("Execution Auth API URL", "", false)
o.genData.ExecutionAuthUrl, err = p.InputURL("Execution Auth API URL", "", true)
return
}

func inputConsensusAPIUrl(p ui.Prompter, o *CliCmdOptions) (err error) {
o.genData.ConsensusApiUrl, err = p.InputURL("Consensus API URL", "", false)
o.genData.ConsensusApiUrl, err = p.InputURL("Consensus API URL", "", true)
return
}

Expand Down
6 changes: 3 additions & 3 deletions cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ func TestCli(t *testing.T) {
prompter.EXPECT().Select("Select consensus client", "", ETHClients["consensus"]).Return(3, nil),
prompter.EXPECT().InputURL("Checkpoint sync URL", configs.NetworksConfigs()[genData.Network].CheckpointSyncURL, false).Return("http://checkpoint.sync", nil),
prompter.EXPECT().InputURL("Mev-Boost endpoint", "", false).Return("http://mev-boost:3030", nil),
prompter.EXPECT().InputURL("Execution API URL", "", false).Return("http://execution:5051", nil),
prompter.EXPECT().InputURL("Execution Auth API URL", "", false).Return("http://execution:5051", nil),
prompter.EXPECT().InputURL("Execution API URL", "", true).Return("http://execution:5051", nil),
prompter.EXPECT().InputURL("Execution Auth API URL", "", true).Return("http://execution:5051", nil),
prompter.EXPECT().EthAddress("Please enter the Fee Recipient address (press enter to skip it)", "", false).Return("0x2d07a21ebadde0c13e8b91022a7e5732eb6bf5d5", nil),
prompter.EXPECT().Confirm("Do you want to expose all ports?", false).Return(true, nil),
prompter.EXPECT().Select("Select JWT source", "", []string{SourceTypeCreate, SourceTypeExisting, SourceTypeSkip}).Return(0, nil),
Expand Down Expand Up @@ -297,7 +297,7 @@ func TestCli(t *testing.T) {
prompter.EXPECT().Input("Generation path", configs.DefaultAbsSedgeDataPath, false, nil).Return(generationPath, nil),
prompter.EXPECT().Input("Container tag, sedge will add to each container and the network, a suffix with the tag", "", false, nil).Return("tag", nil),
prompter.EXPECT().Select("Select validator client", "", ETHClients["validator"]).Return(1, nil),
prompter.EXPECT().InputURL("Consensus API URL", "", false).Return("http://localhost:5051", nil),
prompter.EXPECT().InputURL("Consensus API URL", "", true).Return("http://localhost:5051", nil),
prompter.EXPECT().Input("Graffiti to be used by the validator (press enter to skip it)", "", false, gomock.AssignableToTypeOf(ui.GraffitiValidator)).Return("test graffiti", nil),
prompter.EXPECT().InputInt64("Validator grace period. This is the number of epochs the validator will wait for security reasons before starting", int64(1)).Return(int64(2), nil),
prompter.EXPECT().EthAddress("Please enter the Fee Recipient address", "", true).Return("0x2d07a31ebadce0a13e8a91022a5e5732eb6bf5d5", nil),
Expand Down
1 change: 1 addition & 0 deletions cli/importKeys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func TestImportKeys_NumberOfArguments(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
cmd := ImportKeysCmd(nil, nil)
cmd.SetArgs(tt.args)
cmd.SetOutput(io.Discard)
err := cmd.Execute()
assert.ErrorIs(t, err, ErrInvalidNumberOfArguments)
})
Expand Down
22 changes: 11 additions & 11 deletions configs/client_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,36 @@ execution:
version: v1.11.5
besu:
name: hyperledger/besu
version: 23.1.1
version: 23.1.2
nethermind:
name: nethermind/nethermind
version: 1.17.2
version: 1.17.3
erigon:
name: thorax/erigon
version: v2.40.1
version: v2.42.0
consensus:
lighthouse:
name: sigp/lighthouse
version: v3.5.1
version: v4.0.1
lodestar:
name: chainsafe/lodestar
version: v1.6.0
version: v1.7.2
teku:
name: consensys/teku
version: 23.3.0
version: 23.3.1
prysm:
name: gcr.io/prysmaticlabs/prysm/beacon-chain
version: v3.2.2
version: v4.0.1
validator:
lighthouse:
name: sigp/lighthouse
version: v3.5.1
version: v4.0.1
lodestar:
name: chainsafe/lodestar
version: v1.6.0
version: v1.7.2
teku:
name: consensys/teku
version: 23.3.0
version: 23.3.1
prysm:
name: gcr.io/prysmaticlabs/prysm/validator
version: v3.2.2
version: v4.0.1
2 changes: 1 addition & 1 deletion configs/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ var networksConfigs map[string]NetworkConfig = map[string]NetworkConfig{
"enr:-KG4QE5OIg5ThTjkzrlVF32WT_-XT14WeJtIz2zoTqLLjQhYAmJlnk4ItSoH41_2x0RX0wTFIe5GgjRzU2u7Q1fN4vADhGV0aDKQqP7o7pAAAHAyAAAAAAAAAIJpZIJ2NIJpcISlFsStiXNlY3AyNTZrMaEC-Rrd_bBZwhKpXzFCrStKp1q_HmGOewxY3KwM8ofAj_ODdGNwgiMog3VkcIIjKA",
"enr:-L64QC9Hhov4DhQ7mRukTOz4_jHm4DHlGL726NWH4ojH1wFgEwSin_6H95Gs6nW2fktTWbPachHJ6rUFu0iJNgA0SB2CARqHYXR0bmV0c4j__________4RldGgykDb6UBOQAABx__________-CaWSCdjSCaXCEA-2vzolzZWNwMjU2azGhA17lsUg60R776rauYMdrAz383UUgESoaHEzMkvm4K6k6iHN5bmNuZXRzD4N0Y3CCIyiDdWRwgiMo",
},
CheckpointSyncURL: "https://sepolia.checkpoint-sync.ethdevops.io",
CheckpointSyncURL: "https://sepolia.checkpoint-sync.ethpandaops.io",
RelayURLs: []string{
"https://0x845bd072b7cd566f02faeb0a4033ce9399e42839ced64e8b2adcfc859ed1e8e1a5a293336a49feac6d9a5edb779be53a@builder-relay-sepolia.flashbots.net",
},
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/guidelines/new-clients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ here and there.

## Adding a Consensus Client

While adding a Consensus Client, you should follow this steps:
While adding a Consensus Client, you should follow these steps:
1. Add a template under `templates/services/merge/consensus/` that contains all the docker compose parts for run that
new client.
2. Add what is going to be the environment vars for the docker compose file under each of the supported networks for this
new client, for example:
- `templates/envs/[network]/consensus/new_client.tmpl`
3. Update the script that check for updates on the images at `scripts/check-image-updates.sh`.
3. Update the script that checks for updates on the images at `scripts/check-image-updates.sh`.
4. Update documentation, including all the references on `docs/docs` folder, that are going to be displayed on Sedge
official documentation, and on the `Readme.md`
5. Add entry on the `CHANGELOG.md`
Expand All @@ -32,15 +32,15 @@ new client.
2. Add what is going to be the environment vars for the docker compose file under each of the supported networks for this
new client, for example:
- `templates/envs/[network]/execution/new_client.tmpl`
3. Update the script that check for updates on the images at `scripts/check-image-updates.sh`.
3. Update the script that checks for updates on the images at `scripts/check-image-updates.sh`.
4. Update documentation, including all the references on `docs/docs` folder, that are going to be displayed on Sedge
official documentation, and on the `Readme.md`
5. Add entry on the `CHANGELOG.md`
6. Run tests, and add new tests if needed.

## Adding a Validator Client

While adding a Validator Client, you should follow this steps:
While adding a Validator Client, you should follow these steps:
1. Add a template under `templates/services/merge/validator/` that contains all the docker compose parts for run that
new client.
2. Make sure to add any necessary code for the validator keystore import service. Make your chances in the
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/hardware-requirements/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords:

# Hardware requirements

Hardware requirements are continuously changing from time to time but we can give you an idea of what do you need.
Hardware requirements are continuously changing from time to time but we can give you an idea of what you need.

:::caution Warning

Expand All @@ -22,4 +22,4 @@ Don't follow these recommendations if you don't plan to use Sedge for the valida

**Running a validator node on a device that does not meet the hardware requirements poses risks to the device, including but not limited to the computer resources being depleted in their entirety. It is your responsibility to ensure you are using a device with sufficient resources.**

:::
:::
8 changes: 4 additions & 4 deletions docs/docs/quickstart/complete-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This is a beginner-friendly guide. Familiarity with the command line is expected

We will walk through the following steps:

1. Download and install Sedge in a new brand machine
1. Download and install Sedge on a new brand machine
2. Generate validator keystore
3. Run Sedge's main workflow with default configuration values and use it to install dependencies (only for Linux)
4. Generate a `docker-compose.yml` script with a randomized set of execution, consensus and validator clients
Expand All @@ -31,7 +31,7 @@ The hardware specifications of the machine we are going to use are:
- 1 TB SSD
- Ubuntu 22.04/amd64

### 1. Download and install Sedge in a new brand Linux machine
### 1. Download and install Sedge on a new brand Linux machine

First open a console in the Home directory. Then use `curl` or `wget` to download a binary from the releases page
(we will be using the `1.0.0` version). Check the [installation guide](install-guide) for more information or if you
Expand All @@ -41,14 +41,14 @@ want to use another installation method:
<TabItem value="curl" label="curl">

```
curl -L https://github.com/NethermindEth/sedge/releases/download/v1.0.0/sedge-v1.0.0-linux-amd64 --output sedge
curl -L https://github.com/NethermindEth/sedge/releases/download/v1.1.0/sedge-v1.1.0-linux-amd64 --output sedge
```

</TabItem>
<TabItem value="wget" label="wget">

```
wget https://github.com/NethermindEth/sedge/releases/download/v1.0.0/sedge-v1.0.0-linux-amd64 -O sedge
wget https://github.com/NethermindEth/sedge/releases/download/v1.1.0/sedge-v1.1.0-linux-amd64 -O sedge
```

</TabItem>
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/quickstart/install-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Downloading any binary from the internet risks downloading files that malicious,
</TabItem>
</Tabs>

> Replace `<VERSION>` with the desired version number, e.g 1.0.0; `<OS>` with your OS, e.g linux; and `<ARCH>` with your architecture, e.g amd64.
> Replace `<VERSION>` with the desired version number, e.g 1.1.0; `<OS>` with your OS, e.g linux; and `<ARCH>` with your architecture, e.g amd64.
2. Open a console or terminal instance on the directory you downloaded the binary.
3. Set binary as executable executing `chmod +x <binary>` in the Terminal. Replace `<binary>` with the name of the downloaded binary.
Expand Down Expand Up @@ -72,7 +72,7 @@ First, install the Go programming language following the [official instructions]

:::tip

If you want to install Sedge in an M1 mac, then you need the `darwin-arm64` package. You can find it byclicking on [other downloads](https://go.dev/dl/) from the Go install page.
If you want to install Sedge on an M1 mac, then you need the `darwin-arm64` package. You can find it byclicking on [other downloads](https://go.dev/dl/) from the Go install page.

:::

Expand Down
6 changes: 3 additions & 3 deletions docs/docs/troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ sudo cp ~/.docker/cli-plugins/docker-compose /root/.docker/cli-plugins/
If Prysm throws an error that indicates that can't find a wallet datadir, that means that the wallet was not created
correctly.

To solve this, you should run `sedge import-key` with the flag `--start-validator` to starts the validator client after
To solve this, you should run `sedge import-key` with the flag `--start-validator` to start the validator client after
import, regardless of the state the validator was in before.

This will create the wallet datadir and the validator will start correctly.

### Permissions issues

If you found a permission issue while installing some dependencies, and you got a error like this:
If you found a permission issue while installing some dependencies, and you got an error like this:

```
docker.service - Docker Application Container Engine
Expand All @@ -58,4 +58,4 @@ permission denied while trying to connect to the Docker daemon socket at unix://
You can run the command using sudo, something like:
```shell
sudo sedge deps install
```
```
6 changes: 3 additions & 3 deletions internal/ui/prompterValidators.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ func DirPathValidator(ans string) error {

func URLValidator(ans interface{}) error {
if str, ok := ans.(string); ok {
if str == "" {
return nil
}
if invalidURL, ok := utils.UriValidator([]string{str}); !ok {
return fmt.Errorf("%w: %s", ErrInvalidURL, invalidURL)
}
Expand All @@ -95,7 +98,6 @@ func Int64Validator(ans interface{}) error {
return nil
}

// TODO: Write unit tests
func fileExtensionValidator(extensions []string) func(ans interface{}) error {
return func(ans interface{}) error {
if input, ok := ans.(string); ok {
Expand All @@ -110,7 +112,6 @@ func fileExtensionValidator(extensions []string) func(ans interface{}) error {
}
}

// TODO: add unit tests
// DigitsStringValidator validates that the input is a valid string with only digits
func DigitsStringValidator(ttd string) error {
if !digitsString.MatchString(ttd) {
Expand All @@ -119,7 +120,6 @@ func DigitsStringValidator(ttd string) error {
return nil
}

// TODO: add unit tests
func GraffitiValidator(str string) error {
if len(str) > 16 {
return fmt.Errorf(configs.ErrGraffitiLength, str, len(str))
Expand Down
Loading

0 comments on commit ec494bd

Please sign in to comment.