diff --git a/node/rustchain_p2p_gossip.py b/node/rustchain_p2p_gossip.py index 268526f50..e36ff340c 100644 --- a/node/rustchain_p2p_gossip.py +++ b/node/rustchain_p2p_gossip.py @@ -880,10 +880,10 @@ 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) + 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",