Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
sugh01 committed Oct 30, 2024
2 parents 92fdbe6 + 6d8c249 commit ba654f1
Show file tree
Hide file tree
Showing 29 changed files with 507 additions and 56 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v1.6.0] - 2024-10-23
- New cli flag `--distributed` for running cluster with Charon distributed validator

## [v1.7.0] - 2024-10-24

### Added
- Support Mainnet for Lido CSM setup.

## [v1.6.0] - 2024-10-18


### Added
- New command `lido-status` to display data of Lido Node Operator.
- New command `monitoring` to run monitoring stack setup with Grafana, Prometheus, Node Exporter and Lido Exporter.
- Security policy.
- Support for Nimbus as Consensus and Validator client.
- Documentation for Lido Exporter and Monitoring Stack.
- New cli flag `--distributed` for running cluster with Charon distributed validator

### Changed
- Update Go version from 1.21 to 1.22.
Expand Down
6 changes: 3 additions & 3 deletions cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestCli(t *testing.T) {
// Silence logger
log.SetOutput(io.Discard)

mevboostRelayListUris, _ := mevboostrelaylist.RelaysURI("mainnet")
mainnetMevboostRelayListUris, _ := mevboostrelaylist.RelaysURI("mainnet")
holeskyMevboostRelayListUris, _ := mevboostrelaylist.RelaysURI("holesky")

ETHClients := map[string][]string{
Expand Down Expand Up @@ -527,7 +527,7 @@ func TestCli(t *testing.T) {
},
},
{
name: "full node with Lido",
name: "full node with Lido, mainnet",
setup: func(t *testing.T, sedgeActions *sedge_mocks.MockSedgeActions, prompter *sedge_mocks.MockPrompter, depsMgr *sedge_mocks.MockDependenciesManager) {
generationPath := t.TempDir()
genData := generate.GenData{
Expand Down Expand Up @@ -555,7 +555,7 @@ func TestCli(t *testing.T) {
VLStartGracePeriod: 840,
Mev: true,
MevImage: "flashbots/mev-boost:latest",
RelayURLs: mevboostRelayListUris,
RelayURLs: mainnetMevboostRelayListUris,
ContainerTag: "tag",
JWTSecretPath: filepath.Join(generationPath, "jwtsecret"),
}
Expand Down
59 changes: 55 additions & 4 deletions cli/lidoStatus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestLidoStatusCmd(t *testing.T) {
{
name: "valid lido-status flags, Holesky",
flags: flags{
rewardAddress: "0x22bA5CaFB5E26E6Fe51f330294209034013A5A4c",
rewardAddress: "0xe6b5A31d8bb53D2C769864aC137fe25F4989f1fd",
networkName: "holesky",
},
isErr: false,
Expand Down Expand Up @@ -100,10 +100,11 @@ func TestLidoStatusCmd(t *testing.T) {
{
name: "Valid node ID, Holesky",
flags: flags{
networkName: "holesky",
nodeIDInt: 1,
rewardAddress: "0xe6b5A31d8bb53D2C769864aC137fe25F4989f1fd", // rewardAddress should be ignored
networkName: "holesky",
nodeIDInt: 1,
},
isErr: true,
isErr: false,
},
{
name: "Invalid: negative node ID, Holesky",
Expand All @@ -113,6 +114,56 @@ func TestLidoStatusCmd(t *testing.T) {
},
isErr: true,
},
{
name: "Invalid: missing address, Mainnet",
flags: flags{
networkName: "mainnet",
},
isErr: true,
},
{
name: "Invalid: incorrect address, Mainnet",
flags: flags{
rewardAddress: "0xC870Fd10dd",
networkName: "mainnet",
},
isErr: true,
},
{
name: "Invalid: address missing 0x prefix, Mainnet",
flags: flags{
rewardAddress: "bA99F374C20A3475De737B466ee68Ad9C38c26AF",
networkName: "mainnet",
},
isErr: true,
},
// {
// name: "Valid node ID, Mainnet",
// flags: flags{
// rewardAddress: "0xe6b5A31d8bb53D2C769864aC137fe25F4989f1fd", // rewardAddress should be ignored
// networkName: "mainnet",
// nodeIDInt: 1,
// },
// isErr: false,
// },
// {
// name: "Valid node ID with long description, Mainnet",
// flags: flags{
// rewardAddress: "0xe6b5A31d8bb53D2C769864aC137fe25F4989f1fd", // rewardAddress should be ignored
// networkName: "mainnet",
// nodeIDInt: 1,
// longDescriptions: true,
// },
// isErr: false,
// },
{
name: "Invalid: negative node ID, Mainnet",
flags: flags{
networkName: "mainnet",
nodeIDInt: -14,
},
isErr: true,
},
}

for _, tc := range tcs {
Expand Down
25 changes: 25 additions & 0 deletions cli/monitoring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,31 @@ func TestMonitoringCmd(t *testing.T) {
},
isErr: true,
},
{
name: "valid monitoring init: lido, Mainnet",
flags: []string{"init", "lido", "--node-operator-id", "1", "--network", "mainnet"},
mocker: func(t *testing.T, ctrl *gomock.Controller) *sedge_mocks.MockMonitoringManager {
mockManager := sedge_mocks.NewMockMonitoringManager(ctrl)
gomock.InOrder(
mockManager.EXPECT().InstallationStatus().Return(common.NotInstalled, nil).AnyTimes(),
mockManager.EXPECT().InstallStack().Return(nil).AnyTimes(),
mockManager.EXPECT().Status().Return(common.Created, nil).AnyTimes(),
mockManager.EXPECT().Run().Return(nil).AnyTimes(),
mockManager.EXPECT().Init().Return(nil).AnyTimes(),
mockManager.EXPECT().AddService(gomock.Any()).Return(nil).AnyTimes(),
)
return mockManager
},
isErr: false,
},
{
name: "invalid monitoring init: lido, no nodeID or reward address, Mainnet",
flags: []string{"init", "lido", "--network", "mainnet"},
mocker: func(t *testing.T, ctrl *gomock.Controller) *sedge_mocks.MockMonitoringManager {
return sedge_mocks.NewMockMonitoringManager(ctrl)
},
isErr: true,
},
}

for _, tc := range tcs {
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/commands/cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This is an example of what you can expect:
```
$ sedge cli
2024-10-16 17:51:44 -- [INFO] [Logger Init] Log level: info
2024-10-16 17:51:46 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2024-10-16 17:51:46 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
? Select node setup ethereum-node
? Select network mainnet
? Select node type full-node
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/commands/deps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The execution of `sedge deps check` will result in an output like this if everyt
```
$ sedge deps check
2023-03-21 02:56:04 -- [INFO] [Logger Init] Log level: info
2023-03-21 02:56:05 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2023-03-21 02:56:05 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
2023-03-21 02:56:05 -- [INFO] docker is installed
2023-03-21 02:56:06 -- [INFO] All dependencies are installed and running
```
2 changes: 1 addition & 1 deletion docs/docs/commands/down.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The execution of `sedge down` will close and remove all the opened containers an
```
$ sedge down
2022-00-00 00:00:00 -- [INFO] [Logger Init] Log level: info
2022-00-00 00:00:00 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2022-00-00 00:00:00 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
[sudo] password for maceo:
[+] Running 7/7
⠿ Container execution-client Removed 93.8s
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/commands/generate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Use "sedge generate [command] --help" for more information about a command.

### Lido Flow

With the `--lido` flag, you can generate a Lido CSM node. This will generate a full node, a execution, a consensus, a validator o a mev-boost node with the Lido CSM configuration.
With the `--lido` flag, you can generate a Lido CSM node. This will generate a full node, a execution, a consensus, a validator or a mev-boost node with the Lido CSM configuration.

It will include in the configuration of the selected node:
- Lido Withdrawal Credentials
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/commands/importKey.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ To import the validator keys, and start the validator client after the import, r
```shell
$ sedge import-key --from keystore -n sepolia --start-validator prysm
2023-01-26 11:59:34 -- [INFO] [Logger Init] Log level: info
2023-01-26 11:59:34 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2023-01-26 11:59:34 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
# highlight-next-line
2023-01-26 11:59:34 -- [WARN] The keys path is not the default one, copying the keys to the default path /root/sedge/example/sedge-data/keystore
2023-01-26 11:59:34 -- [INFO] Importing validator keys
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/commands/networks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Global Flags:
```
$ sedge networks
2024-07-09 12:23:02 -- [INFO] [Logger Init] Log level: info
2024-07-09 12:23:03 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2024-07-09 12:23:03 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
2024-07-09 12:23:03 -- [INFO] Listing supported networks
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/commands/run.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ the following command to start all services in the default generation path
$ sedge run
Using config file: /root/.sedge.yaml
2022-12-29 19:55:55 -- [INFO] [Logger Init] Logging configuration: {Level:debug}
2022-12-29 19:55:55 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2022-12-29 19:55:55 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
2022-12-29 20:40:24 -- [INFO] Checking dependencies: docker
2022-12-29 20:40:24 -- [INFO] All dependencies are installed on host machine
2022-12-29 19:55:55 -- [INFO] Setting up containers
Expand Down Expand Up @@ -110,7 +110,7 @@ start the validator.
$ sedge run --services execution,consensus
Using config file: /root/.sedge.yaml
2022-12-29 21:03:29 -- [INFO] [Logger Init] Logging configuration: {Level:debug}
2022-12-29 21:03:29 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2022-12-29 21:03:29 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
2022-12-29 21:03:29 -- [INFO] Checking dependencies: docker
2022-12-29 21:03:29 -- [INFO] All dependencies are installed on host machine
2022-12-29 21:03:29 -- [INFO] Setting up containers
Expand Down Expand Up @@ -155,7 +155,7 @@ Now you can start the validator client like follow:
$ sedge run --services validator
Using config file: /root/.sedge.yaml
2022-12-29 21:24:12 -- [INFO] [Logger Init] Logging configuration: {Level:debug}
2022-12-29 21:24:12 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2022-12-29 21:24:12 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
2022-12-29 21:24:12 -- [INFO] Checking dependencies: docker
2022-12-29 21:24:12 -- [INFO] All dependencies are installed on host machine
2022-12-29 21:24:12 -- [INFO] Setting up containers
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/commands/show.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Global Flags:
```
$ sedge show
2023-00-00 00:00:00 -- [INFO] [Logger Init] Log level: info
2023-00-00 00:00:00 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2023-00-00 00:00:00 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
2023-00-00 00:00:00 -- [INFO] Showing existing containers information
2023-00-00 00:00:00 -- [INFO] containers:
- name: sedge-execution-client
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/commands/slashingExport.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ This is an example of exporting slashing protection data from a setup using sepo
```shell
$ sedge slashing-export lighthouse -n sepolia --out slashing-protection.json
2023-01-06 15:47:56 -- [INFO] [Logger Init] Log level: info
2023-01-06 15:47:57 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2023-01-06 15:47:57 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
2023-01-06 15:47:57 -- [INFO] Exporting slashing data from client lighthouse
# highlight-next-line
2023-01-06 15:47:57 -- [INFO] The slashing protection container is starting...
Expand All @@ -71,7 +71,7 @@ Notice in this case the validator client remains stopped because it has been sto
```shell
$ sedge slashing-export lighthouse -n sepolia --out slashing-protection.json --start-validator
2023-01-06 15:51:11 -- [INFO] [Logger Init] Log level: info
2023-01-06 15:51:11 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2023-01-06 15:51:11 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
2023-01-06 15:51:11 -- [INFO] Exporting slashing data from client lighthouse
2023-01-06 15:51:11 -- [INFO] The slashing protection container is starting...
2023-01-06 15:51:12 -- [INFO] The slashing container ends successfully.
Expand All @@ -86,7 +86,7 @@ Another case may be exporting the slashing data protection when the validator is
```shell
$ sedge slashing-export lighthouse -n sepolia --out slashing-protection.json
2023-01-06 15:51:46 -- [INFO] [Logger Init] Log level: info
2023-01-06 15:51:46 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2023-01-06 15:51:46 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
# highlight-next-line
2023-01-06 15:51:46 -- [INFO] Stopping validator client
# highlight-next-line
Expand All @@ -107,7 +107,7 @@ In this case, the validator client is stopped before the export and started agai
```shell
$ sedge slashing-export lighthouse -n sepolia --out slashing-protection.json --stop-validator
2023-01-06 15:52:07 -- [INFO] [Logger Init] Log level: info
2023-01-06 15:52:07 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2023-01-06 15:52:07 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
# highlight-next-line
2023-01-06 15:52:07 -- [INFO] Stopping validator client
# highlight-next-line
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/commands/slashingImport.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This is an example of importing slashing protection data to a setup using sepoli
```shell
$ sedge slashing-import prysm -f slashing-export.json -n sepolia
2023-01-06 14:59:11 -- [INFO] [Logger Init] Log level: info
2023-01-06 14:59:11 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2023-01-06 14:59:11 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
# highlight-next-line
2023-01-06 14:59:11 -- [INFO] Importing slashing data to client prysm from slashing-export.json
# highlight-next-line
Expand All @@ -70,7 +70,7 @@ Notice in this case the validator client remains stopped because it has been sto
```shell
$ sedge slashing-import prysm -f slashing-export.json -n sepolia --start-validator
2023-01-06 15:08:05 -- [INFO] [Logger Init] Log level: info
2023-01-06 15:08:06 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2023-01-06 15:08:06 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
2023-01-06 15:08:06 -- [INFO] Importing slashing data to client prysm from slashing-export.json
2023-01-06 15:08:06 -- [INFO] The slashing protection container is starting...
2023-01-06 15:08:06 -- [INFO] The slashing container ends successfully.
Expand All @@ -85,7 +85,7 @@ Another case may be importing the slashing data protection when the validator is
```shell
$ sedge slashing-import prysm -f slashing-export.json -n sepolia
2023-01-06 15:10:27 -- [INFO] [Logger Init] Log level: info
2023-01-06 15:10:27 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2023-01-06 15:10:27 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
# highlight-next-line
2023-01-06 15:10:27 -- [INFO] Stopping validator client...
# highlight-next-line
Expand All @@ -106,7 +106,7 @@ In this case, the validator client is stopped before the import and started agai
```shell
$ sedge slashing-import prysm -f slashing-export.json -n sepolia --stop-validator
2023-01-06 15:12:22 -- [INFO] [Logger Init] Log level: info
2023-01-06 15:12:22 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2023-01-06 15:12:22 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
# highlight-next-line
2023-01-06 15:12:22 -- [INFO] Stopping validator client...
# highlight-next-line
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/commands/version.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ Global Flags:
```
$ sedge version
2022-00-00 00:00:00 -- [INFO] [Logger Init] Log level: info
2022-00-00 00:00:00 -- [INFO] You are running the latest version of sedge. Version: v1.6.0
2022-00-00 00:00:00 -- [INFO] You are running the latest version of sedge. Version: v1.7.0
sedge v0.5.1
```
4 changes: 2 additions & 2 deletions docs/docs/quickstart/complete-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.6.0/sedge-v1.6.0-linux-amd64 --output sedge
curl -L https://github.com/NethermindEth/sedge/releases/download/v1.7.0/sedge-v1.7.0-linux-amd64 --output sedge
```

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

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

</TabItem>
Expand Down
3 changes: 1 addition & 2 deletions docs/docs/quickstart/lido.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ If you are interested in becoming a Lido node operator, make sure to read the [N

:::info

Lido CSM is **[currently live and permissionless on the Holesky testnet](https://operatorportal.lido.fi/modules/community-staking-module)**.
The Mainnet launch is expected soon. You can check your eligibility for the Early Adoption program on Mainnet [here](https://lidofinance.github.io/csm-ea-checker/).
Lido CSM is **[currently live and permissionless on Mainnet and the Holesky testnet](https://operatorportal.lido.fi/modules/community-staking-module)**.

:::

Expand Down
Loading

0 comments on commit ba654f1

Please sign in to comment.