Commit Graph

4304 Commits

Author SHA1 Message Date
8f786bb860 htlcswitch/hodl/mask_debug: enable Mask w/ debug flag 2018-05-02 00:18:50 -07:00
cd43285993 htlcswitch/hodl/mask_production: disables Mask w/o debug flag 2018-05-02 00:18:50 -07:00
941bdcafad htlcswitch/hodl/flags: adds flags signifying switch breakpoints 2018-05-02 00:18:50 -07:00
e677b1e9c4 htlcswitch/hodl/config: adds CLI bindings for hodl flags 2018-05-02 00:18:49 -07:00
690992043b breacharbiter_test: add double handoff event 2018-05-02 08:43:32 +02:00
e9eab3f79f server: reliably hand off breach from the ChainArbitrator to the breachArb
This commit make the server populate the ChainArbitrator's
ContractBreach method, by a method that will reliably handoff the breach
event ot the breachArbiter. The server will now forward the breach event
to the breachArbiter, and only let the closure return a non-nil error
when the breachArbiter ACKs this event.
2018-05-02 08:43:32 +02:00
08f1a3689d peer: don't pass bool to SubscribeChannelEvents 2018-05-02 08:43:32 +02:00
f06797ab00 contractcourt/chain_arbitrator: make breachArbiter handoff a function closure
This commit adds the new function closure option ContractBreach to the
ChainArbitrator config, a closure that is again used by the ChainWatcher
to reliably handoff a breach event to the breachArbiter.
2018-05-02 08:43:31 +02:00
3fdc04dff0 contractcourt/chain_watcher: make breachArbiter handoff a function closure
This commit changes how the ChainWatcher notifies the breachArbiter
about a channel breach. Instead of assuming the breachArbiter is among
the clients subscibing to channel events, it will call a new method
contractBreach(), and assume the breachArbiter has reliably gotten the
breach info when this method returns with a non-nil error.

Since the breachArbiter was the only sybsystem having a sync chain
subsciption, we also remove the (now) unused syncDispatch option.
2018-05-02 08:43:31 +02:00
a6f0dd72ac contractcourt/chain_arbitrator: use chainWatcherConfig 2018-05-02 08:43:31 +02:00
0697510884 contractcourt/chain_watcher: create chainWatcherConfig 2018-05-02 08:43:31 +02:00
7c945b42fe fundingmanager_test: remove ArbiterChan 2018-05-02 08:43:31 +02:00
cdf60b5f9d lnd: remove ArbiterChan 2018-05-02 08:43:31 +02:00
c3f0e608ec fundingmanager: remove ArbiterChan 2018-05-02 08:43:31 +02:00
409ab08c36 rpcserver: remove send to settledContracts 2018-05-02 08:43:30 +02:00
55ac8735b6 breacharbiter_test: use ContractBreaches channel 2018-05-02 08:43:30 +02:00
b9970aec47 breacharbiter: receive breaches to ACK on separate channel
This commit changes how the breachArbiter gets notified about channel
breaches. Previously it would need to SubscribeToChannelEvents to get
get notified if any breach happened, now we send all seen breaches on a
new channel ContractBreaches.

By having the breachArbiter subscribe to channel events, we risked
events getting lost when we were either starting up or shutting down,
since events could happen before we had been able to subscribe, or right
after we had cancelled our subscription.

Now it is the server's responsibility to reliably forward events from
the ChainArbitrator to the breachArbiter, and forward the ACK the
breachArbiter responds with. This makes sure that the messages aren't
lost in the event of starting up or shutting down, since the connection
between the subsystems now are static.

A result of this change is that the internals of the breachArbiter can
be simplified significantly, as we will get all channel breaches
forwarded on one channel. This lets us get rid of the observer
goroutines, and we spin up goroutines handling the channel breaches only
when they happen.
2018-05-02 08:43:30 +02:00
79341fc63e contractcourt/chain_watcher: move log message
This move the log message "channel marked pending-closed" to the point
where the channel actually has been marked pending closed, instead of
before the database transaction has been done.
2018-05-02 08:43:30 +02:00
7e397067f6 contractcourt/chainwatcher: remove close observer for loop
This commit removes the for loop in the closeObserver, as it wasn't
serving any purpose. After receiving a spend notification we would
return, breaking out of the loop. When getting a quit signal we would
also return, making the loop only do one iteration in any case.
2018-05-02 08:43:30 +02:00
ad106bcefd lncli: group commands into categories 2018-05-02 08:55:55 +03:00
097fd50747 Merge pull request #1140 from guggero/integrationtest-logfile-upload
Integration tests: upload logs from TravisCI to file.io as well
2018-05-01 21:08:14 -07:00
ef96c97786 Merge pull request #1139 from guggero/integrationtest-logfiles
Integration tests: give nodes a name and print that name in log file name
2018-05-01 21:05:42 -07:00
8fcd6b56cb chainntnfs: expand test for mempool spend notifications
Make sure new clients get notified about txs that are already in the mempool.

Fixes #1074.
2018-05-01 19:09:56 -07:00
c7c25445eb lnwallet: add new test to ensure channel is able to update fees in both directions
Closes #1145.
2018-05-01 17:35:42 -07:00
b75429c6fe test: upload integration test logs from TravisCI to file.io 2018-05-01 13:16:21 +03:00
cbd981c236 lnd_test: make sure node ID is correctly initialized in log file name 2018-04-30 11:59:34 +03:00
d7a254328e Take into account that the new fee will not come in addition to old fee when updating commit fee 2018-04-29 22:42:20 +00:00
578f1d9332 lnd_test: give nodes a name and print that name in log file name 2018-04-28 17:46:50 +03:00
09c9979831 Merge pull request #1138 from halseth/integration-test-remove-block-flake
Integration tests: remove racy block generation
2018-04-27 13:19:39 -07:00
23f67ef009 lnd_test: remove racy block generation
This commit removes the mining of a block within the integration tests,
that would lead to a flake during runs. The reason was that the sweeoing
transaction was actually broadcast already at this point, and this block
was mined with the assumption that it wasn't. However, test would pass
more often than not because the UTXO nursery would be working on
graduating new heights, whcih is a bit slow, so in most cases the block
would be mined before it had broadcast the sweeping transaction.

By removing this block we ensure that the sweeping transaction will be
found for sure in the waitForTxInMempool call below.
2018-04-27 10:01:05 +02:00
4ab2bba5c7 Merge pull request #1005 from cfromknecht/wallet-recovery
Wallet Recovery
2018-04-26 20:21:03 -07:00
1ae3d4f118 dep: update btcwallet w/ wallet recovery 2018-04-26 16:34:21 -07:00
5049d3956b lnd_test: adds wallet recovery test 2018-04-26 16:34:21 -07:00
c977ebb8bd lntest/node: add ability to unlock/init HarnessNode 2018-04-26 16:03:28 -07:00
329793d06b lntest/harness: add NewNodeWithSeed and RestoreNodeWithSeed 2018-04-26 16:03:28 -07:00
92a2ba163e cmd/lncli/commands: ask for recovery window after restore seed 2018-04-26 16:03:28 -07:00
a2fdd8593d lnwallet/interfaace_test: init neutrino with chain params 2018-04-26 16:03:28 -07:00
06a53aa5cc lnwallet/btcwallet/config: add recovery window and bday 2018-04-26 16:03:28 -07:00
ae604061bf lnwallet/btcwallet/btcwallet: pass recovery window to CreateNewWallet 2018-04-26 16:03:27 -07:00
603228ce79 lnd: threads recovery window param from walletunlocker 2018-04-26 16:03:27 -07:00
b9df5e75f7 keychain/interface_test: init test wallet w/o recovery window 2018-04-26 16:03:27 -07:00
1972a795e5 chainregistry: initialize wallet w/ recovery window 2018-04-26 16:03:27 -07:00
0ae62c3720 lnrpc: add RecoveryWindow to InitWalletRequest 2018-04-26 16:03:27 -07:00
3cb87f377f walletunlocker/service_test: check recovery window is threaded 2018-04-26 16:03:09 -07:00
f8c0357770 walletunlocker: accept recovery window from InitWallet 2018-04-26 16:03:09 -07:00
c824af11a1 aezeed: expose BirthdayTime conversion from offset 2018-04-26 16:03:05 -07:00
c54a91f44d rpc: modify SignMessage+VerifyMessage to bind msg to LN context
In this commit, we modify the SignMessage+VerifyMessage slightly in
order to bind the message we're signing to our specific context. We do
this by pre-pending the ascii text "Lightning Signed Message:" to the
msg before we run it through dsha256. Adding this prefix binds the
message to our context in order to avoid accidentally signing a sighash
or the like.
2018-04-25 19:45:32 -07:00
86fd9e361e Merge pull request #1017 from halseth/contract-court-without-on-chain
Contract court acting on confirmed chain events
2018-04-25 17:13:24 -07:00
caf8139750 docs/grpc: correct javascript macaroon example
Creating and adding metadata in single line resulted in null `metadata`
2018-04-25 13:38:39 -07:00
c9eb077935 cmd/lncli: remove unused args for pendingchannels command
Fixes #1123.
2018-04-25 13:28:15 -07:00