From f06d1d034615e71534204c091ee639f27e2e9b5c Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Wed, 21 May 2025 00:14:02 +1000 Subject: [PATCH] Fix blob download from checkpointz servers (#7495) Closes: - https://github.com/sigp/lighthouse/issues/7489 Use `ForkName::latest_stable`, i.e. Electra when decoding blobs from a server that does not provide `version`. This is only a temporary workaround that should be reverted once `checkpointz` is fixed. Having a default fork is potentially incorrect, and glossing over bugs in servers in general is not ideal. However, even in the case where we update `ForkName::latest_stable` to `Fulu`, this should continue to work, as the blob limit is likely to increase and the `RuntimeVariableList` will just have a slightly higher limit than necessary (which is OK so long as the server isn't buggy enough to violate the correct lower bound: e.g. if the block is an Electra one and the server sends 10 blobs, which exceeds the Electra max (9) but not the Fulu max). --- common/eth2/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/eth2/src/lib.rs b/common/eth2/src/lib.rs index d7c25ecb82..fa3fa04783 100644 --- a/common/eth2/src/lib.rs +++ b/common/eth2/src/lib.rs @@ -307,6 +307,8 @@ impl BeaconNodeHttpClient { #[derive(serde::Deserialize)] struct Helper { + // TODO: remove this default once checkpointz follows the spec + #[serde(default = "ForkName::latest_stable")] version: ForkName, #[serde(flatten)] metadata: serde_json::Value,