Commit Graph

5967 Commits

Author SHA1 Message Date
Joost Jager
067817f6d2
sweep: move tx generation to separate file 2018-12-18 10:50:13 +01:00
Joost Jager
e43e89514f
sweep+utxonursery+cnct+breacharbiter: add height hint to input
This commit is a preparation for the implementation of remote spend
detection. Remote spends may happen before we broadcast our own sweep
tx. This calls for accurate height hints.
2018-12-18 10:50:11 +01:00
Joost Jager
26cfc505ee
sweep: refactor weight estimation 2018-12-18 10:50:10 +01:00
Olaoluwa Osuntokun
3fd03b2f4a
lnwallet: add a String() method to WitnessType 2018-12-18 10:50:08 +01:00
Joost Jager
3b1357c3ab
build: apply rpctest tag in itest
We need to distinguish an lnd build for the purpose of integration
testing from a regular dev build. This makes it possible to adapt
parameters to let integration tests run faster (for example:
sweeper batch window).
2018-12-18 10:50:07 +01:00
Joost Jager
91f3df07e4
lnwallet: prevent static fee estimator fees from being modified
Modifying the static fees is not thread safe. In this commit the fees
are made immutable.
2018-12-18 10:50:05 +01:00
Joost Jager
423dd8ab9b
lnwallet: expose relay fee on fee estimators 2018-12-18 10:50:04 +01:00
Olaoluwa Osuntokun
febe6cd47f
Merge pull request #2131 from wpaulino/force-close-same-channel
contractcourt/chain_arbitrator: prevent force closing same channel twice
2018-12-17 21:23:57 -08:00
Olaoluwa Osuntokun
a9cba330e8
Merge pull request #2222 from ErikEk/invoice_show_private
Invoices with --private marked as such on LookupInvoice
2018-12-17 20:23:13 -08:00
Olaoluwa Osuntokun
e028355d88
Merge pull request #2191 from xsb/release-subset
release: update release script to allow user to specify systems
2018-12-17 20:20:23 -08:00
Sev
bd8046ca5c lnrpc: add FeeMsat to ForwardingEvent 2018-12-17 20:13:02 -08:00
Olaoluwa Osuntokun
11c24d3e0f
Merge pull request #1745 from halseth/channeldb-avoid-create-buckets
channeldb: avoid creating empty buckets
2018-12-17 20:01:29 -08:00
Olaoluwa Osuntokun
3439836cd5
github: add PR contribution checklist 2018-12-17 19:43:50 -08:00
Olaoluwa Osuntokun
152fc8b1f1
Merge pull request #2329 from Roasbeef/global-sig-pool
multi: replace per channel sigPool with global daemon level sigPool
2018-12-17 16:33:56 -08:00
Olaoluwa Osuntokun
bc4c5560cf
Merge pull request #2335 from wpaulino/fail-final-expiry-too-soon
htlcswitch/link: return FinalFailExpiryTooSoon for last htlc
2018-12-17 16:32:01 -08:00
Wilmer Paulino
e71151f56a htlcswitch/link: return FinalFailExpiryTooSoon for last htlc
In this commit, we fix a minor discrepancy with the spec. We should
return a FinalFailExpiryTooSoon error, rather than a
FinalFailIncorrectCltvExpiry error, when the last HTLC of a route (exit
hop) has an expiration height that is deemed too soon by the final
destination of the HTLC.
2018-12-17 15:26:11 -05:00
Olaoluwa Osuntokun
fa160f559c
multi: replace per channel sigPool with global daemon level sigPool
In this commit, we remove the per channel `sigPool` within the
`lnwallet.LightningChannel` struct. With this change, we ensure that as
the number of channels grows, the number of gouroutines idling in the
sigPool stays constant. It's the case that currently on the daemon, most
channels are likely inactive, with only a hand full actually
consistently carrying out channel updates. As a result, this change
should reduce the amount of idle CPU usage, as we have less active
goroutines in select loops.

In order to make this change, the `SigPool` itself has been publicly
exported such that outside callers can make a `SigPool` and pass it into
newly created channels. Since the sig pool now lives outside the
channel, we were also able to do away with the Stop() method on the
channel all together.

Finally, the server is the sub-system that is currently responsible for
managing the `SigPool` within lnd.
2018-12-16 15:40:14 -08:00
Olaoluwa Osuntokun
0fafd5e2fd
Merge pull request #2039 from halseth/autopilot-rpcserver
Add Autopilot sub-RPC server
2018-12-13 17:33:39 -08:00
Olaoluwa Osuntokun
aefce5fd34
Merge pull request #2225 from halseth/itest-context-timeout
lnd_test: use context with timeout when instead of context.Background
2018-12-13 16:35:16 -08:00
Olaoluwa Osuntokun
7b04b90f9b
Merge pull request #2324 from Roasbeef/better-install-guidelines
docs: revamp INSTALL.md
2018-12-13 16:32:46 -08:00
Olaoluwa Osuntokun
c355acb59d
docs: revamp INSTALL.md
In this commit, we aim to revamp the `INSTALL.md` file in order to make
it easier to parse, and more explicit. We've added a table of contents
to allow users to skip down to relevant sections and obtain a snapshot
of the contents of the document. Additionally, we've now modified the
headings to express a more clear delineation of the various sections.
2018-12-13 13:54:23 -08:00
Federico Bond
cfe8c88d89 Remove unused LightningWallet.rootKey field 2018-12-13 11:40:29 -03:00
Johan T. Halseth
80ac8c1df0
lncli: add lncli autopilot commands
This commit adds commands 'status', 'enable' and 'disable' for
autopilot.

The commands will only be enabled for autopilotrpc builds of lncli.
2018-12-13 13:02:40 +01:00
Johan T. Halseth
fdf903b8a9
gitignore: only match binaries in current folder, remove main* 2018-12-13 12:33:45 +01:00
Johan T. Halseth
8754635de5
rpcsercer+subservercfg: populate autopilot RPC config 2018-12-13 12:33:45 +01:00
Johan T. Halseth
28a92185cc
lnrpc: add autopilotrpc driver 2018-12-13 12:33:44 +01:00
Johan T. Halseth
568c32d1fa
lnrpc/autopilotrpc: add lnrpc autopilot server 2018-12-13 12:33:44 +01:00
Johan T. Halseth
00376230ff
lnrpc+log: add autopilot rpc logger 2018-12-13 12:33:44 +01:00
Johan T. Halseth
413aad5efa
lnrpc+subserver_cfg: add configs for autopilot sub-server 2018-12-13 12:33:44 +01:00
Johan T. Halseth
db4bbe1c3a
lnrpc: add autopilotrpc subservice
This commit adds a new service lnrpc/autopilot, that is to be used to
communicate with the running autopilot. Currently a RPC for getting the
status of the agent is included, as well as enabling/disabling at
runtime.
2018-12-13 12:33:38 +01:00
Johan T. Halseth
cff42e06c8
pilot+lnd: let autopilot.Manager manage pilot-agent
This commit moves the responsibility of managing the life cycle of the
autopilot from main to the autopilot Manager. It utilizes the recently
introduced autopilot Manager, and just sets up the necessary interfaces
for the Manager to properly set up the required subscriptions when
starting the agent.
2018-12-13 12:26:29 +01:00
Johan T. Halseth
6310ed0f1c
autopilot: add autopilot.Manager
This commit adds a new type Manager responsible for managing an
autopilot agent, making it possible to start and stop it at runtime.
2018-12-13 12:26:29 +01:00
Johan T. Halseth
3be292b36e
lnd_test: use context with timeout instead of context.Background
To ensure RPC calls won't block indefinitely.
2018-12-13 08:34:57 +01:00
Johan T. Halseth
f989b2ece8
lnd_test: let assertNumConnections set its own context 2018-12-13 08:33:13 +01:00
Johan T. Halseth
6a4edc8335
lnd_test: let assertNodeNumChannels set its own context 2018-12-13 08:33:12 +01:00
Johan T. Halseth
4db939069a
lnd_test: use cancelable context for SendPayment 2018-12-13 08:31:58 +01:00
Johan T. Halseth
fd347888bb
lnd_test: make assertAmountPaid set its own context timeout
Let us avoid having to set it each time we call it.
2018-12-13 08:31:58 +01:00
Olaoluwa Osuntokun
8c5d6842c2
Merge pull request #2117 from halseth/integration-tests-backend-logs
Save integration tests backend logs
2018-12-12 16:07:25 -08:00
Olaoluwa Osuntokun
56a74e7cfd
Merge pull request #2156 from halseth/integration-tests-wait-before-mining
[Integration tests]: make sure miner have seen tx before mining
2018-12-12 15:57:50 -08:00
Olaoluwa Osuntokun
f55e81a2d4
Merge pull request #2319 from Roasbeef/chan-point-fix
rpcserver: ensure ChannelPoint is set in CloseChannel
2018-12-12 15:27:30 -08:00
Olaoluwa Osuntokun
d24a6d2a3d
Merge pull request #2304 from halseth/weigthed-choice-errnopositive
[autopilot] Don't fail on no more positive nodes
2018-12-12 12:21:06 -08:00
Olaoluwa Osuntokun
dc7c59746e
rpcserver: style related changes to listunspent 2018-12-11 16:29:11 -08:00
Olaoluwa Osuntokun
2352918abb
Merge pull request #1984 from AdamISZ/listunspent
Add listunspent RPC call
2018-12-11 16:15:59 -08:00
Olaoluwa Osuntokun
374bb3b0e7
Merge pull request #2306 from halseth/autopilot-unit-test-timeout-increase
autopilot: fix flaky Agent test
2018-12-11 16:02:01 -08:00
Olaoluwa Osuntokun
530eadd11c
rpcserver: ensure ChannelPoint is set in CloseChannel
Fixes #2317.
2018-12-11 15:56:00 -08:00
AdamISZ
9bb2a26948
Add listunspent RPC call
Returns a brief json summary of each utxo found by calling
ListUnspentWitness in the wallet. The two arguments are the
minimum and maximum number of conrfirmations (0=include
unconfirmed)
2018-12-11 15:26:38 +01:00
Johan T. Halseth
8e57ed7025
autopilot/agent_test: let agent self-trigger retry
This ensures that it is done updating its pending connections map before
re-querying the heuristic.
2018-12-11 10:21:40 +01:00
Johan T. Halseth
dda7355ad6
autopilot/agent_test: ensure mochHeuristics exits cleanly 2018-12-11 10:20:38 +01:00
Johan T. Halseth
71444e74ac
Merge pull request #2033 from gitlikeagirl/ckc-hashinsendresponse
lnrpc: Add payment hash to SendResponse
2018-12-11 09:54:52 +01:00
Wilmer Paulino
60036aca1d
contractcourt/channel_arbitrator: prevent force closing same channel twice
In this commit, we prevent the ChainArbitrator from sending a force
close request for a channel if it has previously already sent one. We do
this to prevent blocking the caller of ForceCloseContract.
2018-12-10 20:37:58 -08:00