lightning icon indicating copy to clipboard operation
lightning copied to clipboard

Notifications over GRPC

Open ErikDeSmedt opened this issue 1 year ago • 1 comments

This PR implements notifications over the grpc-interface.

The first commit introduces the json-schema's that are used to serialize notifications.

I've introduced notifications to msggen. This PR also introduces code that allows msggen to generate

  • structs that can deserialize JSON-notifications
  • the .proto-file that defines the grpc-interface
  • methods to convert notifications from JSON to protobuf
  • a function grpc-server

I've updated the grpc-plugin to ensure it can support notifications.

ErikDeSmedt avatar Feb 16 '24 14:02 ErikDeSmedt

I've marked this PR as ready for review.

I am explicitly looking for review on the choose better when subfield is optional commit.

The proposed change also change generated code for schema's introduced before v24.05. To my understanding this is safe for protobuf as the optional-keyword will not affect the wire-format. For the cln_rpc-structs library users will have to update their code. However, the updated code will still work with older versions of Core Lightning.

ErikDeSmedt avatar Feb 21 '24 10:02 ErikDeSmedt

This still had a couple failing tests, but the logs have now expired. Do you want help getting this PR through CI @ErikDeSmedt?

endothermicdev avatar May 08 '24 20:05 endothermicdev

@endothermicdev : I've rebased it on top of master and the tests are mostly successful again. I assume the current failure is a flake.

Let me know if have any question or need help to merge this request

ErikDeSmedt avatar May 15 '24 07:05 ErikDeSmedt

Rebased on top of #7274 for immediate inclusion.

cdecker avatar May 15 '24 15:05 cdecker