cmdruid / regtest-workbench

A containerized stack of Bitcoin and Lightning, plus a full suite of development tools. Prototype and deploy your next project with lightning speed!
MIT License
15 stars 2 forks source link

is grpc-port=<port> supported? #20

Open lightningorb opened 2 years ago

lightningorb commented 2 years ago

Hi,

Still very noob so please ignore any mistake i make here. But it seems the way the GRPC API is now enabled is with either supplying --grpc-port= to lightningd, or adding grpc-port= to the config file.

This has been tried by modifying the config file, or hacking 03-lightning-setup.sh however things seem to break (no certs, and cl-rest seems to break).

Can this be supported? Also happy to flesh out some example projects [#10]. I've got the REST api to work with workbench, and the GRPC API to work on what is soon to be my main node. But not vice-versa.

lightningorb commented 2 years ago

It just occurred to me the cargo deps are required for this to work.

cmdruid commented 2 years ago

Honestly I haven't played around with gRPC for core lightning, and I haven't seen much documentation on it. Do you have any good resources?

lightningorb commented 2 years ago

Not really besides reading the contents of node_pb2.py and node_pb2_grpc.py (the generated .py from .proto files). also https://github.com/ElementsProject/lightning/blob/master/contrib/pyln-testing/pyln/testing/grpc.py

lightningorb commented 2 years ago

For the record, adding cargo to clightning.dockerfile was fine, however rustfmt needs debian bookworm, which had a missing pubkey error so docker refused to install packages.

I'm seeing that the GRPC API is quite behind, while the REST API especially due to the /rpc endpoint has no limitations. Might be a matter of waiting for the GRPC APi to mature some.