Skip to content

Commit

Permalink
Resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaspanf committed Oct 11, 2024
1 parent dbc99e7 commit a63610d
Show file tree
Hide file tree
Showing 60 changed files with 861 additions and 289 deletions.
13 changes: 13 additions & 0 deletions assets/patchnotes/2.0.0-b4.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{.ColorGreen}}=== Smart Node v{{.RocketPoolVersion}} ==={{.ColorReset}}

Changes you should be aware of before starting:

{{.ColorGreen}}=== Welcome to the v2.0 Beta! ==={{.ColorReset}}
Welcome to Smart Node v2! This is a completely redesigned Smart Node from the ground up, taking advantage of years of lessons learned and user feedback. The list of features and changes is far too long to list here, but here are some highlights:
- Support for installing and updating via Debian's `apt` package manager (other package managers coming soon!)
- Support for printing transaction data or signed transactions without submitting them to the network
- Passwordless mode: an opt-in feature that will no longer save your node wallet's password to disk
- Overhauled Smart Node service with an HTTP API, support for batching Ethereum queries and transactions together, a new logging system, and consolidation of the api / node / watchtower containers into one
- And much more!

To learn all about what's changed in Smart Node v2 and how to use it, take a look at our guide: https://github.com/rocket-pool/smartnode/blob/v2/v2.md
2 changes: 1 addition & 1 deletion assets/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"Version": "2.0.0-b3"
"Version": "2.0.0-b4"
}
5 changes: 5 additions & 0 deletions client/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,8 @@ func (r *NetworkRequester) Stats() (*types.ApiResponse[api.NetworkStatsData], er
func (r *NetworkRequester) TimezoneMap() (*types.ApiResponse[api.NetworkTimezonesData], error) {
return client.SendGetRequest[api.NetworkTimezonesData](r, "timezone-map", "TimezoneMap", nil)
}

// Get the timezone map
func (r *NetworkRequester) IsHoustonHotfixDeployed() (*types.ApiResponse[api.NetworkHotfixDeployedData], error) {
return client.SendGetRequest[api.NetworkHotfixDeployedData](r, "is-hotfix-deployed", "IsHoustonHotfixDeployed", nil)
}
16 changes: 13 additions & 3 deletions client/pdao.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,17 @@ func (r *PDaoRequester) ProposeSetting(contractName rocketpool.ContractName, set
return client.SendGetRequest[api.ProtocolDaoProposeSettingData](r, "setting/propose", "ProposeSetting", args)
}

// Initialize voting so the node can vote on Protocol DAO proposals
func (r *PDaoRequester) InitializeVoting(delegate common.Address) (*types.ApiResponse[api.ProtocolDaoInitializeVotingData], error) {
// Initialize voting with delegate unlocks the node's voting power and sets the delegate in one transasction
func (r *PDaoRequester) InitializeVotingWithDelegate(delegate common.Address) (*types.ApiResponse[api.ProtocolDaoInitializeVotingData], error) {
args := map[string]string{
"delegate": delegate.Hex(),
}
return client.SendGetRequest[api.ProtocolDaoInitializeVotingData](r, "initialize-voting", "InitializeVoting", args)
return client.SendGetRequest[api.ProtocolDaoInitializeVotingData](r, "initialize-voting-with-delegate", "InitializeVotingWithDelegate", args)
}

// Initialize voting so the node can vote on Protocol DAO proposals
func (r *PDaoRequester) InitializeVoting() (*types.ApiResponse[api.ProtocolDaoInitializeVotingData], error) {
return client.SendGetRequest[api.ProtocolDaoInitializeVotingData](r, "initialize-voting", "InitializeVoting", nil)
}

// Set the delegate for voting on Protocol DAO proposals
Expand Down Expand Up @@ -234,3 +239,8 @@ func (r *PDaoRequester) SetSignallingAddress(signallingAddress common.Address, s
func (r *PDaoRequester) ClearSignallingAddress() (*types.ApiResponse[types.TxInfoData], error) {
return client.SendGetRequest[types.TxInfoData](r, "clear-signalling-address", "ClearSignallingAddress", nil)
}

// IsVotingInitialized checks if a node has initialized voting power
func (r *PDaoRequester) IsVotingInitialized() (*types.ApiResponse[api.ProtocolDaoIsVotingInitializedData], error) {
return client.SendGetRequest[api.ProtocolDaoIsVotingInitializedData](r, "is-voting-initialized", "IsVotingInitialized", nil)
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ require (
github.com/prysmaticlabs/prysm/v5 v5.0.3
github.com/rivo/tview v0.0.0-20230208211350-7dfff1ce7854 // DO NOT UPGRADE
github.com/rocket-pool/node-manager-core v0.5.0
github.com/rocket-pool/rocketpool-go/v2 v2.0.0-b2.0.20240903030216-a6f93f52a853
github.com/rocket-pool/rocketpool-go/v2 v2.0.0-b2.0.20241009181157-ebb8c8b0bf54
github.com/shirou/gopsutil/v3 v3.24.3
github.com/tyler-smith/go-bip39 v1.1.0
github.com/wealdtech/go-ens/v3 v3.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,8 @@ github.com/rocket-pool/go-merkletree v1.0.1-0.20220406020931-c262d9b976dd h1:p9K
github.com/rocket-pool/go-merkletree v1.0.1-0.20220406020931-c262d9b976dd/go.mod h1:UE9fof8P7iESVtLn1K9CTSkNRYVFHZHlf96RKbU33kA=
github.com/rocket-pool/node-manager-core v0.5.0 h1:98PnHb67mgOKTHMQlRql5KINYM+5NGYV3n4GYChZuec=
github.com/rocket-pool/node-manager-core v0.5.0/go.mod h1:Clii5aca9PvR4HoAlUs8dh2OsJbDDnJ4yL5EaQE1gSo=
github.com/rocket-pool/rocketpool-go/v2 v2.0.0-b2.0.20240903030216-a6f93f52a853 h1:Zeb//JGHTR/FbHAN7eD73nqzy1R/2VGYHq6I0ofXzQM=
github.com/rocket-pool/rocketpool-go/v2 v2.0.0-b2.0.20240903030216-a6f93f52a853/go.mod h1:pcY43H/m5pjr7zacrsKVaXnXfKKi1UV08VDPUwxbJkc=
github.com/rocket-pool/rocketpool-go/v2 v2.0.0-b2.0.20241009181157-ebb8c8b0bf54 h1:869F7HFTkCHUNxAj6WwtapWEL8DiVfy918DviPz57dY=
github.com/rocket-pool/rocketpool-go/v2 v2.0.0-b2.0.20241009181157-ebb8c8b0bf54/go.mod h1:pcY43H/m5pjr7zacrsKVaXnXfKKi1UV08VDPUwxbJkc=
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo=
Expand Down
27 changes: 24 additions & 3 deletions install/deploy/scripts/start-mev-boost.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
#!/bin/sh

# Set up the network-based flag
parse_additional_flags() {
# Initialize an empty string for additional arguments
ADDITIONAL_ARGS=""

# Check if the environment variable MEV_BOOST_ADDITIONAL_FLAGS is not empty
if [ -n "$MEV_BOOST_ADDITIONAL_FLAGS" ]; then
# Split the input string into an array of key-value pairs using comma as the delimiter
IFS=',' read -r -a pairs <<< "$MEV_BOOST_ADDITIONAL_FLAGS"

# Iterate over each key-value pair
for pair in "${pairs[@]}"; do
# Extract the key and value from the current pair
key=$(echo "$pair" | cut -d'=' -f1)
value=$(echo "$pair" | cut -d'=' -f2)

# Append the key-value pair to the ADDITIONAL_ARGS string
ADDITIONAL_ARGS="$ADDITIONAL_ARGS -${key} ${value}"
done
fi
}

if [ "$NETWORK" = "mainnet" ]; then
MEV_NETWORK="mainnet"
elif [ "$NETWORK" = "holesky" ]; then
Expand All @@ -12,5 +32,6 @@ else
exit 1
fi

# Run MEV-boost
exec /app/mev-boost -${MEV_NETWORK} -addr 0.0.0.0:${MEV_BOOST_PORT} -relay-check -relays ${MEV_BOOST_RELAYS}
parse_additional_flags

exec /app/mev-boost -${MEV_NETWORK} -addr 0.0.0.0:${MEV_BOOST_PORT} -relay-check -relays ${MEV_BOOST_RELAYS} ${ADDITIONAL_ARGS}
4 changes: 2 additions & 2 deletions install/deploy/templates/eth1.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
ports: [ "{{$p2p}}:{{$p2p}}/udp", "{{$p2p}}:{{$p2p}}/tcp"{{.GetEcOpenApiPorts}} ]
volumes:
- {{.ExecutionClientDataVolume}}:/ethclient
- /usr/share/rocketpool/scripts:/usr/share/rocketpool/scripts:ro
- /opt/rocketpool/scripts:/opt/rocketpool/scripts:ro
- /var/lib/rocketpool/data/{{.ProjectName}}:/secrets
networks:
- net
Expand Down Expand Up @@ -49,7 +49,7 @@ services:
- RP_GETH_ARCHIVE_MODE={{.LocalExecutionClient.Geth.ArchiveMode}}
{{- end}}
entrypoint: sh
command: "/usr/share/rocketpool/scripts/{{.GetEcStartScript}}"
command: "/opt/rocketpool/scripts/{{.GetEcStartScript}}"
cap_drop:
- all
cap_add:
Expand Down
4 changes: 2 additions & 2 deletions install/deploy/templates/eth2.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
{{- end}}
volumes:
- {{.BeaconNodeDataVolume}}:/ethclient
- /usr/share/rocketpool/scripts:/usr/share/rocketpool/scripts:ro
- /opt/rocketpool/scripts:/opt/rocketpool/scripts:ro
- /var/lib/rocketpool/data/{{.ProjectName}}:/secrets:ro
networks:
- net
Expand Down Expand Up @@ -61,7 +61,7 @@ services:
- BN_P2P_QUIC_PORT={{.LocalBeaconClient.Lighthouse.P2pQuicPort}}
{{- end}}
entrypoint: sh
command: "/usr/share/rocketpool/scripts/{{.GetBnStartScript}}"
command: "/opt/rocketpool/scripts/{{.GetBnStartScript}}"
cap_drop:
- all
cap_add:
Expand Down
2 changes: 1 addition & 1 deletion install/deploy/templates/exporter.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
- "/sys:/host/sys:ro,rslave"
- "/var/lib/node_exporter/textfile_collector:/host/textfile_collector:ro"
{{- if .Metrics.Exporter.RootFs.Value }}
- "/:/rootfs:ro"
- "/:/rootfs:ro,rslave"
{{- end}}
network_mode: host
networks:
Expand Down
5 changes: 3 additions & 2 deletions install/deploy/templates/mev-boost.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ services:
restart: unless-stopped
ports: [{{.GetMevBoostOpenPorts}}]
volumes:
- /usr/share/rocketpool/scripts:/usr/share/rocketpool/scripts:ro
- /opt/rocketpool/scripts:/opt/rocketpool/scripts:ro
networks:
- net
environment:
- NETWORK={{.Network}}
- MEV_BOOST_PORT={{.MevBoost.Port}}
- MEV_BOOST_RELAYS={{.MevBoost.GetRelayString}}
- MEV_BOOST_ADDITIONAL_FLAGS={{.MevBoost.AdditionalFlags}}
entrypoint: sh
command: "/usr/share/rocketpool/scripts/{{.GetMevBoostStartScript}}"
command: "/opt/rocketpool/scripts/{{.GetMevBoostStartScript}}"
cap_drop:
- all
cap_add:
Expand Down
4 changes: 2 additions & 2 deletions install/deploy/templates/validator.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
restart: unless-stopped
stop_grace_period: 3m
volumes:
- /usr/share/rocketpool/scripts:/usr/share/rocketpool/scripts:ro
- /opt/rocketpool/scripts:/opt/rocketpool/scripts:ro
- {{.GetValidatorsFolderPath}}:{{.GetValidatorsFolderPath}}
- {{.GetAddonsFolderPath}}:{{.GetAddonsFolderPath}}
networks:
Expand Down Expand Up @@ -45,7 +45,7 @@ services:
- TEKU_SHUT_DOWN_WHEN_SLASHED={{.ValidatorClient.Teku.UseSlashingProtection}}
{{- end}}
entrypoint: sh
command: "/usr/share/rocketpool/scripts/{{.GetVcStartScript}}"
command: "/opt/rocketpool/scripts/{{.GetVcStartScript}}"
cap_drop:
- all
cap_add:
Expand Down
15 changes: 7 additions & 8 deletions install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,11 @@ install() {
fi

# Create rocket pool dir & files
RP_BIN_PATH=/usr/bin/rocketpool
RP_SHARE_PATH=/usr/share/rocketpool
RP_SYS_PATH=/opt/rocketpool
RP_VAR_PATH=/var/lib/rocketpool

progress 4 "Creating Rocket Pool directory structure..."
{ mkdir -p "$RP_SHARE_PATH" || fail "Could not create the Rocket Pool resources directory."; } >&2
{ mkdir -p "$RP_SYS_PATH" || fail "Could not create the Rocket Pool resources directory."; } >&2
{ mkdir -p "$RP_VAR_PATH/data" || fail "Could not create the Rocket Pool system data directory."; } >&2
{ chmod 0700 "$RP_VAR_PATH/data" || fail "Could not set the Rocket Pool data directory permissions."; } >&2

Expand All @@ -359,11 +358,11 @@ install() {

# Copy package files
progress 6 "Copying package files to Rocket Pool system directory..."
{ cp -r "$PACKAGE_FILES_PATH/addons" "$RP_SHARE_PATH" || fail "Could not copy addons folder to the Rocket Pool system directory."; } >&2
{ cp -r "$PACKAGE_FILES_PATH/override" "$RP_SHARE_PATH" || fail "Could not copy override folder to the Rocket Pool system directory."; } >&2
{ cp -r "$PACKAGE_FILES_PATH/scripts" "$RP_SHARE_PATH" || fail "Could not copy scripts folder to the Rocket Pool system directory."; } >&2
{ cp -r "$PACKAGE_FILES_PATH/templates" "$RP_SHARE_PATH" || fail "Could not copy templates folder to the Rocket Pool system directory."; } >&2
{ find "$RP_SHARE_PATH/scripts" -name "*.sh" -exec chmod +x {} \; 2>/dev/null || fail "Could not set executable permissions on package files."; } >&2
{ cp -r "$PACKAGE_FILES_PATH/addons" "$RP_SYS_PATH" || fail "Could not copy addons folder to the Rocket Pool system directory."; } >&2
{ cp -r "$PACKAGE_FILES_PATH/override" "$RP_SYS_PATH" || fail "Could not copy override folder to the Rocket Pool system directory."; } >&2
{ cp -r "$PACKAGE_FILES_PATH/scripts" "$RP_SYS_PATH" || fail "Could not copy scripts folder to the Rocket Pool system directory."; } >&2
{ cp -r "$PACKAGE_FILES_PATH/templates" "$RP_SYS_PATH" || fail "Could not copy templates folder to the Rocket Pool system directory."; } >&2
{ find "$RP_SYS_PATH/scripts" -name "*.sh" -exec chmod +x {} \; 2>/dev/null || fail "Could not set executable permissions on package files."; } >&2


# Clean up unnecessary files from old installations
Expand Down
15 changes: 14 additions & 1 deletion install/packages/debian/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
rocketpool (2.0.0~b3) UNRELEASED; urgency=medium
rocketpool (2.0.0~b4) unstable; urgency=medium

* Fixed a bug while rescuing dissolved minipools
* Fixed a bug while setting the RPL withdrawal address
* Updated the initialize voting command to mirror V1's behaviour
* Added a check to handle a case where bond reductions are disabled
* Updated the initialize voting command text
* Updated the node status text to mirror V1
* Fixed a bug while submitting odao proposals
* Fixed a bug with the odao and security list/detail commands (eg. rocketpool security proposal details or rocketpool odao proposals list)

-- Rocket Pool <dev@rocketpool.net> Mon, 23 Sep 2024 01:23:54 +0000

rocketpool (2.0.0~b3) unstable; urgency=medium

* Fixed the `minipool close` issue.
* Fixed the client mode logic.
Expand Down
6 changes: 3 additions & 3 deletions install/packages/debian/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ override_dh_auto_install:
# Create the folder structure and copy the deploy files over
install -dm 0700 debian/rocketpool/var/lib/rocketpool/data
install -dm 0700 debian/rocketpool/var/lib/rocketpool/global
mkdir -p debian/rocketpool/usr/share/rocketpool/
cp -r deploy/* debian/rocketpool/usr/share/rocketpool/
chmod -R +x debian/rocketpool/usr/share/rocketpool/scripts
mkdir -p debian/rocketpool/opt/rocketpool/
cp -r deploy/* debian/rocketpool/opt/rocketpool/
chmod -R +x debian/rocketpool/opt/rocketpool/scripts

override_dh_auto_test:
8 changes: 4 additions & 4 deletions rocketpool-cli/client/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
)

const (
templatesDir string = "/usr/share/rocketpool/templates"
addonsSourceDir string = "/usr/share/rocketpool/addons"
overrideSourceDir string = "/usr/share/rocketpool/override"
nativeScriptsSourceDir string = "/usr/share/rocketpool/scripts/native"
templatesDir string = "/opt/rocketpool/templates"
addonsSourceDir string = "/opt/rocketpool/addons"
overrideSourceDir string = "/opt/rocketpool/override"
nativeScriptsSourceDir string = "/opt/rocketpool/scripts/native"
overrideDir string = "override"
runtimeDir string = "runtime"
extraScrapeJobsDir string = "extra-scrape-jobs"
Expand Down
Loading

0 comments on commit a63610d

Please sign in to comment.