Commit Graph

16803 Commits

Author SHA1 Message Date
yyforyongyu
8240a87c2b
itest: fix misuse of MineBlocks and replace it with
`MineBlocksAndAssertNumTxes`
2024-07-23 21:30:08 +08:00
yyforyongyu
f1f341095e
lntest+itest: add new method CurrentHeight 2024-07-23 21:30:08 +08:00
yyforyongyu
14e7b134d9
lntest+itest: make Miner a private instance 2024-07-23 21:30:08 +08:00
yyforyongyu
be4dba5da6
lntest+itest: finalize moving miner methods 2024-07-23 21:30:07 +08:00
yyforyongyu
6bd8baea38
lntest+itest: continue removing direct call to Miner 2024-07-23 21:30:07 +08:00
yyforyongyu
976bb37972
lntest+itest: add method AssertNumTxsInMempool and AssertTxInBlock
in harness

Prepare to make `HarnessTest.Miner` a private instance to sync height.
2024-07-23 21:30:07 +08:00
yyforyongyu
e553895ddd
lntest+itest: strictly define the behavior of MineBlocks
This commit adds more assertion to `MineBlocks` so the caller won't
misuse it.
2024-07-23 21:30:07 +08:00
yyforyongyu
91b20e661b
lntest: move mining methods into one file 2024-07-23 21:30:07 +08:00
yyforyongyu
a881477404
lntest: create new package lntest/miner for itest miner
This commit moves the `HarnessMiner` into a new package to avoid
confusion about incoming changes.
2024-07-23 21:30:07 +08:00
Oliver Gugger
578e1d4965
Merge pull request #8881 from mwaite-codes/fix-doc-grammar
Fix various typos in docs for readability
2024-07-23 00:25:17 -06:00
Marcia Waite
e6dca0ce6e multi: Fix typos and grammar in multiple docs 2024-07-22 20:08:12 -07:00
Oliver Gugger
fa9929cd43
Merge pull request #8925 from guggero/remove-coin-join
docs: update safety.md, remove specific CoinJoin implementations
2024-07-22 01:05:05 -06:00
LeoSpyke
ec1c42677a
docs: update safety.md, remove specific CoinJoin impl
Remove dead conjoin implementations.

[skip ci]
2024-07-22 08:54:33 +02:00
Oliver Gugger
608c0c41b9
Merge pull request #8921 from guggero/wallet-update
btcwallet: bump dependency to fix duplicate address creation
2024-07-19 02:43:58 -06:00
Oliver Gugger
9d4ed6d6e6
docs: update release notes 2024-07-19 08:33:56 +02:00
Oliver Gugger
19a4b51a92
mod: bump btcwallet dependency 2024-07-19 08:33:56 +02:00
Olaoluwa Osuntokun
6dea86428d
Merge pull request #8879 from ProofOfKeags/bugfix/taproot-coop-sequence
contractcourt: Taproot Channel Bugfixes
2024-07-18 16:24:44 -07:00
Keagan McClelland
09f5e08d32
contractcourt: Fix heuristic for identifying STC commit broadcaster.
This commit fixes the heuristic we use for identifying the party
that broadcast a Simple Taproot Channel commitment transaction.

Prior to this change we checked if the last script element was an
OP_DROP. However, both the local and remote commitment outputs
have an OP_DROP at the end.

The new approach checks the resolver's SignDescriptor and compares
that key to the keys in the channel's local ChannelConfig. If the
key is the delay key, we know that it is our commitment transaction.
2024-07-17 14:57:28 -07:00
Keagan McClelland
31d45757a4
contractcourt: properly detect RBF coop close transactions
This commit fixes an issue where we did not properly detect and
therefore record the coop close transaction if it used the newer
RBF coop close v2 scheme. This only affects coop closes of
taproot channels today.
2024-07-17 14:48:20 -07:00
Oliver Gugger
fdd28c8d88
Merge pull request #8915 from linghuying/master
chore: fix some comments for struct field
2024-07-16 08:40:33 -06:00
Oliver Gugger
fae7e0c5b0
Merge pull request #8848 from ellemouton/graphManager
refactor: move graph responsibilities from routing.ChannelRouter to new graph.Builder
2024-07-16 00:54:00 -06:00
linghuying
91930d4ab8 chore: fix some comments for struct field
Signed-off-by: linghuying <1599935829@qq.com>
2024-07-16 11:44:35 +08:00
Elle Mouton
b112e10bf2
docs: update release notes
Also move incorrect entry from 18.2 to 18.3
2024-07-15 15:56:33 +02:00
Elle Mouton
d1c54d74a8
routing: close graph session if getBandwidthHints fails
Ensure that the graph session used during pathfinding is properly closed
if the call to getBandwidthHints fails.
2024-07-15 15:56:33 +02:00
Elle Mouton
90dff730ce
graph: updated builder to use atomic ints
Instead of relying on devs to remember that they must only be accessed
atomically.
2024-07-15 15:56:33 +02:00
Elle Mouton
fe34d62eb1
graph+routing: address linter errors
This is done in a separate commit so as to keep the original code-move
commit mostly a pure code move.
2024-07-15 15:56:33 +02:00
Elle Mouton
743502f99d
funding: rename from router graph to graph 2024-07-15 15:56:33 +02:00
Elle Mouton
9327a83cd2
discovery: rename Gossiper graph dep 2024-07-15 15:56:33 +02:00
Elle Mouton
7f1be39d45
refactor: move various duties from ChannelRouter to graph.Builder
This commit is a large refactor that moves over various responsibilities
from the ChannelRouter to the graph.Builder. These include all graph
related tasks such as:
- graph pruning
- validation of new network updates & persisting new updates
- notifying topology update clients of any changes.

This is a large commit but:
- many of the files are purely moved from `routing` to `graph`
- the business logic put in the graph Builder is copied exactly as is
  from the ChannelRouter with one exception:
- The ChannelRouter just needs to be able to call the Builder's
  `ApplyChannelUpdate` method. So this is now exported and provided to
the ChannelRouter as a config option.
- The trickiest part was just moving over the test code since quite a
  bit had to be duplicated.
2024-07-15 15:56:33 +02:00
Elle Mouton
0b7364f54b
graph+server: add template for new graph Builder sub-system
This is preparation for an upcoming commit that will move over various
responsibilities from the ChannelRouter to the graph Builder. So that
that commit can be a pure code-move commit, the template for the new
sub-system is added up front here.
2024-07-15 15:56:33 +02:00
Elle Mouton
30e6671a13
routing: use new graph.DB interface in ChannelRouter 2024-07-15 15:13:58 +02:00
Elle Mouton
be84d6974e
channeldb: add a graph.DB interface
..which describes the database methods that are required for graph
maintaining and building.
2024-07-15 15:13:58 +02:00
Elle Mouton
c1d7a9d2e7
multi: move ChannelGraphSource interface
... to the new `graph` package in preparation for the implementation of
the interface being moved to this new package.
2024-07-15 15:13:58 +02:00
Elle Mouton
e9c89ae0ec
multi+refactor: create ForEachNodeChannel with no tx param
In prep for a clean Graph DB interface, we add a version of
ForEachNodeChannel that does not take in an existing db transaction.
2024-07-15 15:13:58 +02:00
Elle Mouton
c20d759d41
refactor: create FetchLightningNode with no tx param
In preparation for adding a clean Graph DB interface, we create a
version of FetchLightningNode that doesnt allow a caller to provide in a
transaction.
2024-07-15 15:13:57 +02:00
Elle Mouton
71e93526d6
multi+refactor: let FetchChanInfos not take tx
In preparation for having a clean graph DB interface, refactor
FetchChanInfos so that no transaction can be provided.
2024-07-15 15:13:57 +02:00
Elle Mouton
cf3de72503
routing: let SelfNode be passed via config
Instead of querying it from the graph since this will be removed in a
future commit.
2024-07-15 15:13:57 +02:00
Elle Mouton
8c0df98439
multi: add abstraction for Router and SessionSource graph access
In this commit, we completely remove the Router's dependence on a Graph
source that requires a `kvdb.RTx`. In so doing, we are more prepared for
a future where the Graph source is backed by different DB structure such
as pure SQL.

The two areas affected here are: the ChannelRouter's graph access that
it uses for pathfinding. And the SessionSource's graph access that it
uses for payments.

The ChannelRouter gets given a Graph and the SessionSource is given a
GraphSessionFactory which it can use to create a new session. Behind the
scenes, this will acquire a kvdb.RTx that will be used for calls to the
Graph's `ForEachNodeChannel` method.
2024-07-15 15:13:57 +02:00
Elle Mouton
90d6b863a8
routing+refactor: remove the need to give CachedGraph source node access
In preparation for the next commit.
2024-07-15 13:10:24 +02:00
Elle Mouton
3f121cbe81
routing: rename and export routingGraph
In preparation for structs outside of the `routing` package implementing
this interface, export `routingGraph` and rename it to `Graph` so as to
avoid stuttering.
2024-07-15 13:10:24 +02:00
Elle Mouton
5a903c270f
routing: remove sourceNode from routingGraph interface
In this commit, we further reduce the routingGraph interface and this
time we make it more node-agnostic so that it can be backed by any graph
and not one with a concept of "sourceNode".
2024-07-15 13:10:24 +02:00
Elle Mouton
5c18b5a042
routing: remove un-used method from routingGraph interface
We really want to narrow down the interface we provide the router, so
let's start here.
2024-07-15 13:10:23 +02:00
Olaoluwa Osuntokun
09b38aaa01
Merge pull request #8653 from ProofOfKeags/fn-prim
DynComms [0/n]: `fn` package additions
2024-07-12 17:30:15 -07:00
Olaoluwa Osuntokun
f464dac1cd
Merge pull request #8752 from ellemouton/rb-receives-setup
[1/4] Route Blinding Receives: Groundwork
2024-07-10 18:27:11 -07:00
Keagan McClelland
eaa5e4a039
fn: remove redundant Reduce function
This commit removes Reduce since we already have both Foldl and Foldr.
2024-07-10 17:06:09 -07:00
Keagan McClelland
fa2e25d5f4
fn: remove lru dependency 2024-07-10 17:06:04 -07:00
Keagan McClelland
364d79e552
fn: add generic version of List 2024-07-10 16:55:29 -07:00
Keagan McClelland
fb1437cb6d
fn: add Elem function for set membership 2024-07-10 15:37:27 -07:00
Keagan McClelland
9c30bce10c
fn: add curried (in)equality functions 2024-07-10 15:37:27 -07:00
Keagan McClelland
c4df2f1dce
fn: reimplement internals of either, add tests 2024-07-10 15:37:27 -07:00