Skip to content

Titan relay #230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
50 changes: 50 additions & 0 deletions shared/services/config/mev-boost-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`

Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions shared/types/config/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions stader-cli/service/configMEVBoost.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down
Loading