Skip to content

Commit

Permalink
Merge pull request #89 from bitromortac/2104-lnd-v0-12-1
Browse files Browse the repository at this point in the history
rpc+rebalance:Update lndmanage for LND v0.12.1 and make rebalancing compatible
  • Loading branch information
bitromortac committed May 1, 2021
2 parents ba2ff89 + 2c77dc3 commit 2a9b867
Show file tree
Hide file tree
Showing 18 changed files with 6,200 additions and 742 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,16 +339,17 @@ If you are running an older version of lnd checkout the according
[tag](https://github.com/bitromortac/lndmanage/releases).

### Requirements
Installation of lndmange requires `>=python3.6`, `lnd v0.11.0-beta`, `python3-venv`
Installation of lndmange requires `>=python3.6`, `lnd v0.12.1-beta`, `python3-venv`

#### Optional Requirements
Depending on if you want to install from source dependency packages you may
need `gcc`, `g++`, `python3-dev(el)`.

#### LND Requirements
#### LND Build Requirements
Some commands will only work correctly if lnd is built with the `routerrpc`.
This can be done when compiling with `make install tags="routerrpc"`. If you
use precompiled binaries, you can ignore this.
This can be done when compiling with minimal build tags of `make && make install
tags="routerrpc signrpc walletrpc"`. If you use precompiled binaries, you can
ignore this.

#### Admin Macaroon and TLS cert needed
If you run this tool from a different host than the lnd host,
Expand Down Expand Up @@ -462,9 +463,14 @@ $ git clone https://github.com/googleapis/googleapis.git
$ curl -o rpc.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/rpc.proto
$ curl -o router.proto -s https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/routerrpc/router.proto
$ curl -o signer.proto https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/signrpc/signer.proto
$ curl -o walletkit.proto https://raw.githubusercontent.com/lightningnetwork/lnd/master/lnrpc/walletrpc/walletkit.proto
$ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. rpc.proto
$ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. routerrpc.proto
$ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. router.proto
$ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. signer.proto
# adjust signer.proto location in walletkit.proto
$ python -m grpc_tools.protoc --proto_path=googleapis:. --python_out=. --grpc_python_out=. walletkit.proto
```
Then correct to absolute import paths, for instance change `import rpc_pb2 as rpc__pb2`
to `from lndmanage.grpc_compiled import rpc_pb2 as rpc__pb2`.
17 changes: 17 additions & 0 deletions lndmanage/grpc_compiled/router.proto
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ message SendPaymentRequest {
*/
int32 final_cltv_delta = 4;

// An optional payment addr to be included within the last hop of the route.
bytes payment_addr = 20;

/*
A bare-bones invoice for a payment within the Lightning Network. With the
details of the invoice, the sender has all the data necessary to send a
Expand Down Expand Up @@ -237,6 +240,14 @@ message SendPaymentRequest {
that show which htlcs are still in flight are suppressed.
*/
bool no_inflight_updates = 18;

/*
The largest payment split that should be attempted when making a payment if
splitting is necessary. Setting this value will effectively cause lnd to
split more aggressively, vs only when it thinks it needs to. Note that this
value is in milli-satoshis.
*/
uint64 max_shard_size_msat = 21;
}

message TrackPaymentRequest {
Expand Down Expand Up @@ -394,6 +405,9 @@ message BuildRouteRequest {
pubkey.
*/
repeated bytes hop_pubkeys = 4;

// An optional payment addr to be included within the last hop of the route.
bytes payment_addr = 5;
}

message BuildRouteResponse {
Expand Down Expand Up @@ -631,6 +645,9 @@ message ForwardHtlcInterceptRequest {

// Any custom records that were present in the payload.
map<uint64, bytes> custom_records = 8;

// The onion blob for the next hop
bytes onion_blob = 9;
}

/**
Expand Down
194 changes: 111 additions & 83 deletions lndmanage/grpc_compiled/router_pb2.py

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lndmanage/grpc_compiled/router_pb2_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from lndmanage.grpc_compiled import router_pb2 as router__pb2
from lndmanage.grpc_compiled import rpc_pb2 as rpc__pb2
import lndmanage.grpc_compiled.router_pb2 as router__pb2
import lndmanage.grpc_compiled.rpc_pb2 as rpc__pb2


class RouterStub(object):
Expand Down
Loading

0 comments on commit 2a9b867

Please sign in to comment.