Commit Graph

8098 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
2a3538fec8
Merge pull request #3360 from tyzbit/3357_start-time
rpcserver: startTime defaults to the unix epoch
2019-10-07 16:48:23 -07:00
Johan T. Halseth
1a5e39db88
Merge pull request #3541 from halseth/itest-connection-refused-ignore
lnd_test: give peers more time to successfully attempt connection
2019-10-07 10:23:52 +02:00
Johan T. Halseth
a3a04992b4
lnd_test: give peers more time to successfully attempt connection
We might hit a connection refused error in cases where the peer connects
to us exactly as we try to connect to it. We retry the connection within
a wait predicat, as it should be the case that the other peer
establishes the connection, and the two peers actually connects.
2019-10-07 09:46:23 +02:00
Olaoluwa Osuntokun
867e972808
build/release: remove ARM based darwin from release scripts
These result in an error with the current release script as is. Those
that want to run `lnd` on their iPhone/iPad can instead use the
`gomobile` bindings.
2019-10-04 15:39:20 -07:00
Olaoluwa Osuntokun
21e32c2719
Merge pull request #3577 from cfromknecht/update-release-targets
build/release: update release targets
2019-10-04 15:22:07 -07:00
Olaoluwa Osuntokun
5ef1f85998
Merge pull request #3578 from wpaulino/no-freelist-sync-option
config: add sync freelist cli flag
2019-10-04 15:16:30 -07:00
Olaoluwa Osuntokun
52c933ed28
Merge pull request #3576 from Roasbeef/chain-action-cnct-supplement-fix
contractcourt: use legacy chain actions of commitSet not found
2019-10-04 15:04:32 -07:00
Conner Fromknecht
122b43b447
build/release: add new release targets
Notably, solaris/amd64 and illumos/amd64 were added in go1.13. The
others were have been supported previously but were not build targets.

After go1.13, nacl/* will no longer be supported and plan9/* is still
considered experiemental. As a result they are omitted.
2019-10-04 14:50:26 -07:00
Olaoluwa Osuntokun
5c154febcc
Merge pull request #3575 from cfromknecht/disable-str-custom-tlvs
lnrpc+routerrpc: disable custom tlv records via rpc
2019-10-04 12:34:12 -07:00
Olaoluwa Osuntokun
c03fb8aca0
Merge pull request #3561 from Roasbeef/chan-validation-cleanup
chanvalidate: create new channel validation package
2019-10-04 12:32:07 -07:00
Olaoluwa Osuntokun
7a491776a1
contractcourt: use legacy chain actions of commitSet not found
In this commit, we fix a bug that would prevent users that had
unresolved contracts at the time of update from starting their nodes.
Before we added the conf commit set, the information needed to
supplement the resolvers was found in the chain action map. As a result,
if the conf commit set is nil, then we also need to check this legacy
data to ensure that we can supplement the resolvers to the best of our
ability based on the available data.

Fixes #3549.
2019-10-04 12:30:55 -07:00
Wilmer Paulino
b63ed5ad56
config: add sync freelist cli flag 2019-10-04 12:19:42 -04:00
Wilmer Paulino
fa96450db8
channeldb: add freelist sync option modifier 2019-10-04 12:19:41 -04:00
Wilmer Paulino
194a9dea81
multi: support sync freelist option within btcwallet 2019-10-04 12:19:40 -04:00
Johan T. Halseth
6765b8668a
Merge pull request #3574 from wpaulino/max-fee-allocation-fee-floor
htlcswitch: enforce fee floor on max fee allocation
2019-10-04 14:12:02 +02:00
Johan T. Halseth
e88c635b7e
Merge pull request #3573 from wpaulino/log-conf-ntfn-once
chainntnfs: only log confirmation notification registration once
2019-10-04 13:06:42 +02:00
Olaoluwa Osuntokun
d6bbb11cac
README: update dev slack link 2019-10-03 21:43:14 -07:00
Conner Fromknecht
6e9560e818
build/release: format+sort build existing targets 2019-10-03 17:31:13 -07:00
Olaoluwa Osuntokun
46cecb2461
Merge pull request #3545 from Roasbeef/reproducible-builds
build/release: create new release package for reproducible builds
2019-10-03 17:27:06 -07:00
Olaoluwa Osuntokun
0e41f07c47
build/release: create new release package for reproducible builds
In this commit, we create a new `build/release` package which houses the
build instructions and scripts that we need to do deterministic builds
across Windows, Linux, and MacOS.

With this new system, it's now possible for all `lnd` developers, as
well as users to verify the posted build binaries. This wasn't possible
in prior release as only in Go 1.13 did deterministic builds becomes
easier/possible. See the new `README.md` for further details.
2019-10-03 17:25:04 -07:00
Wilmer Paulino
fa96d707c5
lnwallet: enforce fee floor on max fee allocation
Without this, it was possible for a combination of our balance and max
fee allocation to result in a fee rate below the fee floor causing the
remote party to reject the update and close the channel.
2019-10-03 20:13:26 -04:00
Olaoluwa Osuntokun
0e13c5ac3f
lnwallet+funding: expose new ValidateChannel method for 1st party validation
In this commit, we use the recently added `chanvalidate` package to
verify channels once they have been confirmed in the funding manager. We
expose a new method on the `LightningWallet` struct: `ValidateChannels`
which calls the new shared 1st party verification code.

After the channel is fully confirmed in the funding manager, we'll now
use this newly exposed method to handle all validation. As a result, we
can remove the existing validation code in the funding manager, and rely
on the new code in isolation.
2019-10-03 16:23:23 -07:00
Olaoluwa Osuntokun
6ebada112f
routing: update 3d party channel verification to use new chanvalidate package
In the process of moving to use the new package, we no longer need to
fetch the outpoint directly, and instead only need to pass the funding
transaction into the new verification logic.
2019-10-03 16:23:17 -07:00
Olaoluwa Osuntokun
c199ad30ac
lnwallet/chanvalidate: create new channel validation package
In this commit, we create a new `chanvalidate` package which it to house
all logic required for 1st and 3rd party channel verification. 1st party
verification occurs when we find a channel in the chain that is
allegedly ours, while 3rd party verification will occur when a peer
sends us a channel proof of a new channel.

In the scope of the recent CVE, we actually fully verified 3rd party
channels, but failed to also include those checks in our 1st party
verification code. In order to unify this logic, and prevent future
issues, in this PR we move to concentrate all validation logic into a
single function. Both 1st and 3rd party validation will then use this
function. Additionally, having all the logic in a single place makes it
easier to audit, and also write tests against.
2019-10-03 16:23:14 -07:00
Olaoluwa Osuntokun
1e67040145
lnwallet: copy commitment transaction in getSignedCommitTx
In this commit, we move to make a full deep copy of the commitment
transaction in `getSignedCommitTx` to ensure that we don't mutate the
commitment on disk, possibly resulting in a "hot commitment".
2019-10-03 16:23:10 -07:00
Conner Fromknecht
acc5104f53
lnrpc+routerrpc: disable custom tlv records via rpc
In order to prevent future unforeseen issues, we are temporarily
disabling the ability to send custom tlv records to the receiver of a
payment. Currently the receiver does not process or expose these
additional fields via rpc or internally, so they are being disabled
until the end-to-end flow is finished and fully validated.
2019-10-03 15:55:45 -07:00
tyzbit
be989a85ff lncli: start_time defaults to 24 hours ago
Here we set start_time to 24 hours prior
if it's not provided on the CLI.  The
effect of this is when you don't provide
a start_time:

CLI: -24h
RPC: Unix Epoch
2019-10-03 18:12:39 -04:00
tyzbit
8891346cb2 rpcserver: startTime defaults to the unix epoch
Fixes https://github.com/lightningnetwork/lnd/issues/3357.  When
start_time isn't specified, its default value is 0.  This meant when
users explicitly specified a start_time of 0, we would incorrectly set
start_time to 24 hours in the past.  Now, n0 means n0.
2019-10-03 18:12:21 -04:00
Wilmer Paulino
5ed1084130
Merge pull request #3572 from joostjager/canceled-spelling
multi: fix canceled spelling
2019-10-03 16:50:06 -04:00
Olaoluwa Osuntokun
450e5a7df4
Merge pull request #3568 from cfromknecht/correct-static-remote-key-feature-bits
lnwire/features: static_remote_key bits, 10/11 -> 12/13
2019-10-03 12:14:40 -07:00
Wilmer Paulino
e51df8d810
chainntnfs: only log confirmation notification registration once 2019-10-03 14:05:28 -04:00
Wilmer Paulino
40d63d5b4e
Merge pull request #3571 from joostjager/log-pathfinding-metrics
routing: log performance metrics
2019-10-03 12:21:45 -04:00
Joost Jager
b58dbb2d70
multi: fix canceled spelling 2019-10-03 17:27:36 +02:00
Joost Jager
9f3656efeb
routing: log performance metrics 2019-10-03 15:07:11 +02:00
Johan T. Halseth
989de44a69
Merge pull request #3563 from joostjager/link-test-context
htlcswitch/test: create link test context
2019-10-03 09:45:36 +02:00
Olaoluwa Osuntokun
113c4346b0
Merge pull request #3562 from cfromknecht/perm-peer-fixes
server: don't prune manual perm connections
2019-10-02 20:46:47 -07:00
Wilmer Paulino
4b857f819a
Merge pull request #3567 from cfromknecht/bump-bitcoind-0.18.1
build: bump to bitcoind 0.18.1 for itests
2019-10-02 10:29:36 -04:00
Conner Fromknecht
65a991999d
lnwire/features: static_remote_key bits, 10/11 -> 12/13
Final version of spec allocated 12/13 to option_static_remote_key.
2019-10-02 03:33:22 -07:00
Conner Fromknecht
9710134f70
Merge pull request #3566 from wpaulino/wait-until-peer-active
peer+server: wait until peer is active to begin channel opening process
2019-10-01 17:36:32 -07:00
Conner Fromknecht
45114cb819
build: bump to bitcoind 0.18.1 for itests 2019-10-01 16:29:55 -07:00
Conner Fromknecht
1b79414175
server: don't prune manual perm connections 2019-10-01 16:13:35 -07:00
Wilmer Paulino
cf5dc90d04
peer+server: wait until peer is active to begin channel opening process
Without waiting, we would proceed to retrieve the remote peer's
supported features, which may have not been set due to not yet receiving
their Init message.
2019-10-01 17:42:43 -04:00
Johan T. Halseth
43b02d3035
Merge pull request #3481 from legacycode/fix-dockerfile
Fixed dockerfile by adding version numbers to base containers
2019-10-01 15:02:07 +02:00
Conner Fromknecht
10d53e61aa
Merge pull request #3551 from joostjager/safe-invoice-migration
channeldb: safe invoice migration
2019-09-30 15:48:19 -07:00
Christian Lehmann
d9e0f6c220
Fixed dockerfile by adding version numbers to base containers 2019-09-30 17:48:28 +02:00
Johan T. Halseth
f8621fe6d7
Merge pull request #3554 from alrs/stdlib-context
Use stdlib "context" Package
2019-09-30 10:15:34 +02:00
Lars Lehtonen
a22adc4a8e
macaroons: stdlib context 2019-09-28 16:10:57 -07:00
Lars Lehtonen
259b5b253d
lnd: stdlib context 2019-09-28 16:07:37 -07:00
Lars Lehtonen
8194d260ff
lnrpc: stdlib context 2019-09-28 16:06:34 -07:00
Lars Lehtonen
fa26359dd6
rpcserver: stdlib context 2019-09-28 15:46:21 -07:00