Commit Graph

19077 Commits

Author SHA1 Message Date
Oliver Gugger
7e444220a7 Merge pull request #9890 from ziggie1984/update-btclog-lib
update btclog lib
2025-06-03 16:22:45 +02:00
ziggie
a59666455b docs: update release-notes 2025-06-03 13:06:28 +02:00
ziggie
73251952d1 mod: update btclog library 2025-06-03 13:06:28 +02:00
Oliver Gugger
c61095ce0b Merge pull request #9879 from ellemouton/graphSQLFixNodesQuery
sqldb+graph/db: fix UpsertNode query to account for nullable `last_update` field
2025-06-02 21:21:25 +02:00
Olaoluwa Osuntokun
f8e67c0bcd Merge pull request #9872 from ziggie1984/fix-peer-connection
brontide: fix peer disconnection issue
2025-06-02 11:53:35 -07:00
Elle Mouton
547b836180 sqldb+graph/db: fix UpsertNode bug
Account for the last_update field being null.
2025-06-02 17:29:03 +02:00
Elle Mouton
eb32b39380 graph/db: demonstrate SQL upsert node bug 2025-06-02 17:28:59 +02:00
Oliver Gugger
e9692f8ccd Merge pull request #9869 from ellemouton/graphSQL8-channels-schema
sqldb+graph/db: add channel tables and implement some channel CRUD
2025-06-02 17:18:04 +02:00
Elle Mouton
cf542458bd graph/db+sqldb: add HighestChanID to SQLStore 2025-06-02 14:53:18 +02:00
Elle Mouton
d93d104a66 graph/db+sqldb: implement AddChannelEdge on SQLStore
In this commit, the `AddChannelEdge` method of the SQLStore is
implemented. Like the KVStore implementation, it makes use of the
available channel `batch.Scheduler` and also updates the reject and
channel caches.

This then lets us convert the following 2 unit tests to run against the
SQL backends:
- TestPartialNode
- TestAddChannelEdgeShellNodes
2025-06-02 14:53:18 +02:00
Elle Mouton
c5f159f485 graph/db: expand AddChannelEdge test
Expand the existing TestAddChannelEdgeShellNodes test so that we have
coverage for error we expect when AddChannelEdge is called a second time
if we already know of a channel.
2025-06-02 14:53:18 +02:00
Elle Mouton
2a36e17f6f graph/db: only init extra byte if not nil
In preparation for having consistency with the structs created by the
SQLStore and the KVStore (so that they have the same behaviour when
tested by the unit tests), here we make sure not to init the
ExtraOpaqueData field of the LightningNode struct unless there are
actualy bytes to set.
2025-06-02 14:53:18 +02:00
Elle Mouton
e5d099ef14 sqldb/sqlc: add graph channel schemas
In this commit, we define the SQL schemas for storing graph channel
data. This includes a new `channels` table and a new `channel_features`
table along with various indices.
2025-06-02 14:53:17 +02:00
Oliver Gugger
f93c675b04 Merge pull request #9885 from ffranr/sm-isrunning-unit-test
protofsm: exercise `StateMachine.IsRunning()` in unit test
2025-06-02 13:49:48 +02:00
ffranr
828e764bbe protofsm: exercise StateMachine.IsRunning() in unit test
Update unit test to call `StateMachine.IsRunning()` to ensure the
method has test coverage.
2025-06-02 10:02:56 +01:00
Oliver Gugger
5a036a8fcd Merge pull request #9883 from ffranr/add-state-machine-isrunning
protofsm: add thread-safe IsRunning method to StateMachine
2025-06-02 10:08:28 +02:00
ffranr
4109ecb057 protofsm: add thread-safe IsRunning method to StateMachine
This commit introduces a new `IsRunning()` method to the `StateMachine`.
This method allows callers to safely query whether the state machine
is currently active after it has been started and before it has been
stopped.

To ensure thread-safety, the internal `running` status flag is
implemented using `atomic.Bool` (from `sync/atomic`). Without atomic
operations, concurrent accesses to a simple boolean flag from different
goroutines (e.g., one goroutine calling `IsRunning()` while another
executes `Start()` or `Stop()`) could lead to stale reads or data races.
2025-06-02 01:06:40 +01:00
ziggie
329c571d5a docs: add release notes 2025-05-29 10:19:28 +02:00
ziggie
e593c9d266 brontide: fix peer disconnection issue
In case when the rbf coop close feature was active we would not
properly disconnect the peer.
2025-05-29 10:19:28 +02:00
ziggie
b837c889dc itest: add disconnect test
Add a connect/disconnect test when the peers both started up
with the rbf coop close feature.
2025-05-29 10:19:21 +02:00
Oliver Gugger
bff2f2440c Merge pull request #9873 from ellemouton/sqldbHelpers
sqldb: re-usable TxOptions and NoOpReset
2025-05-28 12:45:59 +02:00
Elle Mouton
9cbc1f804e multi: use sqldb.NoOpReset helper
Define a re-usable "reset" function, sqldb.NoOpReset, that can be used
for the reset parameter in sql ExecTx calls.
2025-05-28 10:18:53 +02:00
Elle Mouton
c4e6f23c5b multi: add a re-usable TxOptions type
Add a re-usable implementation of the sqldb.TxOptions interface and make
use of this in the various spots (invoices, batch and graph/db) where we
had previously defined individual implementations that were all doing
the same thing.
2025-05-28 10:18:10 +02:00
Oliver Gugger
8e96bd0308 Merge pull request #9866 from ellemouton/graphSQL7-nodes-tables
sqldb+graph/db: add node related tables and implement some node CRUD
2025-05-28 08:45:33 +02:00
Oliver Gugger
3b2af90f5a Merge pull request #9854 from yyforyongyu/fix-fetchinput
gomod: update `btcwallet` to fix `FetchOutpointInfo`
2025-05-27 21:07:36 +02:00
Elle Mouton
efc04b9918 docs: update release notes 2025-05-27 18:37:00 +02:00
Elle Mouton
0064d33cda sqldb+graph/db: source nodes table, queries and CRUD
In this commit, we add the `source_nodes` table. It points to entries in
the `nodes` table. This table will store one entry per protocol version
that we are announcing a node_announcement on.

With this commit, we can run the TestSourceNode unit test against our
SQL backends.
2025-05-27 18:36:59 +02:00
Elle Mouton
86d48390ca sqldb+graph/db: implement SQLStore.NodeUpdatesInHorizon
In this commit we add the necessary SQL queries and then implement the
SQLStore's NodeUpdatesInHorizon method. This lets us run the
TestNodeUpdatesInHorizon unit tests against SQL backends.
2025-05-27 18:36:59 +02:00
Elle Mouton
7a120cb584 graph/db: implement SQLStore.LookupAlias
In this commit, we let the SQLStore implement LookupAlias. This then
lets us run the TestAliasLookup unit test against the SQL backends.
2025-05-27 18:36:59 +02:00
Elle Mouton
d1f7cce68b sqldb+graphdb: SQL methods for Node CRUD
In this commit, we add the various sqlc queries that we need in order
to implement the following V1Store methods:

- AddLightningNode
- FetchLightningNode
- HasLightningNode
- AddrsForNode
- DeleteLightningNode
- FetchNodeFeatures

These are implemented by SQLStore which then lets us use the SQLStore
backend for the following unit tests:

- TestNodeInsertionAndDeletion
- TestLightningNodePersistence
2025-05-27 18:36:59 +02:00
Elle Mouton
ffbe4f6ffc sqldb: define schemas for all graph node tables
In this commit, the various SQL schemas required to store graph node
related data is defined. Specifically, the following tables are defined:

- nodes
- node_extra_types
- node_features
- node_addresses
2025-05-27 16:28:37 +02:00
yyforyongyu
142e8dfe26 docs: add release notes 19.1 2025-05-26 21:02:05 +08:00
yyforyongyu
1a877463c7 docs: add release notes template 2025-05-26 19:41:25 +08:00
yyforyongyu
7f375ccd2e gomod: update btcwallet 2025-05-26 19:41:24 +08:00
yyforyongyu
f97f60d3d4 lntest+itest: add testBumpFeeExternalInput 2025-05-26 19:41:24 +08:00
yyforyongyu
4cef7b30fe itest: add new file lnd_bump_fee.go
Move bumpfee RPC related tests into one file - these tests focus on
testing the behaivor of the RPC only without any force close context.
2025-05-26 19:41:24 +08:00
Oliver Gugger
93a6ab8759 Merge pull request #9853 from lightningnetwork/elle-graphSQL8-prep
graph/db: init SQLStore caches and batch schedulers
2025-05-26 10:11:45 +02:00
Oliver Gugger
ab717c301b Merge pull request #9864 from ziggie1984/update-sqlc
sqlc: update sqlc compiler to 1.29.0
2025-05-26 09:27:01 +02:00
Oliver Gugger
1aaa76078b Merge pull request #9807 from ziggie1984/skip-vendor-and-source-packaging-cross-builds
make: allow skipping the vendor and source packaging
2025-05-26 09:14:14 +02:00
Oliver Gugger
b1b3c64410 Merge pull request #9721 from appilon/appilon/6601
feat(lncli): Add --route_hints flag to sendpayment and queryroutes
2025-05-26 09:13:01 +02:00
Oliver Gugger
5c324c732e Merge pull request #9856 from ellemouton/writeOpaqueAddr
lnwire: add lnwire.OpaqueAddr case in WriteElement for channel back-ups
2025-05-26 08:48:03 +02:00
ziggie
c65cf7ffd1 makefile: fix linewrap for make help cmd 2025-05-26 08:45:21 +02:00
ziggie
c624e4348d makefile: add lean cross-compile build
Different platforms can now be cross-compiled wihtout packing
all the source and vendor packages.
2025-05-26 08:37:10 +02:00
ziggie
5baaa3e7c5 sqlc: update sqlc compiler to 1.29.0 2025-05-25 18:23:35 +02:00
Alex Pilon
0437850089 docs: Update release notes for --route_hints flag 2025-05-24 20:01:48 -04:00
Alex Pilon
baf2e445f4 lncli: Add --route_hints flag support
Adds --route_hints flag to sendpayment.
Hints should be JSON encoded (see usage for example).

Adds --route_hints flag to queryroutes.
Errors if blinded paths are set.
2025-05-24 20:01:45 -04:00
Elle Mouton
9d54dbcd64 docs: add release notes for 0.19.1 2025-05-24 14:10:35 +02:00
Oliver Gugger
dc946ae7e8 Merge pull request #9857 from twofaktor/patch-1
docs: fix description of protocol.rbf-coop-close default state in sample-lnd.conf
2025-05-24 07:53:28 +02:00
Olaoluwa Osuntokun
03b35d000e peer+feature: start to signal the prod rbf coop close bit
In this commit, we start to signal the prod bit for the rbf coop close
feature. We keep our signaling of the staging bit in place to ensure
the protocol continues to work between those nodes in the wild that are
still signaling the bit.

Fixes https://github.com/lightningnetwork/lnd/issues/9852
2025-05-23 13:54:42 -07:00
⚡️2FakTor⚡️
6d6b975213 Fix reference to default protocol.rbf-coop-close configuration in sample-lnd.conf
Modified description regarding the default value for the parameter protocol.rbf-coop-close:

Replaced: "disable" with "enable"
2025-05-23 18:03:39 +02:00