Expand description
§RPC response packet encode / decode
The outbound-server and inbound-client halves of a response, symmetric to
crate::protocol::rpc::rpc_request:
RpcResponsePacketTx— server side.encodesigns the request’spow_content_hashwith the server’s private key and embeds the signature in the header. The signature binds the response to this specific request and this specific server identity, so clients can reject replays across servers or across requests. Payload is optionally compressed.RpcResponsePacketRx— client side. Parses the server-identity fields (verification key, PQ commitment, sponsor id, PoW timestamp, PoW hash, salt) from the header, re-derives the server id PoW to check it is sufficient, and verifies the signature against the request’s content hash — all statelessly, so no peer database is required to validate the response of a freshly-discovered server.
Structs§
- RpcResponse
Packet Rx - The client-side view of an inbound RPC response, after header parsing, PoW checks, and signature verification.
- RpcResponse
Packet Tx - The encoder for an outbound RPC response.
- RpcResponse
Packet TxFlags