Skip to content

Commit

Permalink
Merge pull request #218 from stader-labs/client_updates
Browse files Browse the repository at this point in the history
Client updates
  • Loading branch information
batphonghan authored Oct 25, 2024
2 parents 10ec85f + 503c847 commit 6a7f8f7
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 52 deletions.
2 changes: 1 addition & 1 deletion install/scripts/start-ec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ if [ "$CLIENT" = "besu" ]; then
fi


CMD="$CMD --fast-sync-min-peers=3 --sync-mode=X_CHECKPOINT"
CMD="$CMD --sync-mode=SNAP --data-storage-format=BONSAI"

if [ "$BESU_JVM_HEAP_SIZE" -gt "0" ]; then
CMD="env JAVA_OPTS=\"-Xmx${BESU_JVM_HEAP_SIZE}m\" $CMD"
Expand Down
4 changes: 2 additions & 2 deletions shared/services/config/besu-params.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (

// Constants
const (
besuTagTest string = "hyperledger/besu:24.5.4"
besuTagProd string = "hyperledger/besu:24.5.4"
besuTagTest string = "hyperledger/besu:24.10.0"
besuTagProd string = "hyperledger/besu:24.10.0"
besuEventLogInterval int = 1000
besuMaxPeers uint16 = 25
besuStopSignal string = "SIGTERM"
Expand Down
4 changes: 2 additions & 2 deletions shared/services/config/external-configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ func NewExternalLighthouseConfig(cfg *StaderConfig) *ExternalLighthouseConfig {
Description: "The tag name of the Lighthouse container you want to use from Docker Hub. This will be used for the Validator Client that Stader manages with your validator keys.",
Type: config.ParameterType_String,
Default: map[config.Network]interface{}{
config.Network_Mainnet: getLighthouseTagProd(),
config.Network_Holesky: getLighthouseTagTest(),
config.Network_Mainnet: lighthouseTagPortableProd,
config.Network_Holesky: lighthouseTagPortableTest,
},
AffectsContainers: []config.ContainerID{config.ContainerID_Validator},
EnvironmentVariables: []string{"VC_CONTAINER_TAG"},
Expand Down
4 changes: 2 additions & 2 deletions shared/services/config/geth-params.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (

// Constants
const (
gethTagProd string = "ethereum/client-go:v1.14.5"
gethTagTest string = "ethereum/client-go:v1.14.5"
gethTagProd string = "ethereum/client-go:v1.14.11"
gethTagTest string = "ethereum/client-go:v1.14.11"
gethEventLogInterval int = 1000
gethStopSignal string = "SIGTERM"
)
Expand Down
2 changes: 1 addition & 1 deletion shared/services/config/grafana-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

// Constants
const grafanaTag string = "grafana/grafana:9.4.15"
const grafanaTag string = "grafana/grafana:9.4.18"

// Defaults
const defaultGrafanaPort uint16 = 3100
Expand Down
29 changes: 4 additions & 25 deletions shared/services/config/lighthouse-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ package config

import (
"github.com/stader-labs/stader-node/shared/types/config"
"github.com/stader-labs/stader-node/shared/utils/sys"
)

const (
lighthouseTagPortableTest string = "sigp/lighthouse:v5.2.0"
lighthouseTagPortableProd string = "sigp/lighthouse:v5.2.0"
lighthouseTagModernTest string = "sigp/lighthouse:v5.2.0-modern"
lighthouseTagModernProd string = "sigp/lighthouse:v5.2.0-modern"
lighthouseTagPortableTest string = "sigp/lighthouse:v5.3.0"
lighthouseTagPortableProd string = "sigp/lighthouse:v5.3.0"
defaultLhMaxPeers uint16 = 80
)

Expand Down Expand Up @@ -75,8 +72,8 @@ func NewLighthouseConfig(cfg *StaderConfig) *LighthouseConfig {
Description: "The tag name of the Lighthouse container you want to use from Docker Hub.",
Type: config.ParameterType_String,
Default: map[config.Network]interface{}{
config.Network_Mainnet: getLighthouseTagProd(),
config.Network_Holesky: getLighthouseTagTest(),
config.Network_Mainnet: lighthouseTagPortableProd,
config.Network_Holesky: lighthouseTagPortableTest,
},
AffectsContainers: []config.ContainerID{config.ContainerID_Eth2, config.ContainerID_Validator},
EnvironmentVariables: []string{"BN_CONTAINER_TAG", "VC_CONTAINER_TAG"},
Expand Down Expand Up @@ -139,21 +136,3 @@ func (cfg *LighthouseConfig) GetName() string {
func (cfg *LighthouseConfig) GetConfigTitle() string {
return cfg.Title
}

// Get the appropriate LH default tag for production
func getLighthouseTagProd() string {
missingFeatures := sys.GetMissingModernCpuFeatures()
if len(missingFeatures) > 0 {
return lighthouseTagPortableProd
}
return lighthouseTagModernProd
}

// Get the appropriate LH default tag for testnets
func getLighthouseTagTest() string {
missingFeatures := sys.GetMissingModernCpuFeatures()
if len(missingFeatures) > 0 {
return lighthouseTagPortableTest
}
return lighthouseTagModernTest
}
4 changes: 2 additions & 2 deletions shared/services/config/lodestar-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
)

const (
lodestarTagTest string = "chainsafe/lodestar:v1.19.0"
lodestarTagProd string = "chainsafe/lodestar:v1.19.0"
lodestarTagTest string = "chainsafe/lodestar:v1.22.0"
lodestarTagProd string = "chainsafe/lodestar:v1.22.0"
defaultLodestarMaxPeers uint16 = 50
)

Expand Down
4 changes: 2 additions & 2 deletions shared/services/config/mev-boost-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (

// Constants
const (
mevBoostPortableTag string = "flashbots/mev-boost:1.7"
mevBoostModernTag string = "flashbots/mev-boost:1.7"
mevBoostPortableTag string = "flashbots/mev-boost:1.8"
mevBoostModernTag string = "flashbots/mev-boost:1.8"
mevBoostUrlEnvVar string = "MEV_BOOST_URL"
mevBoostRelaysEnvVar string = "MEV_BOOST_RELAYS"
mevDocsUrl string = "#"
Expand Down
4 changes: 2 additions & 2 deletions shared/services/config/nethermind-params.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (

// Constants
const (
nethermindTagProd string = "nethermind/nethermind:1.27.0"
nethermindTagTest string = "nethermind/nethermind:1.27.0"
nethermindTagProd string = "nethermind/nethermind:1.29.1"
nethermindTagTest string = "nethermind/nethermind:1.29.1"
nethermindEventLogInterval int = 1000
nethermindStopSignal string = "SIGTERM"
)
Expand Down
8 changes: 4 additions & 4 deletions shared/services/config/nimbus-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ import (

const (
// Testnet
nimbusBnTagTest string = "statusim/nimbus-eth2:multiarch-v24.5.1"
nimbusVcTagTest string = "statusim/nimbus-validator-client:multiarch-v24.5.1"
nimbusBnTagTest string = "statusim/nimbus-eth2:multiarch-v24.9.0"
nimbusVcTagTest string = "statusim/nimbus-validator-client:multiarch-v24.9.0"

// Mainnet
nimbusBnTagProd string = "statusim/nimbus-eth2:multiarch-v24.5.1"
nimbusVcTagProd string = "statusim/nimbus-validator-client:multiarch-v24.5.1"
nimbusBnTagProd string = "statusim/nimbus-eth2:multiarch-v24.9.0"
nimbusVcTagProd string = "statusim/nimbus-validator-client:multiarch-v24.9.0"

defaultNimbusMaxPeersArm uint16 = 100
defaultNimbusMaxPeersAmd uint16 = 160
Expand Down
2 changes: 1 addition & 1 deletion shared/services/config/prometheus-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

// Constants
const prometheusTag string = "prom/prometheus:v2.47.1"
const prometheusTag string = "prom/prometheus:v2.53.1"

// Defaults
const defaultPrometheusPort uint16 = 9091
Expand Down
8 changes: 4 additions & 4 deletions shared/services/config/prysm-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (
)

const (
prysmBnTagTest string = "staderlabs/prysm:v5.0.4"
prysmVcTagTest string = "staderlabs/prysm:v5.0.4"
prysmBnTagTest string = "staderlabs/prysm:v5.1.2"
prysmVcTagTest string = "staderlabs/prysm:v5.1.2"

prysmBnTagProd string = "staderlabs/prysm:v5.0.4"
prysmVcTagProd string = "staderlabs/prysm:v5.0.4"
prysmBnTagProd string = "staderlabs/prysm:v5.1.2"
prysmVcTagProd string = "staderlabs/prysm:v5.1.2"

defaultPrysmRpcPort uint16 = 5053
defaultPrysmOpenRpcPort bool = false
Expand Down
4 changes: 2 additions & 2 deletions shared/services/config/teku-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
)

const (
tekuTagTest string = "consensys/teku:24.6.1"
tekuTagProd string = "consensys/teku:24.6.1"
tekuTagTest string = "consensys/teku:24.10.2"
tekuTagProd string = "consensys/teku:24.10.2"
defaultTekuMaxPeers uint16 = 100
)

Expand Down
2 changes: 1 addition & 1 deletion shared/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package shared

const BinaryBucket string = "/stader-node-build/permissionless"
const DockerAccount string = "staderlabs"
const StaderVersion string = "1.6.2"
const StaderVersion string = "1.6.2-dev"

const Logo string = `
_____ _ _ _ _ 𝅺
Expand Down
10 changes: 10 additions & 0 deletions stader-cli/service/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ func migrate(c *cli.Context) (runBeforeUpgrades, rundAfterUpgrades []ConfigUpgra
return nil, nil, err
}

v162, err := parseVersion("1.6.2")
if err != nil {
return nil, nil, err
}

// Create the collection of upgraders
upgraders := []ConfigUpgrader{
{
Expand Down Expand Up @@ -110,6 +115,11 @@ func migrate(c *cli.Context) (runBeforeUpgrades, rundAfterUpgrades []ConfigUpgra
upgradeFunc: func(_ *cli.Context) error { return nil },
needInstall: true,
},
{
version: v162,
upgradeFunc: func(_ *cli.Context) error { return nil },
needInstall: true,
},
}

staderClient, err := stader.NewClientFromCtx(c)
Expand Down
2 changes: 1 addition & 1 deletion stader-lib/node/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func AddValidatorKeysWithAmount(
opts *bind.TransactOpts) (*types.Transaction, error) {
tx, err := pnr.PermissionlessNodeRegistry.AddValidatorKeysWithUtilizeSD(opts, referralID, utilityAmount, pubKeys, preDepositSignatures, depositSignatures)
if err != nil {
return nil, fmt.Errorf("could not add validator keys with utilize: %w", err)
return nil, fmt.Errorf("could not add validator keys with utilized SD: %w", err)
}

return tx, nil
Expand Down

0 comments on commit 6a7f8f7

Please sign in to comment.