Skip to content

fix: _handle_get_state calls _signed_content with wrong arity (#2288)#2573

Merged
Scottcjn merged 1 commit intoScottcjn:mainfrom
MichaelSovereign:fix/handle-get-state-arity
Apr 20, 2026
Merged

fix: _handle_get_state calls _signed_content with wrong arity (#2288)#2573
Scottcjn merged 1 commit intoScottcjn:mainfrom
MichaelSovereign:fix/handle-get-state-arity

Conversation

@MichaelSovereign
Copy link
Copy Markdown
Contributor

Fixes TypeError missing 'msg_id' and 'ttl' when handling GET_STATE requests. Generates a synthetic msg_id and uses static ttl=0 for state responses. Closes #2288.

@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related size/S PR: 11-50 lines labels Apr 20, 2026
@Scottcjn
Copy link
Copy Markdown
Owner

Diff is clean — 1 file, +15/-15, surgical fix, covers both the _handle_get_state response side and the request_full_sync consumer side (good catch on the latter, that's the full #2154 & #2288 combined hardening). CI shows 11 SUCCESS + 1 FAILURE (the pre-existing Beacon flake trio, unrelated).

One remaining acceptance criterion before merge: #2288 item 3 — a regression test under node/tests/ that exercises STATE request → response → verify round-trip.

Minimal shape:

# node/tests/test_handle_get_state_arity.py
def test_handle_get_state_does_not_raise():
    layer = _make_layer(...)
    response = layer._handle_get_state(msg=...)
    # Criterion 1: no TypeError
    assert response["status"] == "ok"
    # Criterion 2: msg_id + ttl present so verify_message can reconstruct signed content
    assert "msg_id" in response
    assert response["ttl"] == 0
    # Round-trip: feed response back into verify_message and confirm signature checks
    verifier = _make_layer(...)
    # ... build GossipMessage from response, call verify_message, assert True

Once you push that test to this branch, I'll merge + process the 25 RTC to your wallet RTC7b43cfb6acd1182809d9427e46bc080ca47a3f2e. First-claim priority is still yours through 2026-04-21 EOD.

If adding the test slips past Apr 21, we can split the bounty: 20 RTC on merge of the fix-only PR, 5 RTC micro-bounty on a follow-up test PR (to anyone).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related size/S PR: 11-50 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOUNTY: 25 RTC] _handle_get_state calls _signed_content with wrong arity (TypeError when STATE requested)

2 participants