Commit Graph
100 Commits
Author SHA1 Message Date
Olaoluwa Osuntokun 95650c7d63 build: add darwin-arm64 (M1 Apple Silicon) as a release target 2021-04-13 15:57:24 -07:00
Olaoluwa Osuntokun af0fc09f62 multi: update build systems and CI/CD to go 1.16 2021-04-13 15:57:21 -07:00
Olaoluwa Osuntokun c27e9ab953 build+lncfg: support pruned bitcoind backends (#5154)
* build: update btcwallet dependency introducing pruned bitcoind support

This is achieved by some recent work within the BitcoindClient enabling
it to retrieve pruned blocks from its server's peers.

* lncfg: add new PrunedNodeMaxPeers config option/flag
2021-04-08 16:35:07 -07:00
Olaoluwa Osuntokun c998264578 Merge pull request #5108 from cfromknecht/sendtoroute-amp
channeldb+invoices: add spontaneous AMP receiving + sending via SendToRoute
2021-04-07 16:37:23 -07:00
Olaoluwa Osuntokun 1ccf6ed7d4 Merge pull request #5063 from Crypt-iQ/pprof_patch_03022021
lnd: optionally serve pprof on localhost for better security
2021-04-05 20:20:39 -07:00
Olaoluwa Osuntokun ca96e66b43 Merge pull request #5116 from joostjager/mc-deadlock
routing: fix mission control deadlock
2021-04-05 20:02:57 -07:00
Olaoluwa Osuntokun d8ecc16eb0 Merge pull request #5047 from wpaulino/import-account-or-pubkey
multi: support derived public key import
2021-04-05 19:41:11 -07:00
Olaoluwa Osuntokun a329c80612 Merge pull request #5133 from wpaulino/routing-validation-cancel-deps
discovery+routing: cancel dependent jobs if parent validation fails
2021-04-01 18:32:58 -07:00
Olaoluwa Osuntokun e7400dfb2b Merge pull request #4933 from halseth/router-delay-zombie-pruning
routing: delay initial zombie prune by 30 sec
2021-03-31 13:22:36 -07:00
Olaoluwa Osuntokun 6d722662ae Merge pull request #4704 from yyforyongyu/4308-fix-sats-vbyte
lnrpc+lncli: fix sat per virtual byte
2021-03-31 13:19:56 -07:00
Olaoluwa Osuntokun f4530d67cb build: update to latset version of neutrino
In this commit, we update to the latest version of neutrino that
includes some GC/perf optimizations when syncing, an exposed block
cache, and also additional filter verification for downloaded filters.
2021-03-25 18:20:42 -07:00
Olaoluwa Osuntokun fcc0dec741 cmd/lncli: add missing context import 2021-03-25 17:49:13 -07:00
Olaoluwa Osuntokun 24d1d9cb14 Merge pull request #5095 from bottlepay/wtxmgr-parameterized-lock
lnwallet+walletrpc: list leases and parameterize duration
2021-03-25 17:31:13 -07:00
Olaoluwa Osuntokun b4b7f29724 Merge pull request #5102 from yyforyongyu/fix-send-cli
lncli+lnrpc: add payment address to sendpayment
2021-03-24 18:02:53 -07:00
Olaoluwa Osuntokun a9afd86a5b Merge pull request #5127 from alexbosworth/patch-15
rpcserver: revert target conf to previous behavior
2021-03-24 16:53:17 -07:00
Olaoluwa Osuntokun 901c192e9f lnrpc/routerrpc: use x prefix as REST sub-path for ImportMissionControl
A small change to better indicate that this is a different class of RPCs
on the REST interface.
2021-03-23 16:41:00 -07:00
Olaoluwa Osuntokun abea1146a6 Merge pull request #5120 from Roasbeef/invoice-deletion-errors
channeldb: return more detailed errors in DeleteInvoice
2021-03-23 16:14:23 -07:00
Olaoluwa Osuntokun 6f3e14a545 Merge pull request #5061 from carlaKC/4483-importmissioncontrol
routing: add mission control import rpc
2021-03-23 15:22:27 -07:00
Olaoluwa Osuntokun 0a1d592cf9 channeldb: return more detailed errors in DeleteInvoice
This PR was created in order to help to debug the failures in:
https://github.com/lightningnetwork/lnd/issues/5113

We add some more contextual errors so we can figure out where the
assumptions of the current scan to delete function in the invoice
registry is incorrect.
2021-03-17 14:22:46 -07:00
Olaoluwa Osuntokun 65b0bbcd53 Merge pull request #5033 from robot-dreams/set-channel-status
Add lncli command / RPC for manually setting channel state
2021-03-09 18:12:08 -08:00
Olaoluwa Osuntokun dd13dbe613 Merge pull request #5072 from cfromknecht/fix-tlv-bench
tlv: fix ESatPerKw in benchmark
2021-03-09 16:42:58 -08:00
Olaoluwa Osuntokun 3c14e3d71d Merge pull request #4517 from Crypt-iQ/2659_keyloc
multi: store KeyLocator in OpenChannel, use ECDH instead of DerivePrivKey
2021-03-05 16:12:49 -08:00
Olaoluwa Osuntokun 055db6b9ac Merge pull request #5069 from Roasbeef/v12-99
build: bump version to v0.12.99-beta
2021-03-03 16:24:51 -08:00
Olaoluwa Osuntokun 75eca3a595 Merge pull request #4923 from halseth/the-great-tlv-wire-migration
The great tlv wire migration of 2021
2021-03-03 16:24:31 -08:00
Olaoluwa Osuntokun 6c3d3711f6 build: bump version to v0.12.99-beta
In this commit we bump the version to v0.12.99-beta to reflect that the
master branch is a super set of the recently released v0.12.1-beta.
2021-03-03 15:49:22 -08:00
Olaoluwa Osuntokun 660d37a335 Merge pull request #5049 from Crypt-iQ/commitFee_check_0222
lnd+lnwallet: make capacity check stricter by adding fee
2021-02-24 19:01:34 -08:00
Olaoluwa Osuntokun 9a6bb19770 lnwire: prep wire messages for TLV extensions
Messages:
- UpdateFulfillHTLC
- UpdateFee
- UpdateFailMalformedHTLC
- UpdateFailHTLC
- UpdateAddHTLC
- Shutdown
- RevokeAndAck
- ReplyShortChanIDsEnd
- ReplyChannelRange
- QueryShortChanIDs
- QueryChannelRange
- NodeAnnouncement
- Init
- GossipTimestampRange
- FundingSigned
- FundingLocked
- FundingCreated
- CommitSig
- ClosingSigned
- ChannelUpdate
- ChannelReestablish
- ChannelAnnouncement
- AnnounceSignatures

lnwire: update quickcheck tests, use constant for Error

multi: update unit tests to pass deep equal assertions with messages

In this commit, we update a series of unit tests in the code base to now
pass due to the new wire message encode/decode logic. In many instances,
we'll now manually set the extra bytes to an empty byte slice to avoid
comparisons that fail due to one message having an empty byte slice and
the other having a nil pointer.
2021-02-24 17:31:55 +01:00
Olaoluwa Osuntokun a603ac4938 lnwire: create new ExtraOpaqueData type for parsing TLV extensions
In this commit, we create a new `ExtraOpaqueData` based on the field
with the same name that's present in all the announcement related
messages. In later commits, we'll embed this new type in each message,
so we'll have a generic way to add/parse TLV extensions from messages.
2021-02-24 17:31:55 +01:00
Olaoluwa Osuntokun dd6f0ba931 discovery+lnwire: remove embedding within ReplyChannelRange
In order to prep for allowing TLV extensions for the `ReplyChannelRange`
and `QueryChannelRange` messages, we'll need to remove the struct
embedding as is. If we don't remove this, then we'll attempt to decode
TLV extensions from both the embedded and outer struct.

All relevant call sites have been updated to reflect this minor change.
2021-02-24 17:31:55 +01:00
Olaoluwa Osuntokun c6a8816043 channeldb: mark ApplyMigration as a test helper
With this change, errors from migrations will have the proper local line
number.
2021-02-24 14:34:57 +01:00
Olaoluwa Osuntokun 203a669578 Merge pull request #5043 from cfromknecht/reduce-concurrent-router-validation
routing: dial back max concurrent block fetches
2021-02-18 16:36:57 -08:00
Olaoluwa Osuntokun 7f68e961e6 Merge pull request #5046 from cfromknecht/ws-close-whitelist
lntest/itest: add websocket close to error whitelist
2021-02-18 16:27:35 -08:00
Olaoluwa Osuntokun db69331db9 cmd/lncli: add max shard size parsing for payment commands 2021-02-15 19:31:58 -08:00
Olaoluwa Osuntokun b73a6e2c61 routing: if MaxShardAmt is set, then use that as a ceiling for our splits
In this commit, we thread through the necessary state to allow users to
set a max shard amount. If this value is set, then this'll effectively
serve as a ceiling for all our split attempts. If we need to split,
we'll first try to use `paymentAmt/2`, if that's bigger than
`MaxShardAmt, then we'll use the latter instead.

Ideally in the future we have a dynamic way to automatically set both
the `MaxShardAmt` as well as `MaxParts` for users. Until then exposing
these two new fields will allow us to experiment with setting them
automatically using the RPC interface, and also give users a bit more
control over how we attempt to route payments, akin to coin control for
on-chain payments.

Fixes #4730
2021-02-15 19:31:52 -08:00
Olaoluwa Osuntokun 7398e59927 lnrpc/routerrpc+routing: add new MaxShardAmt field to LightningPayment 2021-02-15 19:31:49 -08:00
Olaoluwa Osuntokun c70e53c791 lnrpc/routerrpc: add new max_shard_size_msat field to SendPaymentRequest 2021-02-15 19:31:46 -08:00
Olaoluwa Osuntokun d5cf6043e6 lnrpc/routerrpc: use new default value of 16 for maxparts
In this commit, we raise the default value for the `MaxParts` field from
1 to 16. This change was motivated by the fact that many users either
forget, or don't even know this field is there in the first place. A
value of 16 was chosen rather arbitraliy (other than power of 2). In
the future, we should tune this value based on the expected number of
payment attempts for a given payment amount.
2021-02-15 19:31:43 -08:00
Olaoluwa Osuntokun 3ad8b86bac Merge pull request #5007 from Roasbeef/ipv6-tor-parse-fix
lncfg: add IPv6 resolution bypass & account for local hostname aliases
2021-02-10 23:49:47 -08:00
Olaoluwa Osuntokun 7b0ea3c029 Merge pull request #4909 from carlaKC/mc-paramsapi
routing: allow runtime updates to mission control config
2021-02-10 18:51:53 -08:00
Olaoluwa Osuntokun e41091a765 lncfg: detect tor resolution error case and fallback to system resolver
In this commit, we fix a bug that would cause resolution of items in
/etc/hosts (or the like) to fail as Tor wouldn't recognize them as
proper host names. With this commit, we'll catch this error and fall
back to the system's resolver.
2021-02-10 18:36:57 -08:00
Olaoluwa Osuntokun 099efadd92 lncfg: use net.ParseIP to detect IPv6 addresses 2021-02-10 18:35:53 -08:00
Olaoluwa Osuntokun 355b6a260f Merge pull request #4964 from halseth/gossip-local-no-batch
channeldb+routing+gossiper: add local updates to graph immediately
2021-02-10 18:00:47 -08:00
Olaoluwa Osuntokun 503536c1e4 Merge pull request #5003 from Roasbeef/premature-upd-revert
Revert "Merge pull request #4895 from wpaulino/disallow-premature-cha…
2021-02-10 14:44:18 -08:00
Olaoluwa Osuntokun 555de44d9f Revert "Merge pull request #4895 from wpaulino/disallow-premature-chan-updates"
This reverts commit 6e6384114c, reversing
changes made to 98ea433271.
2021-02-09 19:55:45 -08:00
Olaoluwa Osuntokun 5cec468ff4 Merge pull request #4996 from carlaKC/itest-privatehodl
itest: add coverage for hold invoices with hop hints
2021-02-08 16:56:21 -08:00
Olaoluwa Osuntokun 15bdff714c Merge pull request #4979 from Roasbeef/payment-addr-only-unit-test
routing: add new TestPaymentAddrOnlyNoSplit test case
2021-02-03 19:46:42 -08:00
Olaoluwa Osuntokun 12f5d45e68 Merge pull request #4976 from cfromknecht/make-rpc-non-quiet
gen_protos_docker: make image build non-quiet
2021-02-03 19:15:24 -08:00
Olaoluwa Osuntokun 75c4f24ebf Merge pull request #4961 from Roasbeef/ci-go-1-15-7
build: update CI builds to use go 1.15.7
2021-02-03 17:59:54 -08:00
Olaoluwa Osuntokun 107f19a049 routing: add new TestPaymentAddrOnlyNoSplit test case
This test case ensures that we won't try to split payment if the dest
has the payment addr bit, but NOT the mpp optional/require bit.
2021-02-03 17:53:40 -08:00
Olaoluwa Osuntokun 27c1779757 routing: allow custom dest feature bits in integratedRoutingContext.testPayment
This is a preparatory commit for a new test to ensure that if a node
only has the TLV and payment addr feature bits, we don't try to split a
payment.
2021-02-03 17:53:32 -08:00
Olaoluwa Osuntokun 301f1a870e Merge pull request #4924 from champo/check_payreq_multipart
routerrpc,routing: limit max parts if the invoice doesn't declare MPP support
2021-02-03 16:53:49 -08:00
Olaoluwa Osuntokun caac0e6347 build: update CI builds to use go 1.15.7 2021-02-03 16:51:40 -08:00
Olaoluwa Osuntokun 9614626e2e Merge pull request #4944 from xplorfin/clang-format-mac
docs: Add clang-format instructions for mac
2021-01-27 17:00:53 -08:00
Olaoluwa Osuntokun 8911a18b89 Merge pull request #4938 from motorina0/issue_4937
docker: add an extra listener for localhost
2021-01-27 16:58:46 -08:00
Olaoluwa Osuntokun d10d1cbd86 Merge pull request #4162 from cfromknecht/amp-keys
amp: introduce child preimage and hash derivation
2021-01-27 16:25:25 -08:00
Olaoluwa Osuntokun d176d2d65f build: bump version to v0.12.0-beta 2021-01-26 17:31:07 -08:00
Olaoluwa Osuntokun 578b348a50 build: update Docker versions to Go 1.15.7
This updates the Docker files to the latest minor release of Go which
included some security fixes.
2021-01-26 17:29:10 -08:00
Olaoluwa Osuntokun b20afc0679 build: bump version to v0.12.0-beta.rc6 2021-01-19 19:11:54 -08:00
Olaoluwa Osuntokun 8b8fa7d14a docs/release: add new command to use when signign release manifest 2021-01-19 19:10:21 -08:00
Olaoluwa Osuntokun b2857bf392 Merge pull request #4914 from guggero/docker-verification
docker: add verification script
2021-01-18 15:29:15 -08:00
Olaoluwa Osuntokun ff897db293 Merge pull request #4901 from bhandras/etcd_itest_ci
etcd+itests: use itest generated ports for embedded etcd and add etcd itests to travis CI
2021-01-14 17:53:54 -08:00
Olaoluwa Osuntokun 90a05ae41c Merge pull request #4918 from halseth/itest-bounds-error
itest: fix node names out of bounds
2021-01-14 17:38:08 -08:00
Olaoluwa Osuntokun b152232544 Merge pull request #4921 from carlaKC/healthcheck-bump
config: increase chain backend healthcheck timeout and backoff
2021-01-14 17:37:01 -08:00
Olaoluwa Osuntokun f62bc971c0 build: bump version to v0.12.0-beta.rc5 2021-01-08 16:30:43 -08:00
Olaoluwa Osuntokun c6fe36465b build: bump version to v0.12.0-beta.rc4 2021-01-07 15:58:15 -08:00
Olaoluwa Osuntokun b85c92d8d5 lnrpc/routerrpc: add payment addr to SendPaymentRequest
Fixes #4692
2021-01-05 19:04:57 -08:00
Olaoluwa Osuntokun f3b23b8046 build: bump version to v0.12.0-beta.rc3 2020-12-31 15:58:17 -08:00
Olaoluwa Osuntokun 9cd9bff59f build: bump version to v0.12.0-beta.rc2 2020-12-18 16:27:14 -08:00
Olaoluwa Osuntokun 403d37f426 peer: ensure consistent local+global feature bits when downgrading
In this commit, we fix an issue that would cause peers running lnd 0.12
to not be able to connect to existing peers due to a feature bit
compatibility issue. In a recent PR we started to downgrade our required
feature bit for static key from required to optional, if we had a legacy
(non-tweakless) open with the peer then we would unset the required bit
and set the optional bit to ensure we could still connect to them.

The change implementing this new version of downgrade failed _also_
unset the bit (the required bit) in the "legacy global" feature bit
section. This caused the `RawFeatureVector.Merge` method to fail as we
would have the required bit set in the `GlobalFeatures` section, but the
optional bit set in the `Features` section. The `Merge` method ensures
that a required and optional bit can't be set in two different locations
for the same feature.

This PR fixes this issue by also unsetting the bit in the
`GlobalFeatures` field in the init message.

Fixes #4871
2020-12-17 17:04:15 -08:00
Olaoluwa Osuntokun f9641cdc64 build: bump version to v0.12.0-beta.rc1 2020-12-15 14:30:36 -08:00
Olaoluwa Osuntokun 90a45fe2cf Merge pull request #4861 from guggero/go-version-update
GitHub+Travis+docker: update golang patch version to 1.15.6 everywhere
2020-12-14 12:31:35 -08:00
Olaoluwa Osuntokun 04e02a57ca Merge pull request #4852 from guggero/docker-arm
GitHub: specify docker image platforms to enable ARM image builds
2020-12-11 14:30:18 -08:00
Olaoluwa Osuntokun a623979e8f Merge pull request #4856 from cfromknecht/lowscrypt-race
make: use low-scrypt + parallelization to speed up  unit-race
2020-12-11 14:29:17 -08:00
Olaoluwa Osuntokun 7c848baa52 Merge pull request #4858 from lightningnetwork/update-go-version-actions
actions: update to GO_VERSION 1.15.6
2020-12-11 14:28:01 -08:00
Olaoluwa Osuntokun 9554ea8d74 Merge pull request #4859 from guggero/neutrino-err-fix
itest: add neutrino errors to whitelist
2020-12-11 14:26:41 -08:00
Olaoluwa Osuntokun 62a5cdbc60 Merge pull request #4857 from cfromknecht/meta-index-reinit
channeldb+tlv: add channel meta-index
2020-12-10 18:08:43 -08:00
Olaoluwa Osuntokun 415680a1b9 Merge pull request #4854 from Roasbeef/neutrino-addrv2
build: update to addrv2 aware neutrino version
2020-12-10 15:36:43 -08:00
Olaoluwa Osuntokun 50323dcd56 chainreg: require FeeUrl when running neutrino mainnet
Fixes #4770.
2020-12-09 20:59:27 -08:00
Olaoluwa Osuntokun 8d8b13a7d1 build: update to addrv2 aware neutrino version 2020-12-09 20:59:17 -08:00
Olaoluwa Osuntokun c95c423703 Merge pull request #4838 from halseth/sweeper-input-script-ordering
sweep/txgenerator: fix input witness ordering
2020-12-08 20:03:05 -08:00
Olaoluwa Osuntokun fe2b40d7ad Merge pull request #4850 from cfromknecht/increase-recovery-htlc-amt
itest: increase recovery payment amount so htlc isn't dust
2020-12-08 19:18:32 -08:00
Olaoluwa Osuntokun c58589db3b Merge pull request #4815 from cfromknecht/wtclient-key-segregation
wtdb+wtclient: segregate session-key-index reservations by blob-type
2020-12-02 20:33:38 -08:00
Olaoluwa Osuntokun 44d84852cb github: remove CODEOWNERS file
Since it was added, we never maintained the file leading to decay in the
set of "actual" code owners. In practice, the current set up ends up
assign most reviews to 2 or so active contributors. I think the idea
itself is sound, but the current implementation leads to certain
reviewers being over-assigned PRs, which at times causes those PRs to
stagnate since pretty much every PR gets assigned to the same set of
people.
2020-12-01 18:48:00 -08:00
Olaoluwa Osuntokun 94f8311667 Merge pull request #4782 from cfromknecht/anchor-wtserver
watchtower: anchor channel support
2020-11-30 17:49:32 -08:00
Olaoluwa Osuntokun 39d2ea752e Merge pull request #4789 from cfromknecht/wt-clean-shutdown
wtclient: schedule ForceQuit first during Stop
2020-11-30 17:03:18 -08:00
Olaoluwa Osuntokun 447c9f2c0b lntest: always turn off gossip throttling for nodes created in itests 2020-11-30 16:39:06 -08:00
Olaoluwa Osuntokun 13a2598ded discovery: add new option to toggle gossip rate limiting
In this commit, we add a new option to toggle gossip rate limiting. This
new option can be useful in contexts that require near instant
propagation of gossip messages like integration tests.
2020-11-30 16:38:56 -08:00
Olaoluwa Osuntokun b1fbbcf562 lncfg: add new legacy protocol option to turn off gossip throttling 2020-11-30 16:38:53 -08:00
Olaoluwa Osuntokun 7e298f1434 Merge pull request #3367 from cfromknecht/batched-graph-updates
Batched graph updates
2020-11-25 18:40:40 -08:00
Olaoluwa Osuntokun cefbf5f637 Merge pull request #4786 from wpaulino/rate-limit-channel-updates
discovery: rate limit incoming channel updates
2020-11-25 17:07:21 -08:00
Olaoluwa Osuntokun 7c6db24b89 Merge pull request #4777 from guggero/gh-release-build
GitHub: build release binaries and upload to release
2020-11-25 16:46:52 -08:00
Olaoluwa Osuntokun 8921f81d97 Merge pull request #4752 from Roasbeef/require-payment-addr
features+invoices: force MPP payload inclusion for non-keysend payments
2020-11-25 16:43:18 -08:00
Olaoluwa Osuntokun 4e079d1d20 lntest/itest: fix SendToRoute in UpdateChanPolicy test
It needs to include the MPP payload  now.
2020-11-25 16:32:15 -08:00
Olaoluwa Osuntokun 7fdf46ea4e lntest/itest: update SendToRoute tests to include payment addr 2020-11-25 16:32:09 -08:00
Olaoluwa Osuntokun 43fc84919e lnrpc: include payment addr in main Invoice proto
With this change ListInvoices will return the payment addr, and the
response to AddInvoice will as well.
2020-11-25 16:32:05 -08:00
Olaoluwa Osuntokun d996607470 routing+lnrpc: extend BuildRoute to accept raw payAddr
In this commit, we extend the `BuildRoute` method and RPC on the router
sub-server to accept a raw payment address which will be included as
part of an MPP payload for the finla hop. This change actually also
allows users to craft their own MPP paths using BuildRoute+SendToRoute.
Our primary goal however, was to fix some broken itests since we now
require the payAddr to be present for ALL payments other than key send
payments.
2020-11-25 16:32:02 -08:00
Olaoluwa Osuntokun 530059f18b invoices: force MPP payload inclusion for non-keysend payments
In this commit, we move to start rejecting any normal payments that
aren't keysend, if they don't also include the MPP invoice payload. With
this change, we require that some sort of e2e secret (either the payment
addr or the keysend pre-image) is present in a payload before we'll
accept the payment.

The second portion of the commit also updates all current tests in the
package. We kept the base `TestSettleInvoice` test in-tact as it still
exercises some useful behavior. However, we've removed all cases that
allow an overpayment, as the new MPP logic doesn't allow overpayment for
various reasons. In addition to this, some of the returned errors are
slightly different, tho the actual behavior is equivalent.
2020-11-25 16:31:59 -08:00
Olaoluwa Osuntokun baeceb2a0b lnwire: add new RequiresFeature method
In this commit, we add a new RequiresFeature method to the feature
vector struct. This method allows us to check if the set of features
we're examining *require* that the even portion of a bit pair be set.
This can be used to check if new behavior should be allowed (after we
flip new bits to be required) for existing contexts.
2020-11-25 16:31:56 -08:00
Olaoluwa Osuntokun 82ccab606c feature: flip the required bit for payment addr in invoices/payload
In this commit, we move to start requiring the payment addr feature bit
in the invoices we produce. With this change, if a user attempts to pay
one of our invoices (assuming they're also an lnd node), then they'll
receive an error when they attempt to pay. At this point, *most* lnd
nodes should be on v0.11 at this point, and this change will notify any
lagging wallet authors to update, as these payments are generally more
secure.
2020-11-25 16:31:50 -08:00
Olaoluwa Osuntokun 7f9f4a7c8d Merge pull request #4790 from guggero/old-pr-cleanup
multi: take over multiple small stale PRs
2020-11-23 18:40:53 -08:00