Commit Graph
100 Commits
Author SHA1 Message Date
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
Olaoluwa Osuntokun fd00a3a5e7 Merge pull request #4794 from halseth/bork-channels-revert
htlcswitch/link: revert borking channels on received Errors
2020-11-23 17:26:43 -08:00
Olaoluwa Osuntokun 0e14e0d904 Merge pull request #4768 from halseth/htlcdust-calc
Correct HTLC dust calculation for remote commitment weight
2020-11-19 19:55:02 -08:00
Olaoluwa Osuntokun 39fb53bc94 Merge pull request #4769 from guggero/gh-docker-build
GitHub: add workflow for building tagged docker images
2020-11-19 19:40:55 -08:00
Olaoluwa Osuntokun 17976df658 Merge pull request #4773 from alexbosworth/patch-14
docs: Add mention of support for Neutrino
2020-11-16 17:56:42 -08:00
Olaoluwa Osuntokun e63f41c936 Merge pull request #4762 from carlaKC/4748-sweeps
multi: update listsweeps to allow sweeps that are not in ListTransactions
2020-11-16 17:55:41 -08:00
Olaoluwa Osuntokun e4f0f2aa69 Merge pull request #4667 from guggero/auto-compact
channeldb/kvdb/bolt: automatically compact database on startup
2020-11-16 17:50:14 -08:00
Olaoluwa Osuntokun c0247583cd Merge pull request #4697 from carlaKC/4481-batchstartandblocks
contractcourt: batch startup reads and block epoch notifications
2020-11-13 16:16:39 -08:00
Olaoluwa Osuntokun 7afb5b4c95 Merge pull request #4751 from Roasbeef/static-key-require
feature: flip static remote key from optional to required
2020-11-13 16:15:39 -08:00
Olaoluwa Osuntokun 219a5f03e0 Merge pull request #4744 from guggero/dns-seed-config
discovery: allow DNS seeds to be overwritten
2020-11-13 16:12:44 -08:00
Olaoluwa Osuntokun 99b0913562 Merge pull request #3672 from breez/invoice-hints
Allow user specify routing hints in private invoice.
2020-11-11 19:57:49 -08:00
Olaoluwa Osuntokun c2bba7ed71 Merge pull request #4691 from joostjager/sendtoroute-status-code
routerrpc: map errors to grpc status code
2020-11-11 19:51:45 -08:00
Olaoluwa Osuntokun 58f72df94a Merge pull request #4715 from guggero/reset-wallet
Implement btcwallet's "dropwtxmgr" command as --reset-wallet-transactions flag
2020-11-11 19:50:21 -08:00
Olaoluwa Osuntokun 3825b9e463 feature: flip static remote key from optional to required
It's been sometime since we introduced this new safety enhancing feature
bit. At this point, we're now moving to require it as it makes our SCB
recovery system more robust, and it's also an implicit feature bit for
for anchor commitments as they're defined now.
2020-11-11 19:45:37 -08:00
Olaoluwa Osuntokun 05592ad3ba Merge pull request #4755 from carlaKC/4669-nonlockedcall
multi: use bitcoind uptime api for healthcheck
2020-11-11 17:47:51 -08:00
Olaoluwa Osuntokun 9042a79db2 Merge pull request #4683 from carlaKC/4471-acceptorupfrontshutdown
channelacceptor: add new fields to acceptor response
2020-11-11 17:43:52 -08:00
Olaoluwa Osuntokun 36556cb772 Merge pull request #4753 from C-Otto/master
README: remove stray [
2020-11-10 17:41:13 -08:00
Olaoluwa Osuntokun 339a9d3915 Merge pull request #4754 from carlaKC/chainreg-uselogger
chainreg: register logger
2020-11-09 11:48:51 -08:00
Olaoluwa Osuntokun 4f4adab1dc Merge pull request #4738 from positiveblue/fix-wordlist-check
aezeed: fix mnemonic word validation
2020-11-06 13:19:23 -08:00
Olaoluwa Osuntokun 0552ba93c8 Merge pull request #4655 from guggero/itest-parallel
Travis: run itests in parallel, get ~60% speedup overall
2020-11-04 16:16:49 -08:00
Olaoluwa Osuntokun fbb430ad82 Merge pull request #4703 from wpaulino/is-synced-timestamp-inconsistency
btcwallet: return chain best timestamp while backend is syncing
2020-11-03 17:35:27 -08:00
Olaoluwa Osuntokun 297c614126 Merge pull request #4701 from carlaKC/4581-removeexperimential
multi: remove experimential build flag for assumechanvalid
2020-11-03 17:34:50 -08:00
Olaoluwa Osuntokun 21b9f24d28 Merge pull request #4675 from champo/sphinx_interceptor
htlcswitch,rpc: expose onion blob for intercepts
2020-11-03 17:30:21 -08:00