From 96761a7942f17aab429ffa5af47e91fcad268e80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caner=20=C3=87=C4=B1dam?= Date: Fri, 8 May 2026 03:04:36 +0200 Subject: [PATCH] support testing of get header delay in mev-boost-relay --- go.mod | 4 ++-- go.sum | 8 ++++---- main.go | 5 +++-- playground/artifacts.go | 9 +++++++++ playground/components.go | 7 +++++-- playground/manifest.go | 3 +++ 6 files changed, 26 insertions(+), 10 deletions(-) diff --git a/go.mod b/go.mod index d451036a..fe5eef0c 100644 --- a/go.mod +++ b/go.mod @@ -11,9 +11,9 @@ require ( github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/ethereum/go-ethereum v1.16.8 github.com/fatih/color v1.18.0 - github.com/flashbots/go-boost-utils v1.9.1-0.20250819134059-e5294cb450c9 + github.com/flashbots/go-boost-utils v1.10.0 github.com/flashbots/go-template v1.0.0 - github.com/flashbots/mev-boost-relay v0.32.0-rc2 + github.com/flashbots/mev-boost-relay v0.33.3-0.20260508001820-67812b1b8ff9 github.com/go-chi/httplog/v2 v2.1.1 github.com/goccy/go-yaml v1.17.1 github.com/hashicorp/go-uuid v1.0.3 diff --git a/go.sum b/go.sum index 9ca28c49..0a29336c 100644 --- a/go.sum +++ b/go.sum @@ -138,14 +138,14 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/ferranbt/fastssz v0.0.0-20210120143747-11b9eff30ea9/go.mod h1:DyEu2iuLBnb/T51BlsiO3yLYdJC6UbGMrIkqK1KmQxM= github.com/ferranbt/fastssz v0.1.4 h1:OCDB+dYDEQDvAgtAGnTSidK1Pe2tW3nFV40XyMkTeDY= github.com/ferranbt/fastssz v0.1.4/go.mod h1:Ea3+oeoRGGLGm5shYAeDgu6PGUlcvQhE2fILyD9+tGg= -github.com/flashbots/go-boost-utils v1.9.1-0.20250819134059-e5294cb450c9 h1:uXedHkX9U9q6tej9VMlNhwGkcGpSK9x+kxBI5xo8Biw= -github.com/flashbots/go-boost-utils v1.9.1-0.20250819134059-e5294cb450c9/go.mod h1:52faeojMg+vjCtjuekWpRzvYU8nlD1ZEPRvRJ2q3bv0= +github.com/flashbots/go-boost-utils v1.10.0 h1:AGihhYtOjGF/efaBoQefYfmqzKsba6Y7SlfEK2iEPGY= +github.com/flashbots/go-boost-utils v1.10.0/go.mod h1:vCtklzlENAGLqDrf6JteivgANjzXFqVSQQ3LtoQxyV8= github.com/flashbots/go-template v1.0.0 h1:ODeaR/kLOQcWaA8tKgTrdZD1BvxXJY53eVLbFfnmxiQ= github.com/flashbots/go-template v1.0.0/go.mod h1:fBFD7uLaDZ0bEyNKNMx+ByJBg/B2oJKWeU2G7kZtrcY= github.com/flashbots/go-utils v0.11.0 h1:MuI9OOl40MukSL2ucKKQG1sxxl5Cqjla41TRubGNu0w= github.com/flashbots/go-utils v0.11.0/go.mod h1:i4xxEB6sHDFfNWEIfh+rP6nx3LxynEn8AOZa05EYgwA= -github.com/flashbots/mev-boost-relay v0.32.0-rc2 h1:0//XfKzBmSnmvXI4iLiTbw0WxElo8Nc6mp7DWPPSsxU= -github.com/flashbots/mev-boost-relay v0.32.0-rc2/go.mod h1:RanbrbbSlEDEclfVuhK6S6uXqwvc+ynvBeIvOlTek3w= +github.com/flashbots/mev-boost-relay v0.33.3-0.20260508001820-67812b1b8ff9 h1:GP2HjWRlXnoy8FpqE62X34hon1VQDgt8ZKDKe67Iajc= +github.com/flashbots/mev-boost-relay v0.33.3-0.20260508001820-67812b1b8ff9/go.mod h1:PfuOEMk5vrnt8uVcpg45RNYZUYRYxUpBoKA9k5zfGqM= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= diff --git a/main.go b/main.go index 54fa093a..096a687a 100644 --- a/main.go +++ b/main.go @@ -792,8 +792,9 @@ func runIt(recipe playground.Recipe) error { } exCtx := &playground.ExContext{ - Output: out, - LogLevel: logLevel, + Output: out, + LogLevel: logLevel, + GenesisTime: builder.GenesisTime(), // if contender.tps is set, assume contender is enabled Contender: &playground.ContenderContext{ Enabled: contenderEnabled, diff --git a/playground/artifacts.go b/playground/artifacts.go index 8850b7b6..40dd339a 100644 --- a/playground/artifacts.go +++ b/playground/artifacts.go @@ -125,6 +125,14 @@ type ArtifactsBuilder struct { // Extra files to copy to artifacts (artifactName -> sourcePath) extraFiles map[string]string predeploysFile string + + // genesisTime is set by Build and exposed via GenesisTime. + genesisTime time.Time +} + +// GenesisTime returns the L1 genesis time set during Build. +func (b *ArtifactsBuilder) GenesisTime() time.Time { + return b.genesisTime } func NewArtifactsBuilder() *ArtifactsBuilder { @@ -249,6 +257,7 @@ func (b *ArtifactsBuilder) Build(out *output) error { } genesisTime := time.Now().Add(time.Duration(b.genesisDelay) * time.Second) + b.genesisTime = genesisTime config := params.BeaconConfig() config.ElectraForkEpoch = 0 diff --git a/playground/components.go b/playground/components.go index 4205a875..1981aa4f 100644 --- a/playground/components.go +++ b/playground/components.go @@ -15,7 +15,7 @@ import ( var ( defaultJWTToken = "04592280e1778419b7aa954d43871cb2cfb2ebda754fb735e8adeb293a88f9bf" - latestPlaygroundUtilsTag = "07ec800c3651b05ef1946c38b8d04745946818c7" + latestPlaygroundUtilsTag = "latest" ) type RollupBoost struct { @@ -643,6 +643,8 @@ func (m *MevBoostRelay) Apply(ctx *ExContext) *Component { WithImage("docker.io/flashbots/playground-utils"). WithTag(latestPlaygroundUtilsTag). WithEnv("ALLOW_SYNCING_BEACON_NODE", "1"). + WithEnv("GETHEADER_RESPONSE_DELAY_TARGET_MS", "800"). + WithEnv("GETHEADER_DELAY_USERAGENTS", "mev-boost,Lighthouse"). WithEntrypoint("mev-boost-relay"). DependsOnHealthy(m.BeaconClient). WithArgs( @@ -757,7 +759,8 @@ func (m *MevBoost) Apply(ctx *ExContext) *Component { WithImage("flashbots/mev-boost"). WithTag("latest"). WithArgs(args...). - WithEnv("GENESIS_FORK_VERSION", "0x20000089") + WithEnv("GENESIS_FORK_VERSION", "0x20000089"). + WithEnv("GENESIS_TIMESTAMP", strconv.FormatInt(ctx.GenesisTime.Unix(), 10)) return component } diff --git a/playground/manifest.go b/playground/manifest.go index f0732f57..d201962f 100644 --- a/playground/manifest.go +++ b/playground/manifest.go @@ -220,6 +220,9 @@ type ExContext struct { Bootnode *BootnodeRef Contender *ContenderContext + + // GenesisTime is the L1 genesis time produced during artifact generation. + GenesisTime time.Time } type BootnodeRef struct {