1 minor finding
Findings
[minor] · Malformed id-less JSON-RPC 2.0 objects lose their Invalid Request error
An authenticated client's malformed id-less JSON-RPC 2.0 singleton now receives an empty HTTP 204 response instead of an Invalid Request error with HTTP 200 and "id": null.
Location: src/httprpc.cpp:122 (head).
Details and suggested fix
For a singleton such as {"jsonrpc":"2.0","method":1}, parse() records an absent id and V2 before rejecting the method. IsNotification() checks only those two fields, so this catch treats the partially parsed object as a notification and drops its error. JSON-RPC 2.0 defines a notification as a Request object without an id; a malformed object instead requires an Invalid Request response with "id": null. Nothing executes, but the client loses the error report; over IPC, RpcImpl::executeRpc returns null instead of the error object. Existing batches also suppress these errors, but this introduces that behavior for singletons. Return the error from the V2 parse-failure path with HTTP 200 and pass jreq.id.value_or(UniValue{}) to JSONRPCReplyObj, since passing nullopt omits the id field. Keep suppression for successfully parsed notifications and update the new 204 assertion accordingly. No current production caller producing this malformed input was found: bitcoin-cli and AuthServiceProxy send ids, so production impact for third-party or raw HTTP/IPC clients remains unconfirmed.