fix(testutil): serve decodable block and peer-count responses from the simnet mock - #589
Open
emlautarom1-agent[bot] wants to merge 2 commits into
Open
fix(testutil): serve decodable block and peer-count responses from the simnet mock#589emlautarom1-agent[bot] wants to merge 2 commits into
emlautarom1-agent[bot] wants to merge 2 commits into
Conversation
`GET /eth/v2/beacon/blocks/{block_id}` returned a `{version, data}`
envelope, so `get_block_v2` failed to decode and the inclusion checker
warned once per due slot. The beacon-API spec marks `execution_optimistic`
and `finalized` required and non-nullable, and every major client emits
both, so the generated client requires them too.
The readiness checker polls `GET /eth/v1/node/peer_count` once a minute. Unmounted, it warned on every poll and left `app_beacon_node_peers` at a flat zero, indistinguishable from a beacon node with no peers.
Comment on lines
+100
to
+103
| "connected": "80", | ||
| "connecting": "0", | ||
| "disconnected": "0", | ||
| "disconnecting": "0" |
Contributor
Author
There was a problem hiding this comment.
Differs from charon. Charon's beaconmock sets only Connected: 80 and lets Go zero-value the rest. Here all four fields are required Strings on the generated GetPeerCountResponseResponseData, so omitting any one fails the decode rather than defaulting — which would trade this bug for a different warning on the same poll.
emlautarom1
marked this pull request as ready for review
August 5, 2026 21:08
emlautarom1
approved these changes
Aug 5, 2026
emlautarom1
left a comment
Collaborator
There was a problem hiding this comment.
Checked manually and it fixes part of the issues we're seeing on the smoke tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #585
Summary
Two endpoints of the simnet beacon mock returned responses pluto's own generated client cannot consume, so both callers warned on every poll.
GET /eth/v2/beacon/blocks/{block_id}omittedexecution_optimisticandfinalized. The beacon-API spec marks both required and non-nullable, soGetBlockV2ResponseResponsedeclares them as plainbooland the response failed to decode. At the smoke suite's 1s slots the inclusion checker warned roughly once per second per node, which is what tripped theWarn Log Rategate.GET /eth/v1/node/peer_countwas not mounted at all. The readiness checker polls it every 60s, so each node warned once a minute andapp_beacon_node_peersstayed pinned at zero — indistinguishable from a beacon node with no peers.Charon does not hit either problem because its beaconmock is passed directly as an
eth2wrap.Clientinterface, so those calls never cross HTTP. Pluto's mock is HTTP-only, so every method a consumer reaches needs an explicit route.Each fix carries a test that drives the real generated client rather than asserting on the raw JSON body. Asserting the body is what let the first bug through: the existing test checked
versionanddataand passed throughout.all_plutopasses with no alerts detected, and neither warning appears in the log.Out of scope
pluto_dkgandmixed_2_charon_2_plutoare named in the issue's acceptance criteria but are not exercised here.Pluto sets a log topic almost nowhere, so its warnings land in
topic=""and are counted by a gate that excludes charon'svmock/trackerequivalents. That asymmetry is tracked separately in #588 and is not addressed by this PR.