Commit Graph
100 Commits
Author SHA1 Message Date
Conner Fromknecht c704c5747a Merge pull request #4558 from halseth/anchors-spec
[anchor commitment] Make the anchor commitment type spec compliant
2020-09-11 15:43:56 -04:00
Conner Fromknecht 3c606bd9c0 Merge pull request #4542 from Crypt-iQ/mock_signer_cleanup_0817
multi: remove mock.go
2020-09-11 13:16:17 -04:00
Conner Fromknecht 7c91f744ee Merge pull request #4547 from Crypt-iQ/fwdpkg_cleanup_0819
htlcswitch: reduce db contention when removing forwarding packages
2020-09-02 16:58:28 -07:00
Conner Fromknecht a4031f500b rpcserver+fundingmanager: thread remote_max_htlcs to channel opening 2020-08-24 20:11:33 -07:00
Conner Fromknecht 9e73683c45 lnrpc: add remote_max_htlcs to OpenChannelRequest
This will allow users to set a custom limit for the max number of
concurrent HTLCs the remote party can add to the channel.
2020-08-24 20:11:33 -07:00
Conner Fromknecht 5c91be3f57 config+rpcserver: allow configurable defualt-remote-max-htlcs 2020-08-24 20:11:23 -07:00
Conner Fromknecht 1760fe30db fundingmanager: cache remote-max-htlcs in res context
Currenlty the maxHtlcs value is recomputed after receiving
accept_channel. This works when the derivation is deterministic, howver
we now allow the user to manually override this value from open_channel.
As such, we must retain the chosen value in memory throughout the
funding process, otherwise the initiator would revert to the
deterministic derivation and the two endpoints will disagree on the
correct max-htlcs value in their view of the other's policy.
2020-08-24 20:08:19 -07:00
Conner Fromknecht ef69537c7f fundingmanager: add maxHtlcs to openChanReq 2020-08-24 20:08:19 -07:00
Conner Fromknecht 8a22e4fd1c lntest/itest: swap want/got channel constraints
Otherwise the fatal error message incorrectly describes what happpened.
2020-08-24 20:08:19 -07:00
Conner Fromknecht 6c14c73b6b lntest/harness: correct typo in error message 2020-08-24 20:08:19 -07:00
Conner Fromknecht 8390e303c1 lntest/itest: add t.Helper() to assertChannelConstraints 2020-08-24 20:08:15 -07:00
Conner Fromknecht 7d4547a8e9 Merge pull request #4559 from guggero/itest-error-whitelist
itest: fix pattern for short_chan_id in err whitelist
2020-08-24 11:19:03 -07:00
Conner Fromknecht 94526b8d9a Merge pull request #4538 from GlenCooper/patch-1
Update INSTALL.md
2020-08-21 12:13:21 -07:00
Conner Fromknecht b4c32c2da6 Merge pull request #4550 from Roasbeef/update-sec-key-2020
README: update link to security disclosure GPG key
2020-08-20 17:14:41 -07:00
Conner Fromknecht 9a44d3e544 Merge pull request #4380 from bhandras/dev_build_tags
build: add all subservers to dev build with an optional with-rpc build param
2020-08-20 13:00:24 -07:00
Conner Fromknecht d04df11c44 Merge pull request #4505 from Crypt-iQ/activeNet_cleanup_0803
lnd: removing activeNetParams global, passed around instead via configs
2020-08-20 12:59:15 -07:00
Conner Fromknecht 47090c4902 Merge pull request #4531 from halseth/switch-kvdb-view
[trivial] htlcswitch: use kvdb.View for loading fwdpkgs
2020-08-20 12:58:28 -07:00
Conner Fromknecht fd3f7ca6c8 Merge pull request #4434 from carlaKC/labels-general
multi: add labels to lnd native transactions
2020-08-20 12:58:04 -07:00
Conner Fromknecht f5d24e6be5 Merge pull request #4552 from dspicher/master
cmd/lncli: fix sendcoins usage message
2020-08-20 12:56:37 -07:00
Conner Fromknecht 04e1e2298f watchtower: remove dev tag from unit test files
Several watchtower unit tests were not being executed by make unit since
they require the dev tag to be passed in. All tests still pass.
2020-08-20 12:12:51 -07:00
Conner Fromknecht 3ae46d81f4 build/version: bump to v0.11.0-beta 2020-08-19 07:14:41 -07:00
Conner Fromknecht fc12656a1a build/version: bump to v0.11.0-beta.rc4 2020-08-13 19:42:02 -07:00
Conner Fromknecht 1124d79922 build/version: bump to 0.11.0-beta.rc3 2020-08-13 15:45:15 -07:00
Conner Fromknecht 2e175f54ef Merge pull request #4528 from yyforyongyu/fix-typo
trivial: typo fix
2020-08-13 12:06:25 -07:00
Conner Fromknecht 4674573e9a Merge pull request #4525 from guggero/no-restore-close
rpcserver: no manual close of restored channels
2020-08-12 21:17:49 -07:00
Conner Fromknecht 927f0989a4 Merge pull request #4526 from Roasbeef/db-split-peer-fix
lnd: properly pass peer remote db for graph, local db for rest
2020-08-12 17:49:46 -07:00
Conner Fromknecht ff7bfb492a chainntnfs/txnotifier: remove events on teardown
If a concurrent call to cancel is made while the notifier is shutting
down, this would cause a panic (close of closed channel) since the
events are not removed from the notification sets.
2020-08-12 17:42:50 -07:00
Conner Fromknecht 37a29b4869 Merge pull request #4496 from cfromknecht/moar-whitelist
lntest/itest: update error whitelist
2020-08-10 12:31:22 -07:00
Conner Fromknecht 687da86345 build/version: bump version to v0.11.0-beta.rc2 2020-08-07 19:51:53 -07:00
Conner Fromknecht 0e935eadc0 lntest/itest: add failed getting UTXO error to whitelist 2020-08-07 19:29:35 -07:00
Conner Fromknecht df5d334985 lntest/itest: add chain notifier shutting down to whitelist 2020-08-06 12:16:42 -07:00
Conner Fromknecht eb1205d399 lntest/itest: add WS connection reset to error whitelist 2020-08-06 12:16:41 -07:00
Conner Fromknecht 1b660c7387 lntest: add canceled adding new channel to whitelist 2020-08-06 12:16:41 -07:00
Conner Fromknecht de74798c12 lntest/itest: add whitelist entry for block hash fetch 2020-08-06 12:16:41 -07:00
Conner Fromknecht 24eba7013c Merge pull request #4509 from CandleHater/patch-2
rpc: add missing space to error message
2020-08-05 11:38:09 -07:00
Conner Fromknecht 0e558cfbed Merge pull request #4506 from Roasbeef/free-list-sync-config-fix
config: make bbolt freelist settings mutually exclusive
2020-08-05 11:37:27 -07:00
Conner Fromknecht f144dea3da Merge pull request #4411 from bhandras/test_channeldb
kvdb+etcd+tests: change etcd flattened bucket key derivation to make it compatible with bbolt
2020-07-31 17:37:13 -07:00
Conner Fromknecht 247b7530ca build/version: use dot syntax for rc 2020-07-29 21:08:47 -07:00
Conner Fromknecht 608617975a build/version: bump to 0.11.0-beta-rc1 2020-07-29 20:13:24 -07:00
Conner Fromknecht 26c363c6c6 Merge pull request #4494 from guggero/travis-sanity-check
travis: add sanity check stage
2020-07-29 17:03:08 -07:00
Conner Fromknecht 22cd1203fe Merge pull request #4431 from Crypt-iQ/unsigned_acked_fix_0702
channeldb/channel.go: remove unsignedAckedUpdatesKey when we receive revocation
2020-07-27 16:19:28 -07:00
Conner Fromknecht 36eb666cb7 Merge pull request #4480 from CandleHater/patch-1
lncli: remove new line from password confirmation
2020-07-27 12:10:47 -07:00
Conner Fromknecht 5b376bfdb8 Merge pull request #4430 from Crypt-iQ/sync_bug_fix_0701
lnwallet/channel.go: restore bug fixes
2020-07-27 11:25:52 -07:00
Conner Fromknecht 53ab22305d zpay32: rename to DefaultAssumedFinalCLTVDelta
This renames the paramter to clarify that this value is only used when
no CLTV value was decoded from the payment request
2020-07-24 13:14:03 -07:00
Conner Fromknecht 6622c4814e multi: enforce routing.MinCLTVDelta=18 for invoices + chanupd
This commit clamps all user-chosen CLTVs in LND to be at least 18, which
is the new conservative value used in the sepc. This minimum is applied
uniformly to forwarding CLTV deltas (via channel updates) as well as
final CLTV deltas for new invoices.
2020-07-24 13:13:56 -07:00
Conner Fromknecht 213c51a281 channeldb/migration_01_to_11: isolate zpay32 decoding
This commit copies over the relevant zpay32 decoding logic to ensure
that our prior migrations aren't affected by upcoming changes to the
zpay32 package, most notably changes to the default final_cltv_expiry
and expiry values.
2020-07-24 13:13:47 -07:00
Conner Fromknecht 73256e6d0e zpay32: fix linter errors in encode/decode 2020-07-24 13:13:39 -07:00
Conner Fromknecht 49c601e62a zpay32: split off encoding/decoding into own files
As a preliminary step to isolating zpay32 in migrations 01-11, we'll
split out the encoding and decoding logic into separate files. Migration
11 only requires invoice decoding, so this prevents us from needing to
copy in the encoding logic that would otherwise be unused.
2020-07-24 13:13:29 -07:00
Conner Fromknecht 0f7c20977b chainntnfs: unit test disabled height hint cache behavior 2020-07-14 19:25:46 -07:00
Conner Fromknecht 47ce718d29 chainntnfs: wrap disabled height hint query logs 2020-07-14 19:25:03 -07:00
Conner Fromknecht 7e08322d40 chainntfns: rename to CacheConfig and QueryDisabled 2020-07-14 19:24:44 -07:00
Conner Fromknecht b907035438 Merge pull request #4412 from aantonop/height_hint_cache_query_disable
New config option - disable height hint cache queries
2020-07-14 18:58:15 -07:00
Conner Fromknecht 2f0ccaead1 Merge pull request #4429 from Roasbeef/i-wumbo-you-wumbo-he-she-wumbo
multi: I wumbo, you wumbo, he she wumbo
2020-07-13 16:06:27 -07:00
Conner Fromknecht 60446494e9 Merge pull request #4157 from carlaKC/2472-newbucketforresolutions
contractcourt: Persist Resolution Outcomes
2020-07-07 12:14:58 -07: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
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
Conner Fromknecht cff52f7622 Merge pull request #4352 from matheusdtech/discovery-lock-premature
discovery: correctly lock premature messages
2020-06-26 22:50:09 -07:00
Conner Fromknecht 20dea0d6bc invoices/invoiceregistry: explicitly set blank pay addr for keysend 2020-06-26 02:17:18 -07:00
Conner Fromknecht 11e9fd3e92 channeldb/invoices: special-case all zeros pay addr
Avoids indexing the all-zeros pay addr, since it is still in use by
legacy keysend. Without this, the pay addr index will reject all but the
first keysend since they will be detected as duplicates within the set
id index.
2020-06-26 02:00:03 -07:00
Conner Fromknecht c1ef5bb908 Merge pull request #4410 from yyforyongyu/remove-fastsha256
htlcswitch: remove fastsha256 in test
2020-06-24 21:09:37 -07:00
Conner Fromknecht 03b20cabd2 Merge pull request #4275 from cfromknecht/invoices-ntfn-order
invoices: ensure ntfns are sent in the same order
2020-06-22 12:15:07 -07:00
Conner Fromknecht 60a6f2ddd1 Merge pull request #4391 from matheusdtech/lnwire-zero-sid
lnwire: fix decoding for initial zero sid
2020-06-18 17:21:43 -07:00
Conner Fromknecht 47cf144170 invoices: ensure ntfns are sent in the same order
SettleHodlInvoice and CancelInvoice both notifyClients after
notifyHodlSubscribers. This commit changes UpdateInvoice to follow the
same pattern so that we are consistent.
2020-06-18 16:28:13 -07:00
Conner Fromknecht f5581eb04a Merge pull request #4370 from wpaulino/no-graph-restored-channels
channeldb: remove graph insertion of restored channels
2020-06-18 16:17:56 -07:00
Conner Fromknecht 5eb798a23e Merge pull request #4365 from Crypt-iQ/chancloser_pkg_0609
lnwallet/chancloser: cooperative channel closure pkg
2020-06-18 13:38:41 -07:00
Conner Fromknecht 87880c0d56 Merge pull request #4141 from guggero/rest-api-improvements
REST saga 3/3: REST API for subservers, websocket for streaming responses
2020-06-17 10:30:29 -07:00
Conner Fromknecht d688ea2124 Merge pull request #4369 from wpaulino/coin-select-lock-sync
rpc: acquire global coin select lock in related RPCs
2020-06-15 10:06:43 -07:00
Conner Fromknecht d47d17b5d4 Merge pull request #4261 from carlaKC/4164-indexpayments
channeldb: Index payments by sequence number
2020-06-10 08:11:45 -07:00
Conner Fromknecht 87d1c37e3c Merge pull request #4356 from wpaulino/sign-key-desc-quirk
signrpc: parse both KeyDescriptor fields for SignOutputRaw requests
2020-06-08 20:16:52 -07:00
Conner Fromknecht 06028ed141 Merge pull request #4358 from matheusdtech/contest-doc
contractcourt/incoming_resolver: Improve comments
2020-06-08 15:12:56 -07:00
Conner Fromknecht 7f258d0213 Merge pull request #4303 from wpaulino/persistent-output-leases
walletrpc: add basic coin selection RPCs
2020-06-03 21:39:15 -07:00
Conner Fromknecht 5e09a5287a lnd: use Infof to format errors on channeldb open 2020-05-27 22:42:46 -07:00
Conner Fromknecht 66652ec4bc channeldb/db: lower-case ErrDryRunMigrationOk message 2020-05-27 22:42:22 -07:00
Conner Fromknecht eae8e6de17 channeldb/invoices: correct stray kvdb.ReadBucket to RBucket
We recently renamed kvdb.ReadBucket to kvdb.RBucket in #4252, but this
was not detected in #4285 since this new code didn't produce a
conflict.
2020-05-27 20:20:29 -07:00
Conner Fromknecht 3faf8bad3f Merge pull request #4320 from guggero/refactor-log-writer
config+log: remove global RootLogWriter variable
2020-05-27 19:25:32 -07:00
Conner Fromknecht 0f3ab775c7 Merge pull request #4285 from cfromknecht/pay-addr-index
channeldb: index payments by payment addr, use payment hash as fallback
2020-05-27 17:36:30 -07:00
Conner Fromknecht 152d153e7f itest: increase mempool timeout
Neutrino can get slow towards the end of the itests.
2020-05-26 19:49:42 -07:00
Conner Fromknecht 5c4ab4b7cf lntest: update error whitelist 2020-05-26 19:49:42 -07:00
Conner Fromknecht cbf71b5452 channeldb+invoices: use payment addr as primary index 2020-05-26 18:55:27 -07:00
Conner Fromknecht 3522f09a08 channeldb+invoices: track invoices by InvoiceRef 2020-05-26 18:55:27 -07:00
Conner Fromknecht 2799202fd9 invoices/invoiceregistry: rename updateCtx to ctx 2020-05-26 18:55:27 -07:00
Conner Fromknecht e80e21d1a8 channeldb/migration: add generic CreateTLB migration
This commit creates a generic migration for creating top-level buckets.
2020-05-26 18:55:27 -07:00
Conner Fromknecht 24cce7a6ec channeldb: consolidate top-level bucket create/wipe 2020-05-26 18:55:27 -07:00
Conner Fromknecht d343575104 channeldb/migtest: log migration failure instead of failing
This line was incorrectly moved when the migtest package was created for
migration 12. This PR introduces a negative test for CreateTLB which
surfaced this.
2020-05-26 18:55:22 -07:00
Conner Fromknecht 32b04b7ac3 Merge pull request #4228 from carlaKC/txdetails-labeltxrpc
walletrpc: add LabelTransaction endpoint to retrospectively label txns
2020-05-26 18:37:27 -07:00
Conner Fromknecht d0f3f6166d lntest/itest: add link error to whitelist 2020-05-26 18:21:08 -07:00
Conner Fromknecht ef9068319b multi: rename ReadCursor to RCursor 2020-05-26 18:21:08 -07:00
Conner Fromknecht 455ddfebdb multi: rename: ReadBucket to RBucket 2020-05-26 18:21:08 -07:00
Conner Fromknecht d0d2ca403d multi: rename ReadTx to RTx 2020-05-26 18:20:37 -07:00
Conner Fromknecht 6a02fa1107 invoices/invoiceregistry: properly synchronize backlog
This commit moves the db calls for retrieving add and settle backlogs
outide of the main event loop. All other db operations are performed
outside of the event loop and synchronized via the invoice registry's
mutex, which also synchronizes the order in which events submitted to be
processed.

This resolves various concurrency issues where notifications can be
missed of inconsistent reads against the databse. This is especially
important in this case because we are actually making two separate
database calls.
2020-05-26 17:50:46 -07:00
Conner Fromknecht 5b747715fc invoices: return error from SubscribeNotifications on shutdown 2020-05-26 17:50:45 -07:00
Conner Fromknecht 1332575482 channeldb/invoices: ignore error when no settles exist
This fixes a bug that would cause no backlog to be delivered at all.
2020-05-26 17:50:45 -07:00
Conner Fromknecht 64b8aa8f11 Merge pull request #4227 from guggero/signing-abstraction
multi: Remove need for DerivePrivKey from watchtower, brontide, netann and sphinx package
2020-05-20 16:07:44 -07:00
Conner Fromknecht afc60353a1 Merge pull request #4213 from carlaKC/txdetails-addlabel
lnrpc: add optional labels to on chain transactions
2020-05-19 14:44:55 -07:00
Conner Fromknecht 2f84d1a819 Merge pull request #4280 from cfromknecht/read-for-each-node
channeldb: remove Tx arg from ForEachNode
2020-05-13 16:37:10 -07:00
Conner Fromknecht 90d3bf532d channeldb+routing: remove tx arg for ForEachNode 2020-05-12 17:53:20 -07:00
Conner Fromknecht b6915d9fbf Merge pull request #3892 from matheusdtech/fix-lingering-contract
contractcourt: fix lingering contract after local breach
2020-05-12 11:46:26 -07:00
Conner Fromknecht c57d0797aa Merge pull request #4220 from guggero/github-actions
github: add GitHub Actions configuration
2020-05-11 15:53:28 -07:00
Conner Fromknecht 4f6cef83fc config: adds cli configurable --migration-dry-run 2020-05-11 15:38:56 -07:00
Conner Fromknecht c775819372 channeldb/db: adds optional dry-run abort for migrations 2020-05-11 15:38:45 -07:00