diff --git a/go.mod b/go.mod index 4fb1b91c..3042b1bd 100644 --- a/go.mod +++ b/go.mod @@ -25,8 +25,8 @@ require ( github.com/prysmaticlabs/prysm/v5 v5.0.3 github.com/sethvargo/go-password v0.2.0 github.com/shirou/gopsutil/v3 v3.23.1 - github.com/stader-labs/ethcli-ui/configuration v0.0.0-20240401032301-ba44ad7f2388 - github.com/stader-labs/ethcli-ui/wizard v0.0.0-20240401032301-ba44ad7f2388 + github.com/stader-labs/ethcli-ui/configuration v0.0.0-20250227120156-75f672823ee8 + github.com/stader-labs/ethcli-ui/wizard v0.0.0-20250227120156-75f672823ee8 github.com/tyler-smith/go-bip39 v1.1.0 github.com/urfave/cli v1.22.10 github.com/wealdtech/go-eth2-types/v2 v2.7.0 diff --git a/go.sum b/go.sum index c9777372..f7ba3a73 100644 --- a/go.sum +++ b/go.sum @@ -319,10 +319,10 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/stader-labs/ethcli-ui/configuration v0.0.0-20240401032301-ba44ad7f2388 h1:gBMnIJ6ImRnLtR3svUvKNo/aaRm6pTaaTqJAsvDM4WI= -github.com/stader-labs/ethcli-ui/configuration v0.0.0-20240401032301-ba44ad7f2388/go.mod h1:cZXmAbD7pFlFRFpplBAvs0aZQQpn1mqrOFXvk1eG5GE= -github.com/stader-labs/ethcli-ui/wizard v0.0.0-20240401032301-ba44ad7f2388 h1:UQnT1U0O6MMeFD4kwjRLzwnrsN9qEVoC2GYIif/EhyQ= -github.com/stader-labs/ethcli-ui/wizard v0.0.0-20240401032301-ba44ad7f2388/go.mod h1:foAYtd7iN9Dw69NtRaYaSw1x77IufSTxG5XMFfhPNCg= +github.com/stader-labs/ethcli-ui/configuration v0.0.0-20250227120156-75f672823ee8 h1:FtP0WTFPu80nJ3SGJ90R8xxDWrPp/OCFXg5zzh5NjMM= +github.com/stader-labs/ethcli-ui/configuration v0.0.0-20250227120156-75f672823ee8/go.mod h1:cZXmAbD7pFlFRFpplBAvs0aZQQpn1mqrOFXvk1eG5GE= +github.com/stader-labs/ethcli-ui/wizard v0.0.0-20250227120156-75f672823ee8 h1:Vq90lRwWK1FcQEll7W/ijvpuabMnIxRRNlhE439oniM= +github.com/stader-labs/ethcli-ui/wizard v0.0.0-20250227120156-75f672823ee8/go.mod h1:foAYtd7iN9Dw69NtRaYaSw1x77IufSTxG5XMFfhPNCg= github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/shared/services/config/mev-boost-config.go b/shared/services/config/mev-boost-config.go index c1d898fe..beb19bd3 100644 --- a/shared/services/config/mev-boost-config.go +++ b/shared/services/config/mev-boost-config.go @@ -83,6 +83,12 @@ type MevBoostConfig struct { // Agnostic relay AgnosticRelay config.Parameter `yaml:"AgnoticEnabled,omitempty"` + // Titan regulated relay + TitanRegulatedRelay config.Parameter `yaml:"TitanRegulatedEnable,omitempty"` + + // Titan unregulated relay + TitanUnRegulatedRelay config.Parameter `yaml:"TitanUnRegulatedEnable,omitempty"` + // The RPC port Port config.Parameter `yaml:"port,omitempty"` @@ -176,6 +182,8 @@ func NewMevBoostConfig(cfg *StaderConfig) *MevBoostConfig { UltrasoundRelay: generateRelayParameter("ultrasoundEnabled", relayMap[config.MevRelayID_Ultrasound]), AestusRelay: generateRelayParameter("aestusEnabled", relayMap[config.MevRelayID_Aestus]), AgnosticRelay: generateRelayParameter("agnosticEnabled", relayMap[config.MevRelayID_Agnostic]), + TitanRegulatedRelay: generateRelayParameter("titanRegulatedEnabled", relayMap[config.MevRelayID_TitanRegulated]), + TitanUnRegulatedRelay: generateRelayParameter("titanUnRegulatedEnabled", relayMap[config.MevRelayID_TitanUnRegulated]), Port: config.Parameter{ ID: "port", @@ -258,6 +266,8 @@ func (cfg *MevBoostConfig) GetParameters() []*config.Parameter { &cfg.UltrasoundRelay, &cfg.AestusRelay, &cfg.AgnosticRelay, + &cfg.TitanRegulatedRelay, + &cfg.TitanUnRegulatedRelay, &cfg.Port, &cfg.OpenRpcPort, &cfg.ContainerTag, @@ -390,6 +400,20 @@ func (cfg *MevBoostConfig) GetEnabledMevRelays() []config.MevRelay { relays = append(relays, cfg.relayMap[config.MevRelayID_Agnostic]) } } + + if cfg.TitanRegulatedRelay.Value == true { + _, exists := cfg.relayMap[config.MevRelayID_TitanRegulated].Urls[currentNetwork] + if exists { + relays = append(relays, cfg.relayMap[config.MevRelayID_TitanRegulated]) + } + } + + if cfg.TitanUnRegulatedRelay.Value == true { + _, exists := cfg.relayMap[config.MevRelayID_TitanUnRegulated].Urls[currentNetwork] + if exists { + relays = append(relays, cfg.relayMap[config.MevRelayID_TitanUnRegulated]) + } + } } return relays @@ -496,6 +520,32 @@ func createDefaultRelays() []config.MevRelay { Regulated: true, NoSandwiching: false, }, + + // Titan Regulated + { + ID: config.MevRelayID_TitanRegulated, + Name: "Titan Regulated (filtering)", + Description: "Titan Relay is a neutral, Rust-based MEV-Boost Relay optimized for low latency throughput, geographical distribution, and robustness. Select this to enable the \"filtering\" relay from Titan.", + Urls: map[config.Network]string{ + config.Network_Mainnet: "https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@regional.titanrelay.xyz", + config.Network_Holesky: "https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@holesky.titanrelay.xyz", + }, + Regulated: true, + NoSandwiching: false, + }, + + // Titan UnRegulated + { + ID: config.MevRelayID_TitanUnRegulated, + Name: "Titan UnRegulated (non-filtering)", + Description: "Titan Relay is a neutral, Rust-based MEV-Boost Relay optimized for low latency throughput, geographical distribution, and robustness. Select this to enable the \"non-filtering\" relay from Titan.", + Urls: map[config.Network]string{ + config.Network_Mainnet: "https://0x8c4ed5e24fe5c6ae21018437bde147693f68cda427cd1122cf20819c30eda7ed74f72dece09bb313f2a1855595ab677d@global.titanrelay.xyz", + config.Network_Holesky: "https://0xaa58208899c6105603b74396734a6263cc7d947f444f396a90f7b7d3e65d102aec7e5e5291b27e08d02c50a050825c2f@holesky.titanrelay.xyz", + }, + Regulated: false, + NoSandwiching: false, + }, } return relays diff --git a/shared/types/config/types.go b/shared/types/config/types.go index 0a491e27..1d793dba 100644 --- a/shared/types/config/types.go +++ b/shared/types/config/types.go @@ -113,6 +113,8 @@ const ( MevRelayID_Ultrasound MevRelayID = "ultrasound" MevRelayID_Aestus MevRelayID = "aestus" MevRelayID_Agnostic MevRelayID = "agnostic" + MevRelayID_TitanRegulated MevRelayID = "titanRegulated" + MevRelayID_TitanUnRegulated MevRelayID = "titanUnRegulated" ) // Enum to describe MEV-Boost relay selection mode diff --git a/stader-cli/service/configMEVBoost.go b/stader-cli/service/configMEVBoost.go index 1ac2f914..c2d7e012 100644 --- a/stader-cli/service/configMEVBoost.go +++ b/stader-cli/service/configMEVBoost.go @@ -62,6 +62,12 @@ func setUIMEVBoost(cfg *stdCf.StaderConfig, newSettings map[string]interface{}) enableAgnostic, _ := cfg.MevBoost.AgnosticRelay.Value.(bool) newSettings[keys.Mev_boost_rm_enable_agnostic] = enableAgnostic + enableTitanRegulated, _ := cfg.MevBoost.TitanRegulatedRelay.Value.(bool) + newSettings[keys.Mev_boost_rm_enable_titan_regulated] = enableTitanRegulated + + enableTitanUnRegulated, _ := cfg.MevBoost.TitanUnRegulatedRelay.Value.(bool) + newSettings[keys.Mev_boost_rm_enable_titan_unRegulated] = enableTitanUnRegulated + newSettings[keys.Mev_boost_rm_enable_bloXroute_regulated] = cfg.MevBoost.BloxRouteRegulatedRelay.Value.(bool) return nil @@ -91,6 +97,9 @@ func updateMEVBoost(cfg *stdCf.StaderConfig, newSettings map[string]interface{}) cfg.MevBoost.BloxRouteRegulatedRelay.Value = newSettings[keys.Mev_boost_rm_enable_bloXroute_regulated] cfg.MevBoost.AestusRelay.Value = newSettings[keys.Mev_boost_rm_enable_aestus] + cfg.MevBoost.TitanRegulatedRelay.Value = newSettings[keys.Mev_boost_rm_enable_titan_regulated] + cfg.MevBoost.TitanUnRegulatedRelay.Value = newSettings[keys.Mev_boost_rm_enable_titan_unRegulated] + cfg.MevBoost.AgnosticRelay.Value = newSettings[keys.Mev_boost_rm_enable_agnostic] switch mevSelection {