From afa27a4f59bdb41a4d361a090d6dc60cf69a5e14 Mon Sep 17 00:00:00 2001 From: MariusVanDerWijden Date: Tue, 16 Jun 2026 10:49:22 +0200 Subject: [PATCH] advertise all forks --- eth/engineapi/capabilities.go | 2 +- eth/engineapi/router_test.go | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/eth/engineapi/capabilities.go b/eth/engineapi/capabilities.go index a426170dcc..ccd262a1cb 100644 --- a/eth/engineapi/capabilities.go +++ b/eth/engineapi/capabilities.go @@ -40,7 +40,7 @@ func (rt *Router) handleCapabilities(w http.ResponseWriter, r *http.Request) { return } resp := capabilitiesResponse{ - SupportedForks: []string{"amsterdam"}, + SupportedForks: []string{"paris", "shanghai", "cancun", "prague", "osaka", "amsterdam"}, ForkScopedEndpoints: []string{"payloads", "forkchoice", "bodies"}, IndependentlyVersioned: map[string][]string{ "blobs": {"v1", "v2", "v3", "v4"}, diff --git a/eth/engineapi/router_test.go b/eth/engineapi/router_test.go index 1012628401..7dd4c3189c 100644 --- a/eth/engineapi/router_test.go +++ b/eth/engineapi/router_test.go @@ -245,8 +245,16 @@ func TestRouterCapabilities(t *testing.T) { if err := json.NewDecoder(resp.Body).Decode(&c); err != nil { t.Fatal(err) } - if len(c.SupportedForks) == 0 || c.SupportedForks[0] != "amsterdam" { - t.Errorf("supported forks: %v", c.SupportedForks) + // Capabilities must advertise every fork the router routes, so a consensus + // client negotiates SSZ for all of them rather than falling back to JSON-RPC. + want := map[string]bool{"paris": true, "shanghai": true, "cancun": true, "prague": true, "osaka": true, "amsterdam": true} + if len(c.SupportedForks) != len(want) { + t.Errorf("supported forks: got %v, want all of %v", c.SupportedForks, want) + } + for _, f := range c.SupportedForks { + if !want[f] { + t.Errorf("unexpected fork advertised: %q", f) + } } if got := c.Limits["blobs.max_versioned_hashes"]; got != sszt.MaxBlobsRequest { t.Errorf("blobs limit: %d", got)