attestantio/go-eth2-client

Unable to parse blocks without version headers

Closed this issue · 4 comments

The new block version parsing code assumes the existence of the Eth-Consensus-Version, which according to the spec is required. However, not all providers send this back (e.g. QuickNode). It would be nice to fall back to the previous behaviour of the partial unmarshalling to find the version if the header doesn't exist.

mcdee commented

I would consider this a bug with the providers, in that case. Is it possible to raise this as an issue with them?

Note that this code has not yet been tagged, and won't be until all of the main consensus clients support it (currently waiting on a release of prysm) so there is some time for them to address this.

Hey @mcdee, totally agree that it's a problem on their side, but it might be nice from a user perspective to consider falling back to an admittedly slower but also equally correct implementation. I will also raise the issue with anyone where I see it missing, though as it's totally opaque it's hard to tell if its the client or the provider stripping headers.

I do think that the code is tagged though! I noticed the issue when we upgraded to 0.18.0 https://github.com/attestantio/go-eth2-client/blob/v0.18.0/http/http.go#L272

mcdee commented

I'd really rather not have workarounds for implementation bugs, they tend to hang around in the code long after they are required.

The 0.18 tag wasn't meant to include the SSZ changes, sorry about that. Feel free to use 0.17 until they address this issue.

mcdee commented

This issue has shown up in other situations so will address it.