Commit Graph

11011 Commits

Author SHA1 Message Date
carla
d8a4b37c0e
contractcourt: persist commit sweep resolutions 2020-07-07 19:49:58 +02:00
carla
d0ec872ef3
contractcourt: store htlc timeout sweeps 2020-07-07 19:49:57 +02:00
carla
a38dc256fd
contractcourt: persist remote outgoing htlc claim outcome on disk
When a remote peer claims one of our outgoing htlcs on chain, we do
not care whether they claimed with multiple stages. We simply store
the claim outgome then forget the resolver.
2020-07-07 19:49:56 +02:00
carla
03b76ad9a4
contractcourt: save htlc success resolvers, including first stage
Checkpoint our htlc claims with on chain reasolutions, including our
first stage success tx where required.
2020-07-07 19:49:55 +02:00
carla
eb07f89090
contractcourt/test: add test context for success resolver 2020-07-07 19:49:54 +02:00
carla
cf739f3f87
contractcourt: persist timed out incoming htlc resolver reports
Incoming htlcs that are timed out or failed (invalid htlc or invoice
condition not met), save a single on chain resolution because we don't
need to take any actions on them ourselves (we don't need to worry
about 2 stage claims since this is the success path for our peer).
2020-07-07 19:49:54 +02:00
carla
f5b20b7429
contractcourt: store anchor resolutions on disk 2020-07-07 19:49:53 +02:00
carla
0a01d5d17c
contractcourt: add resolver report function to ContractReport
Our current set of reports contain much of the information we will
need to persist contract resolutions. We add a function to create
resolver reports from our exiting set of resolutions.
2020-07-07 19:49:52 +02:00
carla
fa46db9c48
multi: add resolver reports to Checkpoint
To allow us to write the outcome of our resolver to disk, we add
optional resolver reports to the CheckPoint function. Variadic params
are used because some checkpoints may have no reports (when the resolver
is not yet complete) and some may have two (in the case of a two stage
resolution).
2020-07-07 19:49:51 +02:00
carla
8c8f857f60
contractcourt: add PutResolverReport function to chanArb config 2020-07-07 19:49:50 +02:00
carla
578af99618
channeldb: save resolver outcomes in close summaries top level bucket
Add a new top level bucket which holds closed channels nested by chain
hash which contains additional information about channel closes. We add
resolver resolutions under their own key so that we can extend the
bucket with additional information if required.
2020-07-07 19:49:36 +02:00
Wilmer Paulino
9e8c39d4a2
Merge pull request #971 from vctt94/addMaxValueFlag
Add max value in flight flag
2020-07-07 10:29:51 -07:00
Andras Banki-Horvath
fe51f528d1
docs: documentation for the experimental etcd feature 2020-07-07 15:59:53 +02:00
Olaoluwa Osuntokun
3a2f3504a5
Merge pull request #4281 from Roasbeef/host-ann
netann: add new HostAnnouncer to support dynamic IPs via domains
2020-07-06 18:12:15 -07:00
Olaoluwa Osuntokun
ba3688c3b9
netann: add new HostAnnouncer to support dynamic IPs via domains
In this commit, we add a new sub-system, then `HostAnnouncer` which
allows a users without a static IP address to ensure that lnd always
announces the most up to date address based on a domain name. A new
command line flag `--external-hosts` has been added which allows a user
to specify one or most hosts that should be periodically resolved to
update any advertised IPs the node has.

Fixes #1624.
2020-07-06 17:30:08 -07:00
Olaoluwa Osuntokun
854a12e4c6
Merge pull request #4347 from Crypt-iQ/peer_pkg_0518
peer: Brontide Peer implementation
2020-07-06 17:24:15 -07:00
nsa
cbd54101f8 multi: remove peer.go, change all references to point to peer pkg 2020-07-06 19:16:07 -04:00
nsa
9be9d69349 multi: initialize peer with peer.Config 2020-07-06 19:16:07 -04:00
nsa
bf161c9835 peer+server: add HandleLocalCloseChanReqs to peer, call from server 2020-07-06 19:16:07 -04:00
nsa
e1632dd172 peer.go: handleCloseMsg function for channelManager goroutine 2020-07-06 19:16:07 -04:00
nsa
1a91013c14 peer_test+test_utils: remove duplicate *LightningChannel return param
It was already present in the peer object that was returned.
2020-07-06 19:16:07 -04:00
nsa
02fd905f61 peer.go: moving the apply function outside of the constructor
This is mainly for readability so that the function isn't indented.
2020-07-06 19:16:07 -04:00
nsa
4ee4a1a24e peer.go: remove height argument to addLink function
Best height is not needed to create a link.
2020-07-06 19:16:07 -04:00
nsa
328094d8fb peer.go: replace switch statements with if statements 2020-07-06 19:16:06 -04:00
nsa
0dda9e06ce multi: exporting PendingUpdate, ChannelCloseUpdate, ErrorBufferSize 2020-07-06 19:16:06 -04:00
nsa
ac3d416b04 peer_test.go: fixes to coop close tests, modifying variable names
to either be alice or bob-prefixed. This helps an observer understand
what the test is actually doing.
2020-07-06 19:16:06 -04:00
nsa
ac72479b10 server.go: log DisconnectPeer errors, use public functions to access
peer internals.
2020-07-06 19:16:06 -04:00
nsa
bfaef46579 peer_test.go: comment clarifications 2020-07-06 19:16:06 -04:00
nsa
d23b30d889 peer.go: comment clarifications, improved formatting 2020-07-06 19:16:06 -04:00
nsa
01415f4a5f peer: define Config and LinkUpdater interface
This commit defines a Config for initializing a peer and the
LinkUpdater interface.
2020-07-06 19:16:06 -04:00
nsa
50186ba834 lnpeer/peer.go: modifying interface comment 2020-07-06 19:16:06 -04:00
Joost Jager
f9c6a1b73f
Merge pull request #4418 from joostjager/anchor-vectors
lnwallet/test: anchor vectors
2020-07-06 13:38:28 +02:00
Joost Jager
16577d7d0e
lnwallet/test: anchor test vectors 2020-07-06 12:45:17 +02:00
Joost Jager
1c775d131b
lnwallet/test: close database after test 2020-07-06 12:45:15 +02:00
Joost Jager
c65f60b101
lnwallet/test: convert test vectors to json 2020-07-06 12:45:13 +02:00
vctt94
2f6a8b13ae fundingmanager: Add max value to fundingmanager and fundingmanager_test 2020-07-03 11:09:40 -03:00
vctt94
6845763aa5 lncli: Add max_value_in_flight flag to openchannel 2020-07-03 11:09:34 -03:00
Olaoluwa Osuntokun
2d4facf940
Merge pull request #4428 from wpaulino/relative-thaw-height
multi: add relative thaw height interpretation
2020-07-02 15:37:23 -07:00
Wilmer Paulino
6075997ebc
multi: add relative thaw height interpretation
This is useful when we wish to have a channel frozen for a specific
amount of blocks after its confirmation. This could also be done with an
absolute thaw height, but it does not suit cases where a strict block
delta needs to be enforced, as it's not possible to know for certain
when a channel will be included in the chain. To work around this, we
add a relative interpretation of the field, where if its value is below
500,000, then it's interpreted as a relative height. This approach
allows us to prevent further database modifications to account for a
relative thaw height.
2020-07-02 12:05:49 -07:00
vctt94
8ebdfe3128 lnrpc: Add MaxValueInFlight flag 2020-07-02 15:50:26 -03:00
vctt94
474ce4ae25 server: Add max value in flight to server 2020-07-02 15:49:19 -03:00
Conner Fromknecht
01ba4d0b59
Merge pull request #4371 from yyforyongyu/expose-channel-constraints
lnrpc: expose all local and remote channel constraints
2020-07-01 16:45:35 -07:00
Olaoluwa Osuntokun
7cda30bfb4
Merge pull request #4167 from joostjager/hold-keysend
multi: hold keysend payments
2020-06-30 16:06:53 -07:00
yyforyongyu
f11da830b9 lnrpc: expose all local and remote channel constraints 2020-06-30 06:59:18 +08:00
Conner Fromknecht
eeea441c3c
Merge pull request #4405 from joostjager/interceptor-out
htlcswitch: expose additional data for intercepted packets
2020-06-29 11:35:20 -07:00
Joost Jager
2903505164
htlcswitch: expose custom records on intercepted packet 2020-06-27 11:00:46 +02:00
Joost Jager
363142de33
htlcswitch: expose additional fields for intercepted packets 2020-06-27 11:00:44 +02:00
Joost Jager
74db43282c
htlcswitch: encapsulate exposed packet info 2020-06-27 10:59:08 +02:00
Joost Jager
607927634d
routerrpc: remove redundant htlc prefix from proto field
The message name already sets the context to an htlc.
2020-06-27 10:59:06 +02:00
Joost Jager
f6f8e3221b
routerrpc: clarify proto fields to be outgoing 2020-06-27 10:59:04 +02:00