Commit Graph

8887 Commits

Author SHA1 Message Date
Oliver Gugger
4e0c276154
rpcserver: don't skip pending channels in backup subscription
The synchronous call to get all channel backups also include
channels that are pending at the moment of the call. A previous
commit added pending channels to the file based backup as well. So
this is the last backup method that needs to be adjusted to also
contain unconfirmed channels.
2020-03-04 10:58:49 +01:00
Oliver Gugger
8a2c02f8ea
itest: test unconfirmed channel backup file 2020-03-04 10:58:49 +01:00
Oliver Gugger
d8c62c37a8
channel_notifier: update backup on pending chan
To fix the discrepancy between getting the channel backups via
RPC where all pending channels are included, we also update the
channel.backup file on disk whenever we get a pending channel
event notification.
2020-03-04 10:58:49 +01:00
Oliver Gugger
182835d504
fundingmgr+channelnotifier: add channel config to pending chan ntfn
To be able to write a new channel backup file for pending channels,
we need to include the channel configuration in the pending channel
notification event.
2020-02-14 10:04:26 +01:00
Olaoluwa Osuntokun
2cd26d7556
Merge pull request #3980 from joostjager/registry-deadlock
invoices: fix htlc timer deadlock
2020-02-04 17:14:17 -08:00
Joost Jager
0042a1ffeb
invoices: fix htlc timer deadlock 2020-02-04 15:22:08 +01:00
Joost Jager
51324ac7ae
invoices: move log into update context 2020-02-04 15:22:06 +01:00
Joost Jager
a339065fdc
invoices: add hash to update context 2020-02-04 15:22:04 +01:00
Johan T. Halseth
80c5232d4f
Merge pull request #3978 from bhandras/hotfix
invoices: fix log messages
2020-02-04 12:56:18 +01:00
Joost Jager
da6b33f0b9
Merge pull request #3979 from carlaKC/lnd-fixlinter
lnd: fix gosimple linter failure
2020-02-04 10:16:34 +01:00
carla
bbf3877d65
lnd: fix gosimple linter failure
GoSimple linter check fails for time.Now().Sub. Change the logged
database open time to use time.Since instead.
2020-02-04 10:06:45 +02:00
Olaoluwa Osuntokun
698f1175f8
lnd: add timing information to db open log 2020-02-03 16:19:01 -08:00
MrManPew
19bdbe7f8d Update channeldb opening log
It might take a few minutes and it should therefore state it...
2020-02-03 16:18:56 -08:00
Olaoluwa Osuntokun
e25cca11f7
Merge pull request #3915 from carlaKC/3771-loopattackprotection
htlcswitch: Disallow circular routes on same channel
2020-02-03 15:59:53 -08:00
Olaoluwa Osuntokun
07977a2bf0
Merge pull request #3957 from cfromknecht/amp-record
record+routing/route: add AMP record
2020-02-03 15:53:21 -08:00
Andras Banki-Horvath
e6561ca86d invoices: fix log messages
This commit fixes incorrect log messages.
2020-02-03 15:12:55 +01:00
Olaoluwa Osuntokun
ab59f47a0b
Merge pull request #2593 from Crypt-iQ/brontide_fuzz_0119
fuzz: adding fuzz harnesses for acts 1-3, encryption+decryption
2020-01-31 17:16:30 -08:00
Johan T. Halseth
b39e21f6dd
Merge pull request #3926 from C-Otto/master
Fix typos
2020-01-31 11:34:34 +01:00
nsa
0d42da0cb3
fuzz/brontide: random+static round-trip encrypt+decrypt harnesses 2020-01-30 16:46:02 -05:00
nsa
0be5660a2a
fuzz/brontide: random+static encrypt harnesses 2020-01-30 16:46:02 -05:00
nsa
468e5c03e9
fuzz/brontide: random+static decrypt harnesses 2020-01-30 16:46:01 -05:00
nsa
116c5469bc
fuzz/brontide: random+static harnesses for acts 1-3 2020-01-30 16:46:01 -05:00
nsa
511fdb2520
fuzz/brontide: add fuzzing helper utilities 2020-01-30 16:46:01 -05:00
nsa
7c316b9194
brontide: add SetCurveToNil function 2020-01-30 16:45:59 -05:00
carla
afc7cc7f84
htlcswitch+config: make circular forwarding defence configurable
Add a bool to the switch's config which can be used to disable same
channel circular route checks.
2020-01-30 10:13:47 +02:00
carla
a3478f1d99
htlcswitch: add CheckCircularForward to handlePacketForward
Add a CheckCircularForward function which detects packets which are
forwards over the same incoming and outgoing link, and errors if the
node is configured to disallow forwards of this nature. This check is
added to increase the cost of a liquidity lockup attack, because it
increases the length of the route required to lock up an individual
node's bandwidth. Since nodes are currently limited to 20 hops,
increasing the length of the route needed to lock up capital increases
the number of malicious payments an attacker will have to route, which
increases the capital requirement of the attack overall.
2020-01-30 10:13:40 +02:00
carla
c08377d303
htlcswitch/test: replace mock server delta with constant 2020-01-30 10:02:44 +02:00
Wilmer Paulino
bed485f0a9
Merge pull request #3194 from halseth/listpayments-test-on-chain-settle
[integration tests]: restart Alice after on-chain settle
2020-01-28 17:29:23 -08:00
Conner Fromknecht
9fc197d8b1
routing/route: fix TestMPPHop comment 2020-01-28 06:43:44 -08:00
Conner Fromknecht
0cb27151e5
routing/route: add AMP record to payload size calcs 2020-01-28 06:43:34 -08:00
Conner Fromknecht
de88a4b174
record: add AMP record and encode/decode methods 2020-01-28 06:43:07 -08:00
Olaoluwa Osuntokun
04c3998f4b
Merge pull request #3965 from guggero/rest-api-falsey
rpcserver: instruct REST marshaler to emit default values
2020-01-27 12:19:57 -08:00
Oliver Gugger
c8b7108eeb
rpcserver: instruct REST marshaler to emit default values
This change instructs the REST proxy server to overwrite its default
JSON marshaler settings. That allows us to set EmitDefaults to true
which will result in all JSON fields returned in REST responses to
be fully populated, even if their values are falsey.
2020-01-27 15:40:39 +01:00
Johan T. Halseth
1dadce7cfd
Merge pull request #3945 from joostjager/node-level-penalty
routing: penalize node-level failures harder
2020-01-25 12:50:09 +01:00
Olaoluwa Osuntokun
e79897e651
Merge pull request #3950 from bhandras/invoice-expiry-startup-fix
invoices: fix slow startup with many expired invoices
2020-01-24 16:49:43 -08:00
Olaoluwa Osuntokun
767128e6c5
Merge pull request #3927 from guggero/lnwallet-scrypt
keychain+walletunlocker: use fast scrypt options for unit tests
2020-01-24 13:24:30 -08:00
Andras Banki-Horvath
fabcdf754a invoices: fix slow startup with many expired invoices
This commit intends to fix slow first startup time when there are many
invoices that need to be canceled. The slowdown is caused by a combination
of adding invoices to the expiry watcher one-by-one and slow
cancellation. Due to slow cancellation and the unbuffered channel which
we use to pass invoices to the expiry watcher blocks the registry.
With this fix we'll instead batch add invoices to the expiry watcher and
thereby won't block the registry startup.
2020-01-24 21:01:10 +01:00
Johan T. Halseth
a8ec8f2db6
Merge pull request #3582 from hsjoberg/pendingchannelevent
rpc: Add PendingOpenChannel to SubscribeChannelEvents
2020-01-24 14:42:40 +01:00
Oliver Gugger
3f45fb3781
walletunlocker: use fast scrypt options for unit tests 2020-01-24 14:02:40 +01:00
Oliver Gugger
29ece5fe24
keychain: use fast scrypt options for unit tests 2020-01-24 14:02:40 +01:00
Oliver Gugger
1cb52491a3
mod: update btcwallet dependency 2020-01-24 14:02:39 +01:00
Hampus Sjöberg
227e66c469 rpc: Add PendingOpenChannel to SubscribeChannelEvents
This commit adds PendingOpenChannel to SubscribeChannelEvents stream in
the gRPC API.
This is useful for keeping track of channel openings that Autopilot does.
It can also be used for the non-initator side of a channel opening to keep
track of channel openings.
2020-01-24 13:48:18 +01:00
Olaoluwa Osuntokun
51d8c11eb5
Merge pull request #3925 from wpaulino/query-chan-range-wrong-chainhash
discovery: check ChainHash in QueryChannelRange messages
2020-01-23 12:10:56 -08:00
Joost Jager
1413995ab7
Merge pull request #3872 from joostjager/invalid-sig-fix
htlcswitch+lnwallet+channeldb: invalid sig fix
2020-01-23 21:08:07 +01:00
Joost Jager
b573a5e61a
Merge pull request #3797 from joostjager/explicit-now-dependency-channeldb
channeldb: inject clock into database
2020-01-23 14:27:02 +01:00
Johan T. Halseth
fd75f29480
Merge pull request #3908 from halseth/mobile-trim-spaces
[mobile] trim arg spaces before comparison
2020-01-23 11:54:25 +01:00
Johan T. Halseth
bebb6395ec
Merge pull request #2137 from halseth/payintent-recv-eof
rpcserver: fix error handling in bidirectional sendPayment
2020-01-23 11:53:56 +01:00
Joost Jager
1851dfdcf7
Merge pull request #3947 from joostjager/missing-result-strings
invoices: add missing String() cases
2020-01-23 11:47:06 +01:00
Joost Jager
ae9c6faebf
Merge pull request #3809 from joostjager/anchor-sweeper
sweep: allow force sweeping of negatively yielding inputs
2020-01-23 11:46:46 +01:00
Olaoluwa Osuntokun
f8418ab705
Merge pull request #3949 from Roasbeef/fix-release-script-tags
build/release: update release script to handle multiple tags at head
2020-01-21 23:29:48 -08:00