Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.
Draft
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
6 changes: 6 additions & 0 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ var (
utils.MetricsInfluxDBBucketFlag,
utils.MetricsInfluxDBOrganizationFlag,
}

suaveFlags = []cli.Flag{
utils.SuaveBeaconRpcFlag,
utils.SuaveBoostRelayUrlFlag,
}
)

var app = flags.NewApp("the go-ethereum command line interface")
Expand Down Expand Up @@ -258,6 +263,7 @@ func init() {
consoleFlags,
debug.Flags,
metricsFlags,
suaveFlags,
)
flags.AutoEnvVars(app.Flags, "GETH")

Expand Down
23 changes: 23 additions & 0 deletions cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,20 @@ Please note that --` + MetricsHTTPFlag.Name + ` must be set to start the server.
Value: metrics.DefaultConfig.InfluxDBOrganization,
Category: flags.MetricsCategory,
}

// SUAVE Flags
SuaveBoostRelayUrlFlag = &cli.StringFlag{
Name: "suave.eth.boost_relay_url",
EnvVars: []string{"SUAVE_BOOST_RELAY_URL"},
Usage: "API endpoint for the boost relay",
Category: flags.SuaveCategory,
}
SuaveBeaconRpcFlag = &cli.StringFlag{
Name: "suave.eth.beacon_rpc",
EnvVars: []string{"BEACON_RPC"},
Usage: "RPC endpoint for a beacon node",
Category: flags.SuaveCategory,
}
)

var (
Expand Down Expand Up @@ -1785,6 +1799,15 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
cfg.EthDiscoveryURLs = SplitAndTrim(urls)
}
}

// SUAVE Related
if ctx.IsSet(SuaveBoostRelayUrlFlag.Name) {
cfg.BoostRelayUrl = ctx.String(SuaveBoostRelayUrlFlag.Name)
}
if ctx.IsSet(SuaveBeaconRpcFlag.Name) {
cfg.BeaconRpc = ctx.String(SuaveBeaconRpcFlag.Name)
}

// Override any default configs for hard coded networks.
switch {
case ctx.Bool(MainnetFlag.Name):
Expand Down
8 changes: 7 additions & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import (
"github.com/ethereum/go-ethereum/suave/backends"
suave_builder "github.com/ethereum/go-ethereum/suave/builder"
suave_builder_api "github.com/ethereum/go-ethereum/suave/builder/api"
beacon_sidecar "github.com/ethereum/go-ethereum/suave/builder/beacon_sidecar"
)

// Config contains the configuration options of the ETH protocol.
Expand Down Expand Up @@ -329,7 +330,12 @@ func (s *Ethereum) APIs() []rpc.API {
Service: backends.NewEthBackendServer(s.APIBackend),
})

sessionManager := suave_builder.NewSessionManager(s.blockchain, s.txPool, &suave_builder.Config{})
beaconSidecar := &beacon_sidecar.BeaconSidecar{}
if s.config.BeaconRpc != "" && s.config.BoostRelayUrl != "" {
beaconSidecar = beacon_sidecar.NewBeaconSidecar(s.config.BeaconRpc, s.config.BoostRelayUrl)
}

sessionManager := suave_builder.NewSessionManager(s.blockchain, s.txPool, &suave_builder.Config{}, beaconSidecar)

apis = append(apis, rpc.API{
Namespace: "suavex",
Expand Down
4 changes: 4 additions & 0 deletions eth/ethconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ type Config struct {

// OverrideVerkle (TODO: remove after the fork)
OverrideVerkle *uint64 `toml:",omitempty"`

// SUAVE Config
BoostRelayUrl string
BeaconRpc string
}

// CreateConsensusEngine creates a consensus engine for the given chain config.
Expand Down
24 changes: 18 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/Microsoft/go-winio v0.6.1
github.com/VictoriaMetrics/fastcache v1.12.1
github.com/attestantio/go-builder-client v0.4.3
github.com/attestantio/go-eth2-client v0.19.10
github.com/attestantio/go-eth2-client v0.21.10
github.com/aws/aws-sdk-go-v2 v1.21.2
github.com/aws/aws-sdk-go-v2/config v1.18.45
github.com/aws/aws-sdk-go-v2/credentials v1.13.43
Expand Down Expand Up @@ -69,10 +69,10 @@ require (
github.com/tyler-smith/go-bip39 v1.1.0
github.com/urfave/cli/v2 v2.25.7
go.uber.org/automaxprocs v1.5.2
golang.org/x/crypto v0.21.0
golang.org/x/crypto v0.23.0
golang.org/x/sync v0.5.0
golang.org/x/sys v0.18.0
golang.org/x/text v0.14.0
golang.org/x/sys v0.20.0
golang.org/x/text v0.15.0
golang.org/x/time v0.3.0
golang.org/x/tools v0.15.0
gopkg.in/natefinch/lumberjack.v2 v2.0.0
Expand Down Expand Up @@ -107,6 +107,8 @@ require (
github.com/dlclark/regexp2 v1.7.0 // indirect
github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect
github.com/goccy/go-json v0.10.2 // indirect
Expand All @@ -116,11 +118,12 @@ require (
github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.4 // indirect
github.com/huandu/go-clone v1.6.0 // indirect
github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kilic/bls12-381 v0.1.0 // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
Expand All @@ -131,24 +134,33 @@ require (
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/naoina/go-stringutil v0.1.0 // indirect
github.com/opentracing/opentracing-go v1.1.0 // indirect
github.com/pk910/dynamic-ssz v0.0.3 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.16.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/prysmaticlabs/go-bitfield v0.0.0-20210809151128-385d8c5e3fb7 // indirect
github.com/prysmaticlabs/go-bitfield v0.0.0-20240328144219-a1caa50c3a1e // indirect
github.com/r3labs/sse v0.0.0-20210224172625-26fe804710bc // indirect
github.com/r3labs/sse/v2 v2.10.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/rs/zerolog v1.32.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.opentelemetry.io/otel v1.16.0 // indirect
go.opentelemetry.io/otel/metric v1.16.0 // indirect
go.opentelemetry.io/otel/trace v1.16.0 // indirect
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/Knetic/govaluate.v3 v3.0.0 // indirect
gopkg.in/cenkalti/backoff.v1 v1.1.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)
Loading