Commit Graph

19106 Commits

Author SHA1 Message Date
Oliver Gugger
e1c9825b8a Merge pull request #9813 from Abdulkbk/htlcidx-to-fwdingevent
lnrpc: add HtlcIndex to ForwardingEvents
2025-06-06 14:32:29 +02:00
yyforyongyu
870e16bdd7 channeldb+lnwallet: fix typo 2025-06-06 19:55:59 +08:00
yyforyongyu
2cd97fcd6d docs: add release note entry 2025-06-06 19:55:59 +08:00
yyforyongyu
4efd99774e channeldb: add customized encoding for HtlcIndex 2025-06-06 19:55:59 +08:00
yyforyongyu
f5ffe82280 lnwallet+channeldb: use BigSizeT to save space 2025-06-06 19:55:58 +08:00
yyforyongyu
26960e36ce htlcswitch+lntest: add more debug logs 2025-06-06 19:40:35 +08:00
Abdullahi Yunus
ccf3a282d0 docs: add release note 2025-06-06 12:21:46 +01:00
Abdullahi Yunus
a0634e4ade lnd+lnrpc: update fwdinghistory message
In this commit we update the returned message for fwdinghistory
to include the htlcindex for all forwarded htlcs.
2025-06-06 12:21:46 +01:00
Abdullahi Yunus
f79e6137c1 htlcswitch+channeldb: add htlcidx to fwding log
In this commit we add htlcindex field to the forwardingevent
struct, which is persisted alongside the other event fields.
2025-06-06 12:21:39 +01:00
Oliver Gugger
4a7cd0095e Merge pull request #9902 from ellemouton/simplifyForwardingLogQuery
channeldb: remove unnecessary for loop from Query method
2025-06-06 09:43:57 +02:00
Elle Mouton
7571acbe81 channeldb: remove unnecessary for loop from Query method
This commit simplifies the code of the ForwardingLog.Query method by
removing a confusing for-loop. The for-loop makes it seem as though
multiple events could be encoded under a single timestamp. But from the
time that this forwarding log was introduced, it was never possible to
encode multiple events under the same timestamp and so this loop will
never execute successfully more than once per timestamp and can thus be
removed. This paves the way such that future expansions of the method
can be added easily.

See the initial commit that introduced this code [here](f2cd668bcf).
In this commit you can see that from the start it was never possible to
have more than one event in a single timestamp since any previous event
in that timestamp would be overwritten. Then see [this commit](97c73706b5)
where even more protection was added to ensure that each event had a
unique timestamp.
2025-06-05 11:07:46 +02:00
Oliver Gugger
fc906f2a65 Merge pull request #9127 from MPins/issue-8993
Add the option on path creator to specify the incoming channel on blinded path
2025-06-05 08:47:05 +02:00
Oliver Gugger
aec16eee97 Merge pull request #9876 from yyforyongyu/fix-accessman
accessman: remove restrictions on protected/temporary peers
2025-06-04 09:53:13 +02:00
Olaoluwa Osuntokun
89881414e6 Merge pull request #9726 from Roasbeef/protofsm-full-block-conf
protofsm: add option to allow conf resp to return full block
2025-06-03 16:41:22 -07:00
Olaoluwa Osuntokun
3f03752b25 protofsm: add test for new full block conf behavior 2025-06-03 16:39:48 -07:00
Olaoluwa Osuntokun
4908d76653 protofsm: add option to allow conf resp to return full back
In this commit, we add an option to allow a conf req caller to receive
the full block. This is useful if the caller wants to be able to create
an SPV proof.
2025-06-03 16:39:48 -07:00
Olaoluwa Osuntokun
a8930773a4 Merge pull request #9725 from Roasbeef/protofsm-conf-mapper
protofsm: add ConfMapper to allow conf attribute projection for new events
2025-06-03 16:28:01 -07:00
Olaoluwa Osuntokun
946ae4c804 protofsm: add generic type assertion to state machine tests
This commit introduces a new generic type assertion function
`assertState` to the state machine tests. This function asserts that the
state machine is currently in the expected state type and returns the
state cast to that type. This allows us to directly access the fields of
the state without having to perform a type assertion manually.
2025-06-03 16:27:30 -07:00
Olaoluwa Osuntokun
c580666e28 protofsm: add unit tests for SpendMapper 2025-06-03 16:27:30 -07:00
Olaoluwa Osuntokun
cb46f3daa0 protofsm: add new ConfMapper similar to SpendMapper for conf events
In this commit, we add a new ConfMapper which is useful for state
machines that want to project some of the conf attributes into a new
event to be sent post conf.
2025-06-03 16:27:28 -07:00
Oliver Gugger
239aab8b9e Merge pull request #9875 from ziggie1984/fix-peer-connection-2
discovery: make sure we do not block the read queue
2025-06-03 22:37:17 +02:00
ziggie
6f45735d55 docs: add release notes for 19.1 2025-06-03 21:18:19 +02:00
ziggie
732d3a77b4 discovery: increase syncer gossip chan buffer 2025-06-03 21:13:42 +02:00
ziggie
74c5541147 brontide: increase logging when processing gossip msgs
We add logging to we can draw conclusions how long the processing
of gossip message last and potentially see whether the syncer
buffer channel size is a bottleneck in processing.
2025-06-03 21:13:42 +02:00
Oliver Gugger
ac76d63119 Merge pull request #9858 from Roasbeef/non-staging-rbf-coop
peer+feature: start to signal the prod rbf coop close bit
2025-06-03 20:14:22 +02:00
yyforyongyu
e0b6acb584 docs: update release notes 2025-06-03 22:43:34 +08:00
yyforyongyu
04db1a1c3f lnd: increase DefaultNumRestrictedSlots to 100 2025-06-03 22:43:15 +08:00
yyforyongyu
a232c57c8c accessman: patch unit tests 2025-06-03 22:43:14 +08:00
yyforyongyu
704bb736a5 accessman: only check ban score for restricted peers
If a peer has, or used to have a channel with us there's no need to
check for the ban score.
2025-06-03 22:43:14 +08:00
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