You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discovered during the Phase F #2260 rebase (not introduced by it — this is a pre-existing latent bug).
Problem
node/rustchain_p2p_gossip.py::_handle_get_state calls self._signed_content() with 3 positional args (msg_type, node_id, payload), but the function signature has been 5 positional args (msg_type, sender_id, msg_id, ttl, payload) since PR #2274 (2026-04-17) extended signature coverage to msg_id and ttl for the #2272 hardening.
Calling the 5-arg function with 3 args raises TypeError: _signed_content() missing 2 required positional arguments: 'msg_id' and 'ttl' the moment any peer sends a GET_STATE message.
Why this hasn't been caught yet
No unit test exercises the full _handle_get_state path end-to-end.
Production nodes may be silently raising and swallowing this exception inside the message-handler dispatcher, with the state request appearing to time out on the requester.
Proposed fix (small)
Generate a synthetic msg_id and use a static ttl (e.g. 0 since STATE responses aren't re-forwarded) for the signature:
Then the response dict should also include msg_id and ttl so the requester's verify_message can reconstruct the signed content.
Bounty tier
Small (10-25 RTC) — straightforward 1-method fix + a regression test asserting _handle_get_state runs without raising and the response verifies under verify_message.
Discovered during the Phase F #2260 rebase (not introduced by it — this is a pre-existing latent bug).
Problem
node/rustchain_p2p_gossip.py::_handle_get_statecallsself._signed_content()with 3 positional args (msg_type,node_id,payload), but the function signature has been 5 positional args (msg_type,sender_id,msg_id,ttl,payload) since PR #2274 (2026-04-17) extended signature coverage tomsg_idandttlfor the #2272 hardening.vs
Calling the 5-arg function with 3 args raises
TypeError: _signed_content() missing 2 required positional arguments: 'msg_id' and 'ttl'the moment any peer sends aGET_STATEmessage.Why this hasn't been caught yet
_handle_get_statepath end-to-end.request_full_synchotfix from PR fix: bind STATE sync sender_id to responder's canonical node_id (Phase 2 regression) #2259, but that code handles the response side on the requester; the responder-side_handle_get_stateis the one with the buggy arity.Proposed fix (small)
Generate a synthetic
msg_idand use a staticttl(e.g. 0 since STATE responses aren't re-forwarded) for the signature:Then the response dict should also include
msg_idandttlso the requester'sverify_messagecan reconstruct the signed content.Bounty tier
Small (10-25 RTC) — straightforward 1-method fix + a regression test asserting
_handle_get_stateruns without raising and the response verifies underverify_message.Labels
bugp2psecurity-adjacent(affects attestation sync integrity)