Skip to content

Conversation

michaelsproul
Copy link
Member

Issue Addressed

The eth2 client for blocks/v3 was incorrectly using hex decoding (my bad). This doesn't have any impact on most Lighthouse users, as our VC doesn't care about this value, and the actual value in the response is correct, so other VCs are able to parse it.

This is relevant for projects that import Lighthouse's HTTP client, like blockdreamer.

Proposed Changes

  • Use explicit decimal decoding.
  • Add tests that assert metadata consistency between headers & JSON response. Checking the block value is non-zero ensures we aren't just checked Uint256::from_hex("0") == Uint256::from_dec("0").

@michaelsproul michaelsproul added bug Something isn't working ready-for-review The code is ready for review low-hanging-fruit Easy to resolve, get it before someone else does! HTTP-API v5.1.0 Q2 2024 labels Mar 7, 2024
Copy link
Member

@macladson macladson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@michaelsproul
Copy link
Member Author

Thanks Mac!

@michaelsproul
Copy link
Member Author

@Mergifyio queue

Copy link

mergify bot commented Mar 7, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at bf118a1

@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Mar 7, 2024
@mergify mergify bot merged commit bf118a1 into sigp:unstable Mar 7, 2024
@michaelsproul michaelsproul deleted the fix-block-v3-client branch March 7, 2024 03:32
@michaelsproul
Copy link
Member Author

Wow! Quick mergify! I guess it realised that the tests had already run against the latest version of unstable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HTTP-API low-hanging-fruit Easy to resolve, get it before someone else does! ready-for-merge This PR is ready to merge. v5.1.0 Q2 2024
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants