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).
This commit is contained in:
Michael Sproul
2025-05-21 00:14:02 +10:00
committed by GitHub
parent 7e2df6b602
commit f06d1d0346

View File

@@ -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,