Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sugh01 committed Jul 16, 2024
2 parents df81a46 + 5231116 commit d64d6f2
Show file tree
Hide file tree
Showing 71 changed files with 2,016 additions and 164 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Remove arguments for Lighthouse `--eth1` flag.

### Added

- Add support for MEV-boost on Holesky.
- New flag `--lido` to `generate` command for Lido CSM setup.
- New Sedge setup flow with `sedge cli` command for Lido CSM setup.
- Support for `sedge keys` to generate 0x01 withdrawal credentials.
- Support for installing Docker in Ubuntu 24.04 LTS.

### Changed

- Update client images to Dencun-ready versions.
-
- Renamed `--eth1-withdrawal-address` flag from `sedge keys` to `--eth-withdrawal-address`.
- Update client images to latest versions.

### Removed

- Removed support for Goerli.

## [v1.3.1] - 2024-02-14
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ services:
- --target-peers=${CC_PEER_COUNT}
- --execution-endpoints=${EC_AUTH_URL}
- --execution-jwt=/tmp/jwt/jwtsecret
- --eth1=${EC_API_URL}
- --eth1
- --debug-level=${CC_LOG_LEVEL}
- --suggested-fee-recipient=${FEE_RECIPIENT}
- --validator-monitor-auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
- --target-peers=${CC_PEER_COUNT}
- --execution-endpoints=${EC_AUTH_URL}
- --execution-jwt=/tmp/jwt/jwtsecret
- --eth1=${EC_API_URL}
- --eth1
- --debug-level=${CC_LOG_LEVEL}
- --suggested-fee-recipient=${FEE_RECIPIENT}
- --validator-monitor-auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ services:
- --target-peers=${CC_PEER_COUNT}
- --execution-endpoints=${EC_AUTH_URL}
- --execution-jwt=/tmp/jwt/jwtsecret
- --eth1=${EC_API_URL}
- --eth1
- --debug-level=${CC_LOG_LEVEL}
- --suggested-fee-recipient=${FEE_RECIPIENT}
- --validator-monitor-auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ services:
- --target-peers=${CC_PEER_COUNT}
- --execution-endpoints=${EC_AUTH_URL}
- --execution-jwt=/tmp/jwt/jwtsecret
- --eth1=${EC_API_URL}
- --eth1
- --debug-level=${CC_LOG_LEVEL}
- --suggested-fee-recipient=${FEE_RECIPIENT}
- --validator-monitor-auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ services:
- --target-peers=${CC_PEER_COUNT}
- --execution-endpoints=${EC_AUTH_URL}
- --execution-jwt=/tmp/jwt/jwtsecret
- --eth1=${EC_API_URL}
- --eth1
- --debug-level=${CC_LOG_LEVEL}
- --suggested-fee-recipient=${FEE_RECIPIENT}
- --validator-monitor-auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
- --target-peers=${CC_PEER_COUNT}
- --execution-endpoints=${EC_AUTH_URL}
- --execution-jwt=/tmp/jwt/jwtsecret
- --eth1=${EC_API_URL}
- --eth1
- --debug-level=${CC_LOG_LEVEL}
- --suggested-fee-recipient=${FEE_RECIPIENT}
- --validator-monitor-auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ services:
- --target-peers=${CC_PEER_COUNT}
- --execution-endpoints=${EC_AUTH_URL}
- --execution-jwt=/tmp/jwt/jwtsecret
- --eth1=${EC_API_URL}
- --eth1
- --debug-level=${CC_LOG_LEVEL}
- --suggested-fee-recipient=${FEE_RECIPIENT}
- --validator-monitor-auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ services:
- --target-peers=${CC_PEER_COUNT}
- --execution-endpoints=${EC_AUTH_URL}
- --execution-jwt=/tmp/jwt/jwtsecret
- --eth1=${EC_API_URL}
- --eth1
- --debug-level=${CC_LOG_LEVEL}
- --suggested-fee-recipient=${FEE_RECIPIENT}
- --validator-monitor-auto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ services:
- --target-peers=${CC_PEER_COUNT}
- --execution-endpoints=${EC_AUTH_URL}
- --execution-jwt=/tmp/jwt/jwtsecret
- --eth1=${EC_API_URL}
- --eth1
- --debug-level=${CC_LOG_LEVEL}
- --suggested-fee-recipient=${FEE_RECIPIENT}
- --validator-monitor-auto
Expand Down
54 changes: 51 additions & 3 deletions cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/NethermindEth/sedge/internal/pkg/clients"
"github.com/NethermindEth/sedge/internal/pkg/dependencies"
"github.com/NethermindEth/sedge/internal/pkg/generate"
sedgeOpts "github.com/NethermindEth/sedge/internal/pkg/options"
"github.com/NethermindEth/sedge/internal/ui"

"github.com/NethermindEth/sedge/cli/actions"
Expand Down Expand Up @@ -79,6 +80,7 @@ type CliCmdOptions struct {
keystorePassphrasePath string
keystorePassphrase string
withdrawalAddress string
nodeSetup string
numberOfValidators int64
existingValidators int64
installDependencies bool
Expand All @@ -96,13 +98,15 @@ func CliCmd(p ui.Prompter, actions actions.SedgeActions, depsMgr dependencies.De
- Execution Node
- Consensus Node
- Validator Node
- Lido CSM Node
Follow the prompts to select the options you want for your node. At the end of the process, you will
be asked to run the generated setup or not. If you chose to run the setup, it will be executed for you
using docker compose command behind the scenes.
`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := runPromptActions(p, o,
selectNodeSetup,
selectNetwork,
selectNodeType,
inputGenerationPath,
Expand Down Expand Up @@ -614,8 +618,20 @@ func runPromptActions(p ui.Prompter, o *CliCmdOptions, actions ...promptAction)
return nil
}

func selectNodeSetup(p ui.Prompter, o *CliCmdOptions) (err error) {
options := []string{sedgeOpts.EthereumNode, sedgeOpts.LidoNode}
index, err := p.Select("Select node setup", "", options)
if err != nil {
return err
}
o.nodeSetup = options[index]
return
}

func selectNetwork(p ui.Prompter, o *CliCmdOptions) error {
options := []string{NetworkMainnet, NetworkSepolia, NetworkGnosis, NetworkChiado, NetworkHolesky}
opts := sedgeOpts.CreateSedgeOptions(o.nodeSetup)
options := opts.SupportedNetworks()

index, err := p.Select("Select network", "", options)
if err != nil {
return err
Expand Down Expand Up @@ -792,6 +808,12 @@ func confirmInstallDependencies(p ui.Prompter, o *CliCmdOptions) (err error) {
}

func confirmEnableMEVBoost(p ui.Prompter, o *CliCmdOptions) (err error) {
opts := sedgeOpts.CreateSedgeOptions(o.nodeSetup)
enableMev := opts.MEVBoostEnabled(o.genData.Network)
if opts.OverwriteSettings().MevBoost {
o.withMevBoost = enableMev
return
}
o.withMevBoost, err = p.Confirm("Enable MEV Boost?", true)
return
}
Expand Down Expand Up @@ -847,8 +869,16 @@ func inputMevBoostEndpoint(p ui.Prompter, o *CliCmdOptions) (err error) {
}

func inputRelayURL(p ui.Prompter, o *CliCmdOptions) (err error) {
var defaultValue []string = configs.NetworksConfigs()[o.genData.Network].RelayURLs
relayURLs, err := p.InputList("Insert relay URLs if you don't want to use the default values listed below", defaultValue, func(list []string) error {
opts := sedgeOpts.CreateSedgeOptions(o.nodeSetup)
relayURLs, err := opts.RelayURLs(o.genData.Network)
if err != nil {
return err
}
if relayURLs != nil && opts.OverwriteSettings().RelayURLs {
o.genData.RelayURLs = relayURLs
return
}
relayURLs, err = p.InputList("Insert relay URLs if you don't want to use the default values listed below", relayURLs, func(list []string) error {
badUri, ok := utils.UriValidator(list)
if !ok {
return fmt.Errorf(configs.InvalidUrlFlagError, "relay", badUri)
Expand All @@ -870,11 +900,23 @@ func inputCheckpointSyncURL(p ui.Prompter, o *CliCmdOptions) (err error) {
}

func inputFeeRecipient(p ui.Prompter, o *CliCmdOptions) (err error) {
opts := sedgeOpts.CreateSedgeOptions(o.nodeSetup)
feeRecipient := opts.FeeRecipient(o.genData.Network)
if opts.OverwriteSettings().FeeRecipient {
o.genData.FeeRecipient = feeRecipient
return
}
o.genData.FeeRecipient, err = p.EthAddress("Please enter the Fee Recipient address", "", true)
return
}

func inputFeeRecipientNoValidator(p ui.Prompter, o *CliCmdOptions) (err error) {
opts := sedgeOpts.CreateSedgeOptions(o.nodeSetup)
feeRecipient := opts.FeeRecipient(o.genData.Network)
if opts.OverwriteSettings().FeeRecipient {
o.genData.FeeRecipient = feeRecipient
return
}
o.genData.FeeRecipient, err = p.EthAddress("Please enter the Fee Recipient address (press enter to skip it)", "", false)
return
}
Expand Down Expand Up @@ -929,6 +971,12 @@ func inputKeystorePassphrase(p ui.Prompter, o *CliCmdOptions) (err error) {
}

func inputWithdrawalAddress(p ui.Prompter, o *CliCmdOptions) (err error) {
opts := sedgeOpts.CreateSedgeOptions(o.nodeSetup)
withdrawalAddress := opts.WithdrawalAddress(o.genData.Network)
if opts.OverwriteSettings().WithdrawalAddress {
o.withdrawalAddress = withdrawalAddress
return
}
o.withdrawalAddress, err = p.Input("Withdrawal address", "", false, func(s string) error { return ui.EthAddressValidator(s, true) })
return
}
Expand Down
Loading

0 comments on commit d64d6f2

Please sign in to comment.