Skip to content

Commit baed88e

Browse files
authored
Merge pull request #477 from rocket-pool/dev_v2
Rolled the Watchtower into the Node
2 parents cd0f1dc + b7222fa commit baed88e

62 files changed

Lines changed: 1191 additions & 1197 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

install/deploy/override/watchtower.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

install/deploy/scripts/start-vc.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ if [ "$CLIENT" = "teku" ]; then
229229
--validators-proposer-default-fee-recipient=$(cat $VALIDATORS_DIR/$FEE_RECIPIENT_FILE) \
230230
$VC_ADDITIONAL_FLAGS"
231231

232+
if [ "$TEKU_SHUT_DOWN_WHEN_SLASHED" = "true" ]; then
233+
CMD="$CMD --shut-down-when-validator-slashed-enabled=true"
234+
fi
235+
232236
if [ "$DOPPELGANGER_DETECTION" = "true" ]; then
233237
CMD="$CMD --doppelganger-detection-enabled"
234238
fi

install/deploy/templates/node.tmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ services:
1717
command:
1818
- --user-dir
1919
- "{{.RocketPoolDirectory}}"
20-
- "node"
2120
networks:
2221
- net
2322
cap_drop:

install/deploy/templates/prometheus-cfg.tmpl

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ scrape_configs:
3737
static_configs:
3838
- targets: ['{{.DaemonContainerName}}:{{or .Metrics.DaemonMetricsPort.Value "9102"}}']
3939

40-
- job_name: 'watchtower'
41-
scrape_interval: 5m
42-
scrape_timeout: 5m
43-
static_configs:
44-
- targets: ['{{.WatchtowerContainerName}}:{{or .Metrics.WatchtowerMetricsPort.Value "9104"}}']
45-
4640
- job_name: 'custom_jobs' # Mandatory field, but will be ignored.
4741
file_sd_configs:
4842
- files:

install/deploy/templates/validator.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ services:
4040
- ENABLE_MEV_BOOST={{.MevBoost.Enable}}
4141
- VALIDATORS_DIR={{.GetValidatorsFolderPath}}
4242
- GWW_GRAFFITI_FILE={{.GetGwwGraffitiFilePath}}
43+
{{- /* Client-specific values */}}
44+
{{- if eq .LocalBeaconClient.BeaconNode.String "teku"}}
45+
- TEKU_SHUT_DOWN_WHEN_SLASHED={{.ValidatorClient.Teku.UseSlashingProtection}}
46+
{{- end}}
4347
entrypoint: sh
4448
command: "/usr/share/rocketpool/scripts/{{.GetVcStartScript}}"
4549
cap_drop:

install/deploy/templates/watchtower.tmpl

Lines changed: 0 additions & 29 deletions
This file was deleted.

install/install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,4 +369,3 @@ install() {
369369
}
370370

371371
install "$@"
372-

src/client/network.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package client
33
import (
44
"fmt"
55

6-
"github.com/ethereum/go-ethereum/common"
76
"github.com/rocket-pool/node-manager-core/api/client"
87
"github.com/rocket-pool/node-manager-core/api/types"
98
"github.com/rocket-pool/smartnode/shared/types/api"
@@ -87,21 +86,3 @@ func (r *NetworkRequester) Stats() (*types.ApiResponse[api.NetworkStatsData], er
8786
func (r *NetworkRequester) TimezoneMap() (*types.ApiResponse[api.NetworkTimezonesData], error) {
8887
return client.SendGetRequest[api.NetworkTimezonesData](r, "timezone-map", "TimezoneMap", nil)
8988
}
90-
91-
// Initialize voting so the node can vote on Protocol DAO proposals
92-
func (r *NetworkRequester) InitializeVoting() (*types.ApiResponse[api.NetworkInitializeVotingData], error) {
93-
return client.SendGetRequest[api.NetworkInitializeVotingData](r, "initialize-voting", "InitializeVoting", nil)
94-
}
95-
96-
// Set the delegate for voting on Protocol DAO proposals
97-
func (r *NetworkRequester) SetVotingDelegate(delegate common.Address) (*types.ApiResponse[types.TxInfoData], error) {
98-
args := map[string]string{
99-
"delegate": delegate.Hex(),
100-
}
101-
return client.SendGetRequest[types.TxInfoData](r, "voting-delegate/set", "SetVotingDelegate", args)
102-
}
103-
104-
// Get the address that's assigned as the delegate for voting on Protocol DAO proposals
105-
func (r *NetworkRequester) GetCurrentVotingDelegate() (*types.ApiResponse[api.NetworkCurrentVotingDelegateData], error) {
106-
return client.SendGetRequest[api.NetworkCurrentVotingDelegateData](r, "voting-delegate", "GetCurrentVotingDelegate", nil)
107-
}

src/client/pdao.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,3 +194,21 @@ func (r *PDaoRequester) ProposeSetting(contractName rocketpool.ContractName, set
194194
}
195195
return client.SendGetRequest[api.ProtocolDaoProposeSettingData](r, "setting/propose", "ProposeSetting", args)
196196
}
197+
198+
// Initialize voting so the node can vote on Protocol DAO proposals
199+
func (r *PDaoRequester) InitializeVoting() (*types.ApiResponse[api.ProtocolDaoInitializeVotingData], error) {
200+
return client.SendGetRequest[api.ProtocolDaoInitializeVotingData](r, "initialize-voting", "InitializeVoting", nil)
201+
}
202+
203+
// Set the delegate for voting on Protocol DAO proposals
204+
func (r *PDaoRequester) SetVotingDelegate(delegate common.Address) (*types.ApiResponse[types.TxInfoData], error) {
205+
args := map[string]string{
206+
"delegate": delegate.Hex(),
207+
}
208+
return client.SendGetRequest[types.TxInfoData](r, "voting-delegate/set", "SetVotingDelegate", args)
209+
}
210+
211+
// Get the address that's assigned as the delegate for voting on Protocol DAO proposals
212+
func (r *PDaoRequester) GetCurrentVotingDelegate() (*types.ApiResponse[api.ProtocolDaoCurrentVotingDelegateData], error) {
213+
return client.SendGetRequest[api.ProtocolDaoCurrentVotingDelegateData](r, "voting-delegate", "GetCurrentVotingDelegate", nil)
214+
}

src/go.mod

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ require (
2828
github.com/prometheus/client_golang v1.19.0
2929
github.com/prysmaticlabs/prysm/v5 v5.0.2
3030
github.com/rivo/tview v0.0.0-20230208211350-7dfff1ce7854 // DO NOT UPGRADE
31-
github.com/rocket-pool/node-manager-core v0.2.0
32-
github.com/rocket-pool/rocketpool-go v1.8.3-0.20240327034231-ad6fd7e143ff
31+
github.com/rocket-pool/node-manager-core v0.2.1-0.20240407161311-95eaf78834a0
32+
github.com/rocket-pool/rocketpool-go v1.8.3-0.20240405153840-e60a37585be4
3333
github.com/shirou/gopsutil/v3 v3.24.2
3434
github.com/tyler-smith/go-bip39 v1.1.0
3535
github.com/wealdtech/go-ens/v3 v3.6.0
@@ -169,12 +169,11 @@ require (
169169
google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa // indirect
170170
google.golang.org/grpc v1.62.1 // indirect
171171
google.golang.org/protobuf v1.33.0
172+
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
172173
lukechampine.com/blake3 v1.2.1 // indirect
173174
rsc.io/tmplfunc v0.0.3 // indirect
174-
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
175175
)
176176

177-
178177
replace github.com/wealdtech/go-merkletree v1.0.1-0.20190605192610-2bb163c2ea2a => github.com/rocket-pool/go-merkletree v1.0.1-0.20220406020931-c262d9b976dd
179178

180179
// replace github.com/web3-storage/go-w3s-client => github.com/rocket-pool/go-w3s-client v0.0.0-20221006052217-dbd9938d11d8

0 commit comments

Comments
 (0)