Commit Graph

97 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
d70f03435b
cmd/lncli: implement parsing+dispatching for the new describegraph call 2016-12-27 16:44:55 -08:00
BitfuryLightning
eb4d0e035e channeldb: save outgoing payments
Add structure for outgoing payments. Saving payment in DB
after successful payment send. Add RPC call for listing
all payments.
2016-12-27 16:16:23 -08:00
BitfuryLightning
327768f4ad routing: Move tools inside lnd. Refactor and delete unneeded stuff
Use [33]byte for graph vertex representation.
Delete unneeded stuff:
1. DeepEqual for graph comparison
2. EdgePath
3. 2-thread BFS
4. Table transfer messages and neighborhood radius
5. Beacons

Refactor:
1. Change ID to Vertex
2. Test use table driven approach
3. Add comments
4. Make graph internal representation private
5. Use wire.OutPoint as  EdgeId
6. Decouple routing messages from routing implementation
7. Delete Async methods
8. Delete unneeded channels and priority buffer from manager
9. Delete unneeded interfaces in internal graph realisation
10. Renamed ID to Vertex
2016-11-23 20:37:43 -06:00
Olaoluwa Osuntokun
6d39b4be95
cmd/lncli: convert instances of lightning_id to compressed pubkey 2016-10-27 19:42:53 -07:00
Olaoluwa Osuntokun
301a9fea38
cmd/lncli: implementing parsing+display for list channels 2016-09-25 20:05:06 -07:00
Olaoluwa Osuntokun
d34b90136f
cmd/lncli: the target destination for sendpayment must now be a compressed pubkey
This commit modifies the sendpayment message slightly to indicate that
the —dest value should be a hex-encoded compressed public key. This
change is required to stream line the integration of onion routing into
the daemon.
2016-09-21 19:48:53 -07:00
Olaoluwa Osuntokun
89310c8778
cmd/lncli: add new --debug_send option to sendpayment
This commit adds a new option to the send payment command. The new
option toggles usage of the debug HTLC R-Hash when sending the
described payment. This flag should be used in conjunction with lnd
nodes that have been started with the `—debughtlc` flag in order to
allow sending payments without first registering invoices.
2016-09-21 19:48:49 -07:00
Olaoluwa Osuntokun
9bd5105ae5
cmd/lncli: avoid unnecessarily re-encoding graph vertexes in routing table 2016-09-21 19:48:42 -07:00
Olaoluwa Osuntokun
ca89ddb9ea
cmd/lncli: implement handling of new invoice RPC commands 2016-09-21 19:48:32 -07:00
andrew.shvv
2788dbeaa8 Add RPC to show current total available channel capacity #29 (#35)
This commit adds a new RPC command: `channelbalance` which returns the
sum of all available channel capacity across all open channels. The
total balance is currently returned in units of `satoshis`. Additionally
the `networkHarness` has been modified slightly to allow specifying the
additional "extra" command line parameters when creating the initial
seed nodes. Minor refactoring within the integration tests has been
undertaken in order to increase code re-use across tests.

Closes #29.
2016-09-15 12:00:56 -07:00
Olaoluwa Osuntokun
c604730b7d
cmd/lncli: accept --lighting_id parameter for openchannel 2016-09-13 15:36:36 -07:00
Olaoluwa Osuntokun
1a357755d7
cmd/lncli: observe the --force parameter in the closechannel command 2016-09-12 19:07:31 -07:00
BitfuryLightning
2bcff188e8 lncli: Add graphical output of routing table
LIGHT-131, LIGHT-140, LIGHT-138
`lncli showroutingtable` may output routing table as image.
Use graphviz for graph rendering.
Add explicit version dependency for tools. Add error checking.
2016-09-06 20:06:51 -04:00
BitfuryLightning
b5f07ede46 lncli: Make output of lncli sane and readable
LIGHT-133, LIGHT-138 Make output of `lncli showrouting table` in
two different formats: table and json.
Instead of sending serialized routing table send list of channels.
2016-09-06 20:01:21 -04:00
Olaoluwa Osuntokun
9eb2a4219f
lncli: update response handling for open/close channel
This commit updates the response handling of the steaming RPC’s to
account for the fact that multiple messages from the server (state
updates) can now be sent over the stream instead of a single final
update.

Currently, all updates other than the “final” update are ignored by the
cli.
2016-08-30 16:54:59 -07:00
BitfuryLightning
f8c851769f multi: initial integration of routing module
This commit integrates BitFury's current routing functionality into lnd. The
primary ochestration point for the routing sub-system in the routingMgr. The
routingMgr manages all persistent and volatile state related to routing within
the network.

Newly opened channels, either when the initiator or responder are inserted into
the routing table once the channel is fully open. Once new links are inserted
the routingMgr can then perform path selection in order to locate an "optimal"
path to a target destination.
2016-08-11 11:20:27 -07:00
Olaoluwa Osuntokun
7c1ec62e44
cmd/lncli: switch to urfave/cli instead of codegangsta/cli
The original project has been migrated to a new user. Currently git
redirects are served from the old repository to the newness. However
since development has witched to this new repository we update our
imports for clarity.
2016-07-26 10:42:50 -07:00
Olaoluwa Osuntokun
c8e58147b6
add glide dependency management for fully reproducible builds
This commit adds glide integration in order to make lnd builds fully
reproducible. Rather than using “go get” users should now manually pull down
the repo, use glide to fetch+install the dependancies, then manually install
all related binaries.

With this change we no longer have to chase dependancies making breaking API
changes under us. We can manually update the managed dependancies once a new
stable release of a defendant package is released.

Additionally, reproducible builds are a strong requirement in order to securely
distribute future major releases of lnd.
2016-07-22 18:53:35 -07:00
Olaoluwa Osuntokun
65435bd8e6
cmd/lncli: close sendpayment stream after recv
We now close the send payment stream after receiving a response.
Otherwise if the RPC server is asynchronously handling requests then,
closing the stream would result in the server returning an EOF error,
terminating the request.
2016-07-21 16:18:56 -07:00
Olaoluwa Osuntokun
14aadc8c2e
cmd/lncli: add validation of address for connectpeer 2016-07-16 17:43:47 -07:00
Olaoluwa Osuntokun
2926988710
cmd/lncli: implement one-off HTLC payments 2016-07-12 17:47:30 -07:00
Olaoluwa Osuntokun
40d9f0da31
cmd/lncli: implement pendingchannels for the cli client 2016-07-07 15:36:42 -07:00
Olaoluwa Osuntokun
a4e92fac8e
cmd/lncli: implement async+sync calls to [open|close]channel 2016-07-07 15:35:10 -07:00
Olaoluwa Osuntokun
4d7bd2eb5d
cmd/lncli: implement cli "getting" call 2016-07-05 18:58:49 -07:00
Olaoluwa Osuntokun
6ef6506c3d
cmd/lnshell: remove the now obsolete lnshell 2016-07-05 18:55:58 -07:00
Olaoluwa Osuntokun
96667cbc4a
cmd/lncli: update action func to new upstream signature
The upstream cli repo has changed the signature for the ‘Action’ to
return an additional error. Thankfully this was done in a backwards
compatible manner.

This commit updates all the command action functions to adhere to the
new function signature.

In the future we’ll have proper dependency management so cases like
this will be avoided all together.
2016-06-29 13:01:40 -07:00
Olaoluwa Osuntokun
e391cf088e
cmd/lncli: add support for the sendcoins RPC 2016-06-29 11:29:29 -07:00
Olaoluwa Osuntokun
6b53b393df
cmd/lncli: add json attribute tag for anonymous ChannelPoint struct 2016-06-22 21:48:39 -07:00
Olaoluwa Osuntokun
7e09a70706
cmd/lncli: properly reverse user txid input
This commit fixes a bug introduced within a prior commit. The prior
commit failed to drollery reverse the txid string taken in as user
input, therefore in order to properly close a channel, the user needed
to manually reverse the txid themselves.

With this change, `wire.NewShaHashFromStr` is used which properly
reverses the string within the constructor. This allows the string
reported not be directly used to the close an active channel.

This commit also corrects a few logging messages.
2016-06-22 11:10:33 -07:00
Olaoluwa Osuntokun
8066195d23
cmd/lncli: implement remaining RPC commands
Currently positional arguments *are not* supported, and all arguments
must be passed via unix-style command line arguments.

In a later commit support for concurrent positional, and manually
specified arguments will be added.
2016-06-21 13:14:19 -07:00
Olaoluwa Osuntokun
35bbf53e59 cmd/lncli: command line parsing for address types for 'newaddress' 2016-04-24 20:27:19 -07:00
Olaoluwa Osuntokun
78c6053ba6 cmd/lncli: default RPC port is now 10009 2016-03-22 18:47:10 -07:00
Tadge Dryja
624e776987 add shell spv testing mode
To try uspv, do ./lnd -spv
The remote node is hardcoded in shell.go.  If you aren't
running a full node on localhost, specify where to connect to.
Nearby nodes will be much faster but random testnet nodes on the
internet should also work.
2016-02-02 23:37:29 -08:00
Paul Capestany
5bddb611dc Fix build issue for lncli
Error message:

cmd/lncli/commands.go:27: undefined: shell
2016-01-17 19:18:08 -08:00
Olaoluwa Osuntokun
32d4e3a3b6 lnshell: comment out lnchat, it's in limbo before we add the message to unwire 2016-01-16 19:29:04 -08:00
Olaoluwa Osuntokun
4b696f1690 lncli: remove shell.go, lnshell is a separate package now 2016-01-16 19:29:03 -08:00
Olaoluwa Osuntokun
701de388a0 lncli: add "connect" command
usage: lncli connect <lnid>@host:port

Currently one must specify port since we haven’t yet chosen an
“official” p2p port
2016-01-16 19:29:03 -08:00
Tadge Dryja
2815afebb7 update imports to github 2016-01-16 10:45:54 -08:00
Tadge Dryja
58f0bfe252 plasma daemon can connect, receive connections, and send chat msgs. 2016-01-14 23:56:10 -08:00
Olaoluwa Osuntokun
20e367c4e7 lncli: note to self about future auth 2016-01-14 23:56:08 -08:00
Tadge Dryja
e70c6aa367 trying to store private identity key. Doesn't work. 2016-01-14 23:56:08 -08:00
Tadge Dryja
8bd8293c8c can send messages from shell over grpc. doesn't do anything yet. 2016-01-14 23:56:07 -08:00
Tadge Dryja
8a50faaf47 add functions to rpc.proto, start lnshell 2016-01-14 23:55:45 -08:00
Tadge Dryja
6647bdd2b8 trying to get shell to connect over grpc 2016-01-14 23:55:45 -08:00
Tadge Dryja
31f3df2183 add gitignore, cli shell 2015-12-30 16:19:09 -04:00
Olaoluwa Osuntokun
d3da6e8f42 cmd/lncli: properly pretty print json response 2015-12-29 20:58:58 -06:00
Olaoluwa Osuntokun
f2d3c2455b cmd/lncli: add new package, implements cli for plasma 2015-12-29 20:35:49 -06:00