Open elmattic opened 8 months ago
From the JSON-RPC 2.0 spec
A Notification is a Request object without an "id" member. A Request object that is a Notification signifies the Client's lack of interest in the corresponding Response object, and as such no Response object needs to be returned to the client. The Server MUST NOT reply to a Notification, including those that are within a batch request.
Thus, without the id field it's regarded a notification and jsonrpsee ignores it. So I don't agree but feel free to open an issue in jsonrpsee if you don't agree...
@niklasad1 Thanks for your insight! I'm unsure what to think now, so I will keep this issue on the back burner.
Issue summary
This is a follow-up of https://github.com/ChainSafe/forest/pull/3978.
For testing our
Filecoin.ChainNotify
code, we relied on some .js scripts (see link below) to open channels and cancel them. However, this script had to be modified when sending the cancel message payload by adding theid
field to the JSON payload:The modification is because
jsonrpsee
can't deserial the message if theid
field is missing. This hinders the correct cancelation of a channel in Forest. Theid
field is optional according to the spec. So, this is likely a bug in this crate.Task summary
jsonrpsee
crateAcceptance Criteria
id
field is missingOther information and links
https://github.com/filecoin-shipyard/js-lotus-client-provider-browser/blob/master/index.js#L163-L166