From 2262381e09abca5c51aef52a56947ac0652f6a72 Mon Sep 17 00:00:00 2001 From: Ryan Breuker Date: Sun, 19 Apr 2026 04:14:47 -0600 Subject: [PATCH 1/2] Fix #2288: Correct _signed_content arity in _handle_get_state --- node/rustchain_p2p_gossip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/rustchain_p2p_gossip.py b/node/rustchain_p2p_gossip.py index 268526f50..85589e4e7 100644 --- a/node/rustchain_p2p_gossip.py +++ b/node/rustchain_p2p_gossip.py @@ -883,7 +883,7 @@ def _handle_get_state(self, msg: GossipMessage) -> Dict: # Uses the Phase A signed-content shape (msg_type:sender_id:payload) # so verify_message() on the requester side accepts it. payload = {"state": state_data} - content = self._signed_content(MessageType.STATE.value, self.node_id, payload) + content = self._signed_content(MessageType.STATE.value, self.node_id, msg.msg_id, msg.ttl, payload) signature, timestamp = self._sign_message(content) return { "status": "ok", From 89a4023e921c665829bfb99be75571df360bde6b Mon Sep 17 00:00:00 2001 From: Ryan Breuker Date: Sun, 19 Apr 2026 04:56:23 -0600 Subject: [PATCH 2/2] docs: update stale comment to reflect 5-argument signature --- node/rustchain_p2p_gossip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/rustchain_p2p_gossip.py b/node/rustchain_p2p_gossip.py index 268526f50..831d80d16 100644 --- a/node/rustchain_p2p_gossip.py +++ b/node/rustchain_p2p_gossip.py @@ -880,7 +880,7 @@ def _handle_get_state(self, msg: GossipMessage) -> Dict: "balances": self.balance_crdt.to_dict() } # Sign the state response so the requester can verify authenticity. - # Uses the Phase A signed-content shape (msg_type:sender_id:payload) + # Uses the updated signature shape (msg_type:sender_id:msg_id:ttl:payload) per #2256 # so verify_message() on the requester side accepts it. payload = {"state": state_data} content = self._signed_content(MessageType.STATE.value, self.node_id, payload)