Commit Graph
14105 Commits
Author SHA1 Message Date
bitromortac 045e5cf307 routerrpc: update QueryProbability documentation
Changes the docstring of QueryProbability to reflect changes that were
introduced in #6857.
2023-01-11 16:47:54 +01:00
Oliver Gugger b1d6991b27 Merge pull request #7153 from carlaKC/7093-custommessage
multi: Add ability to handle protocol-range messages in Custom Message APIs
2023-01-11 09:52:40 +01:00
Oliver Gugger ef8cf73d4c Merge pull request #7295 from guggero/build-cache
GitHub: fix Golang build cache in actions
2023-01-06 14:11:34 +01:00
Oliver Gugger f16a2f11df docs: add release notes 2023-01-06 09:18:28 +01:00
Oliver Gugger a074c801d1 GitHub: add job ID to cache key
To avoid the problem where multiple jobs try to create the same cache
entry, we add the GitHub job ID to the cache key.
The two restore keys make it possible that a job can also restore a
cache entry from another job if none for the current job exist yet.
2023-01-06 09:18:28 +01:00
Oliver Gugger 984fc3a2ec GitHub: make setup-go action more versatile
With this commit we allow the Go version that is set up to be
configurable and not dependent on a specific environment variable. This
will allow us to eventually extract the action into a tooling
repository.
2023-01-06 09:18:26 +01:00
Oliver Gugger c4ca7b99e2 GitHub: remove Go env variable override
For some reason we used to override the GOCACHE and GOPATH variables
earlier. This now causes the updated cache action not to pick up any
caches. As the overrides shouldn't be needed anymore, we remove them.
2023-01-06 09:18:16 +01:00
Carla Kirk-Cohen 19f013b5c4 release-notes: add send custom message override functionality 2023-01-05 12:06:25 -05:00
Carla Kirk-Cohen 1b1bc642bc lntest/itest: add custom messaging itest including new override feature 2023-01-05 12:06:24 -05:00
Carla Kirk-Cohen 1cb08e42ef lnrpc: update custom message API to explain ability to override 2023-01-05 12:05:06 -05:00
Carla Kirk-Cohen c2ce8635e7 multi: add custom message overrides to protocol config options 2023-01-05 12:05:05 -05:00
Carla Kirk-Cohen 93dcbd7ea3 lnwire: allow overriding of protocol messages outside of custom range
Add the ability to specify messages < CustomRangeStart that will still
be treated like custom messages by lnd (rather than unknown ones). This
allows code external to lnd to handle protocol messages that are *not
yet known to lnd*.
2023-01-05 12:05:04 -05:00
Carla Kirk-Cohen 610f5d2140 lnwire: make custom type start a constant 2023-01-05 12:05:03 -05:00
Oliver Gugger cfc48bd81c Merge pull request #7272 from positiveblue/fix-7270
rpc: check that closing address matches the current network for open channel requests
2023-01-05 17:15:55 +01:00
Oliver Gugger 272ed415c2 Merge pull request #7289 from guggero/disable-thelper-linter
lint: disable `thelper` linter
2023-01-05 15:40:39 +01:00
Oliver Gugger 6585d5997a docs: add release notes 2023-01-05 08:53:59 +01:00
Oliver Gugger 04dc37e463 lnwire: remove nolint comment 2023-01-05 08:49:31 +01:00
Oliver Gugger 99ebb67972 lint: disable thelper linter 2023-01-05 08:49:17 +01:00
Olaoluwa Osuntokun e29a5a59ad Merge pull request #7262 from bottlepay/fix-failure-tlv
lnwire: limit channel update reader
2023-01-04 18:41:44 -08:00
positiveblue 292ee1b123 docs: add release notes 2023-01-04 04:42:40 -08:00
positiveblue 2204cbfd30 rpc: validate closing channel address in open channel requests
Our OpenChannelRPC was accepting invalid values for the closing address
field. If we were able to decode the address we would use it in the
script even if the address is for another bitcoin net.
2023-01-04 04:42:39 -08:00
Joost Jager 3835b903a9 lnwire: limit channel update reader
Fixes a bug where channel update data is read until the end of the stream
rather than stopping after the specified length. This is problematic
when failure message tlv data is present, because this data is interpreted
as channel update tlv data.
2023-01-04 13:32:52 +01:00
Oliver Gugger c03de26dcc Merge pull request #7268 from ellemouton/avoidPanicInFundingTest
funding: check error to avoid panic during test
2023-01-03 16:32:32 +01:00
Oliver Gugger 3ffd3b2018 Merge pull request #7176 from b-ryan/fix-bumpfee-doc
Fix bumpfee command doc, incorrect reference to pendingsweeps
2023-01-03 11:22:52 +01:00
Oliver Gugger 73328bd449 Merge pull request #7271 from hieblmi/patch-4
docs: Fix lnd.conf typo
2023-01-03 11:08:48 +01:00
Slyghtning c5fa9ef45f docs: Fix lnd.conf typo
Remove repeated word error [skip ci]
2022-12-28 20:37:03 +10:30
Elle Mouton d4a49b08f5 funding: check error to avoid panic during test
This commit, the error returned from `getInitialFwdingPolicy` is checked
in order to avoid a nil pointer dereference panic during the
TestFundingManagerCustomChannelParameters test.
2022-12-22 10:06:42 +02:00
Olaoluwa Osuntokun de3e0d7875 Merge pull request #7239 from Roasbeef/gossip-scoping-issues
discovery: ensure we prioritize sending out our own local announcements
2022-12-16 13:51:17 -08:00
Olaoluwa Osuntokun 050db16e5d docs/release-notes: add release notes for gossip msg prioritization 2022-12-15 11:56:49 -08:00
Olaoluwa Osuntokun f94a67a26d discovery: properly set the isRemote field for validated networkMsg
This wasn't set properly, leading to some test failures after the prior
change.
2022-12-15 11:56:44 -08:00
Olaoluwa Osuntokun 52451b37af discovery: ensure we prioritize sending out our own local announcements
In this commit, we modify our gossip broadcast logic to ensure that we
always will send out our own gossip messages regardless of the
filtering/feature policies of the peer.

Before this commit, it was possible that when we went to broadcast an
announcement, none of our peers actually had us as a syncer peer (lnd
terminology). In this case, the FilterGossipMsg function wouldn't do
anything, as they don't have an active timestamp filter set. When we go
to them merge the syncer map, we'd add all these peers we didn't send
to, meaning we would skip them when it came to broadcast time.

In this commit, we now split things into two phases: we'll broadcast
_our_ own announcements to all our peers, but then do the normal
filtering and chunking for the announcements we got from a remote peer.

Fixes https://github.com/lightningnetwork/lnd/issues/6531
Fixes https://github.com/lightningnetwork/lnd/issues/7223
Fixes https://github.com/lightningnetwork/lnd/issues/7073
2022-12-15 11:56:41 -08:00
Olaoluwa Osuntokun 9a4701d709 discovery: add new msgsToBroadcast struct
This struct will be used to later on do filtering when we go to
broadcast, based on if a message was locally sourced or granted from a
remote peer.
2022-12-15 11:56:38 -08:00
Olaoluwa Osuntokun e8177ea427 discovery: add isLocal bool to msgWithSenders
This lets us keep track of which messages we created ourselves vs the
messages that originated remotely from a peer.
2022-12-15 11:56:36 -08:00
Olaoluwa Osuntokun adb239300f fn: add new fn (func utils) package for generic helper funcs
We start with a simple Map function that can be useful for transforming
objects on the fly.

We may want to eventually make this Taro pakage into a module so we can
just have everything in one place:
https://github.com/lightninglabs/taro/tree/main/chanutils.
2022-12-15 11:56:31 -08:00
Olaoluwa Osuntokun a347e405e8 Merge pull request #7254 from yyforyongyu/fix-tools
tools: fix docker version
2022-12-15 11:55:49 -08:00
yyforyongyu 3ca7e30199 github: move fmt-check into lint 2022-12-15 16:56:06 +08:00
yyforyongyu 26110beb53 github: upgrade actions/checkout to v3 2022-12-15 16:32:45 +08:00
yyforyongyu 26613a2d46 github: create new action to hold common setup 2022-12-15 16:26:12 +08:00
yyforyongyu 601cf60070 tools: fix docker version 2022-12-15 16:03:55 +08:00
Olaoluwa Osuntokun 8a18824851 Merge pull request #7243 from guggero/ghost-utxo-fix
wallet: fix ghost UTXOs not being detected
2022-12-13 20:00:31 -08:00
Olaoluwa Osuntokun d468391d95 Merge pull request #6857 from bitromortac/2208-apriori-capacity
pathfinding: capacity-dependent apriori model probability
2022-12-12 19:07:39 -08:00
Oliver Gugger 6bba1dc976 Merge pull request #7242 from morehouse/itest_mining_patch
lntemp: after mining, sync to latest block
2022-12-12 21:11:59 +01:00
Matt Morehouse 55a146d4e4 docs: update release notes 2022-12-12 09:08:12 -06:00
Matt Morehouse b72993c9dd lntemp: after mining, sync to latest block
Ensure active nodes are synced to the latest block mined.

There are two scenarios where they might not be synced to the correct
block even when SyncedToChain is true:
  1. The backend may have rejected a newly mined block (e.g., see
     #7241).
  2. The backend might not have fully processed the new blocks yet.

In either case SyncedToChain will (correctly) be true since the node is
indeed fully synced to the backend. This commit makes sure we detect
case 1 above, while making sure we continue to wait in case 2.
2022-12-12 09:06:51 -06:00
bitromortac 2d7fda2a41 routerrpc: mark QueryProbability deprecated
We deprecate `QueryProbability`, as it displays the same information as
`QueryMissionControl` less the probability. `QueryRoutes` still contains
the total probability of a route.
2022-12-12 13:23:31 +01:00
bitromortac 1dd7a37d4d routing: apply capacity factor
We multiply the apriori probability with a factor to take capacity into
account:

P *= 1 - 1 / [1 + exp(-(amount - cutoff)/smearing)]

The factor is a function value between 1 (small amount) and 0 (high
amount). The zero limit may not be reached exactly depending on the
smearing and cutoff combination. The function is a logistic function
mirrored about the y-axis. The cutoff determines the amount at which a
significant reduction in probability takes place and the smearing
parameter defines how smooth the transition from 1 to 0 is. Both, the
cutoff and smearing parameters are defined in terms of fixed fractions
of the capacity.
2022-12-12 13:22:29 +01:00
bitromortac 454c115b6e routing+routerrpc: add capacity in rpcs
FetchPairCapacity is used by the following endpoints to introduce the
capacity for probability calculations:

* QueryProbability
* QueryRoutes
2022-12-12 13:22:29 +01:00
bitromortac 66ffc64776 router: return probability from findPath
The returned probability can then be used in QueryRoutes to not having
to reconstruct the probability.
2022-12-12 13:22:29 +01:00
bitromortac 516e3a8cca routing: use capacity in pathfinding
Extends the pathfinder with a capacity argument for later usage.

In tests, the inserted testCapacity has no effect, but will be used
later to estimate reduced probabilities from it.
2022-12-12 13:22:28 +01:00
bitromortac 2b6308a61f routing: implement capacity in getEdge
This commit adds the maximal capacity between two nodes to the unified
edge data. We use MaxHTLC as a replacement if the channel capacity is
not available.

In tests we use larger maxHTLC values to be able to convert to a
non-zero sat capacity.
2022-12-12 13:22:28 +01:00