diff --git a/cli/lidoStatus.go b/cli/lidoStatus.go index eb32f83b..429ebc81 100644 --- a/cli/lidoStatus.go +++ b/cli/lidoStatus.go @@ -214,7 +214,13 @@ func buildLidoData(node *lidoData) map[string]struct { var nodeOpDetailed, keysDetailed, queueDetailed, bondDetailed, rewardsDetailed string var currentBond, requiredBond, excessBond, missedBond, rewards decimal.Decimal rewardAddressLink := fmt.Sprintf(`https://etherscan.io/address/%s`, node.nodeInfo.RewardAddress) - claimRewardsLink := fmt.Sprintf(`https://%s.etherscan.io/address/%s#writeProxyContract#F10`, networkName, contracts.DeployedAddresses(contracts.CSModule)[networkName]) + var prefix string + if networkName == "mainnet" { + prefix = "" + } else { + prefix = networkName + "." + } + claimRewardsLink := fmt.Sprintf(`https://%setherscan.io/address/%s#writeProxyContract#F10`, prefix, contracts.DeployedAddresses(contracts.CSModule)[networkName]) detailedDescriptions := map[string]string{ nodeOpInfo: ` diff --git a/cli/lidoStatus_test.go b/cli/lidoStatus_test.go index 608df2e9..c6d52e43 100644 --- a/cli/lidoStatus_test.go +++ b/cli/lidoStatus_test.go @@ -137,25 +137,25 @@ func TestLidoStatusCmd(t *testing.T) { }, 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: "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{ diff --git a/configs/public_rpcs.go b/configs/public_rpcs.go index bf5884c2..3d6a5e5c 100644 --- a/configs/public_rpcs.go +++ b/configs/public_rpcs.go @@ -42,6 +42,8 @@ var networkRPCs = map[string]RPC{ "https://ethereum-holesky-rpc.publicnode.com", "https://endpoints.omniatech.io/v1/eth/holesky/public", "https://ethereum-holesky.blockpi.network/v1/rpc/public", + "https://1rpc.io/holesky", + "https://holesky.drpc.org", }, PublicWSs: []string{ "wss://ethereum-holesky-rpc.publicnode.com", diff --git a/e2e/sedge/lidoStatus_test.go b/e2e/sedge/lidoStatus_test.go index 17a71707..a66b01a8 100644 --- a/e2e/sedge/lidoStatus_test.go +++ b/e2e/sedge/lidoStatus_test.go @@ -116,7 +116,7 @@ func TestE2E_LidoStatus_InvalidRewardAddress(t *testing.T) { e2eTest.run() } -func TestE2E_LidoStatus_RewardAddressNotFound(t *testing.T) { +func TestE2E_LidoStatus_InvalidZeroRewardAddress(t *testing.T) { // Test context var ( runErr error @@ -128,7 +128,7 @@ func TestE2E_LidoStatus_RewardAddressNotFound(t *testing.T) { nil, // Act func(t *testing.T, binaryPath string, dataDirPath string) { - runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "0xC870Fd7316956C1582A2c8Fd2c42552cCEC70C89", "--network", "holesky") + runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "0x0000000000000000000000000000000000000000", "--network", "holesky") }, // Assert func(t *testing.T, dataDirPath string) { @@ -139,7 +139,7 @@ func TestE2E_LidoStatus_RewardAddressNotFound(t *testing.T) { e2eTest.run() } -func TestE2E_LidoStatus_InvalidZeroRewardAddress(t *testing.T) { +func TestE2E_LidoStatus_ValidNodeID_Mainnet(t *testing.T) { // Test context var ( runErr error @@ -151,40 +151,17 @@ func TestE2E_LidoStatus_InvalidZeroRewardAddress(t *testing.T) { nil, // Act func(t *testing.T, binaryPath string, dataDirPath string) { - runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "0x0000000000000000000000000000000000000000", "--network", "holesky") + runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "--nodeID", "1", "--l", "--network", "mainnet") }, // Assert func(t *testing.T, dataDirPath string) { - assert.Error(t, runErr, "lido status command should fail") + assert.NoError(t, runErr, "lido status command should succeed with the given arguments") }, ) // Run test case e2eTest.run() } -// func TestE2E_LidoStatus_ValidNodeID_Mainnet(t *testing.T) { -// // Test context -// var ( -// runErr error -// ) -// // Build test case -// e2eTest := newE2ESedgeTestCase( -// t, -// // Arrange -// nil, -// // Act -// func(t *testing.T, binaryPath string, dataDirPath string) { -// runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "--nodeID", "1", "--l", "--network", "mainnet") -// }, -// // Assert -// func(t *testing.T, dataDirPath string) { -// assert.NoError(t, runErr, "lido status command should succeed with the given arguments") -// }, -// ) -// // Run test case -// e2eTest.run() -// } - func TestE2E_LidoStatus_InvalidNodeID_Mainnet(t *testing.T) { // Test context var ( @@ -231,3 +208,26 @@ func TestE2E_LidoStatus_InvalidRewardAddress_Mainnet(t *testing.T) { // Run test case e2eTest.run() } + +func TestE2E_LidoStatus_RewardAddressNotFound_Mainnet(t *testing.T) { + // Test context + var ( + runErr error + ) + // Build test case + e2eTest := newE2ESedgeTestCase( + t, + // Arrange + nil, + // Act + func(t *testing.T, binaryPath string, dataDirPath string) { + runErr = base.RunCommand(t, binaryPath, "sedge", "lido-status", "0xC870Fd7316956C1582A2c8Fd2c42552cCEC70C89", "--network", "mainnet") + }, + // Assert + func(t *testing.T, dataDirPath string) { + assert.Error(t, runErr, "lido status command should fail") + }, + ) + // Run test case + e2eTest.run() +} diff --git a/internal/lido/contracts/csfeedistributor/rewards_test.go b/internal/lido/contracts/csfeedistributor/rewards_test.go index 8cbd1956..11fa3184 100644 --- a/internal/lido/contracts/csfeedistributor/rewards_test.go +++ b/internal/lido/contracts/csfeedistributor/rewards_test.go @@ -62,12 +62,12 @@ func TestRewards(t *testing.T) { nodeID: big.NewInt(-15), wantErr: true, }, - // { - // name: "Rewards for nodeID 1, Mainnet", - // network: "mainnet", - // nodeID: big.NewInt(1), - // wantErr: false, - // }, + { + name: "Rewards for nodeID 1, Mainnet", + network: "mainnet", + nodeID: big.NewInt(1), + wantErr: false, + }, } for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { diff --git a/internal/lido/contracts/csmodule/nodeOperator_test.go b/internal/lido/contracts/csmodule/nodeOperator_test.go index 711d7f9f..016c1a71 100644 --- a/internal/lido/contracts/csmodule/nodeOperator_test.go +++ b/internal/lido/contracts/csmodule/nodeOperator_test.go @@ -77,6 +77,9 @@ func TestNodeOperatorInfo(t *testing.T) { { "Invalid Address, Mainnet", "mainnet", big.NewInt(4), "0xC870Fd7316956C1582A2c8Fd2c46752", true, }, + { + "Valid Address, Mainnet", "mainnet", big.NewInt(1), "0x556fedf2213A31c7Ab9F8bc8Db5B2254261A5B0b", false, + }, } for _, tc := range tcs { @@ -102,23 +105,23 @@ func TestNodeID(t *testing.T) { wantErr bool }{ { - "Valid NodeID, Holesky #1", "holesky", big.NewInt(13), false, + "Invalid NodeID, Mainnet", "mainnet", big.NewInt(-2), true, }, { - "Valid NodeID, Holesky #2", "holesky", big.NewInt(4), false, + "Valid NodeID, Mainnet", "mainnet", big.NewInt(1), false, }, { - "Invalid NodeID, Holesky #1", "holesky", big.NewInt(-4), true, + "Valid NodeID, Mainnet #2", "mainnet", big.NewInt(12), false, }, { - "Invalid NodeID, Holesky #2", "holesky", big.NewInt(20000), true, + "Valid NodeID, Holesky", "holesky", big.NewInt(4), false, }, { - "Invalid NodeID, Mainnet", "mainnet", big.NewInt(-2), true, + "Invalid NodeID, Holesky #1", "holesky", big.NewInt(-4), true, + }, + { + "Invalid NodeID, Holesky #2", "holesky", big.NewInt(20000), true, }, - // { - // "Valid NodeID, Mainnet", "mainnet", big.NewInt(1), false, - // }, } for _, tc := range tcs { @@ -146,6 +149,9 @@ func FuzzTestNodeID(f *testing.F) { {"holesky", big.NewInt(13)}, {"holesky", big.NewInt(-1)}, {"holesky", big.NewInt(40000)}, + {"mainnet", big.NewInt(12)}, + {"mainnet", big.NewInt(-5)}, + {"mainnet", big.NewInt(500000)}, } for _, tc := range testcases { diff --git a/internal/lido/contracts/mevboostrelaylist/relays.yaml b/internal/lido/contracts/mevboostrelaylist/relays.yaml index a8007c82..dd8657a0 100644 --- a/internal/lido/contracts/mevboostrelaylist/relays.yaml +++ b/internal/lido/contracts/mevboostrelaylist/relays.yaml @@ -58,15 +58,23 @@ holesky: Operator: "Beaverbuild" IsMandatory: false Description: "Beaverbuild Relay Holesky" - - Uri: "https://0xb1d229d9c21298a87846c7022ebeef277dfc321fe674fa45312e20b5b6c400bfde9383f801848d7837ed5fc449083a12@relay-holesky.edennetwork.io" - Operator: "Eden" + - Uri: "https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-holesky.flashbots.net" + Operator: "Flashbots" IsMandatory: true - Description: "Eden Relay Holesky - Filtering" + Description: "Flashbots Boost Holesky - filtering" - Uri: "https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@holesky.titanrelay.xyz/" Operator: "Titan" IsMandatory: true Description: "Titan Relay Holesky - nonfiltering" - - Uri: "https://0xafa4c6985aa049fb79dd37010438cfebeb0f2bd42b115b89dd678dab0670c1de38da0c4e9138c9290a398ecd9a0b3110@boost-relay-holesky.flashbots.net" - Operator: "Flashbots" - IsMandatory: true - Description: "Flashbots Boost Holesky - filtering" \ No newline at end of file + - Uri: "https://0xa55c1285d84ba83a5ad26420cd5ad3091e49c55a813eee651cd467db38a8c8e63192f47955e9376f6b42f6d190571cb5@relay-holesky.bolt.chainbound.io" + Operator: "Chainbound" + IsMandatory: false + Description: "Chainbound Preconf Holesky" + - Uri: "https://0x8d6ff9fdf3b8c05293f6c240f57034c6c5244d7ecb2b9a6e597de575b373610d6345f5060c150012d1cc42d38b8383ac@preconfs-holesky.aestus.live" + Operator: "Aestus" + IsMandatory: false + Description: "Aestus Preconf Holesky" + - Uri: "https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@holesky-preconf.titanrelay.xyz" + Operator: "Titan" + IsMandatory: false + Description: "Titan Preconf Holesky" \ No newline at end of file