lnd/routing
Matheus Degiovani 0c7a173354
missioncontrolstore: remove duplication of in-memory data
This removes duplication of in-memory data during the periodic flushing
stage of the mission control store.

The existing code entirely duplicates the in-memory cache of the store,
which is very wasteful when only a few additional results are being
rotated into the store.

This has a significant performance penalty specially for wallets that
remain online for a long time with a low volume of payments. The worst
case scenario are wallets that see at most 1 new payment a second, where
the entire in-memory cache is recreated every second.

This commit improves the situation by determining what will be the
actual changes that need to be committed before initiating the db
transaction and only keeping track of these to update the in-memory
cache if the db tx is successful.
2024-06-19 07:34:35 -03:00
..
chainview lnwallet+routing: use chainntnfs.NewBitcoindBackend 2024-03-18 16:13:40 +01:00
localchans multi: Inbound fees are retained when not provided 2024-05-22 20:48:42 +02:00
route multi: update payload validation to account for blinded routes 2023-12-18 11:27:55 -05:00
shards multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
testdata routing: add private key attribute in router test 2021-06-23 18:13:02 +08:00
additional_edge.go routing: add new interface AdditionalEdge. 2024-02-01 17:37:43 +00:00
additional_edge_test.go routing: add new interface AdditionalEdge. 2024-02-01 17:37:43 +00:00
ann_validation.go multi: fix fmt.Errorf error wrapping 2024-02-27 11:13:40 +00:00
bandwidth.go routing: add more verbose logs 2023-01-17 07:26:57 +08:00
bandwidth_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
blinding.go routing: fix comment on blinded path cltv delta 2024-03-27 09:39:02 -04:00
blinding_test.go multi/refactor: clarify blinded payment fee rate field name 2024-03-27 09:39:00 -04:00
control_tower.go routing: make sure StatusInitiated is notified when creating payments 2023-11-15 20:18:21 +08:00
control_tower_test.go routing: make sure StatusInitiated is notified when creating payments 2023-11-15 20:18:21 +08:00
errors.go multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
graph.go routing: add inbound fee support to pathfinding 2024-03-31 18:12:28 +02:00
heap.go routing: add inbound fee support to pathfinding 2024-03-31 18:12:28 +02:00
heap_test.go routing: optimize path finding structures 2019-10-24 21:38:07 -03:00
integrated_routing_context_test.go multi: make tlv onion compulsory 2024-01-11 09:43:31 -08:00
integrated_routing_test.go multi: make tlv onion compulsory 2024-01-11 09:43:31 -08:00
log.go routing: define subsystem constant 2019-12-11 00:17:04 +01:00
missioncontrol.go multi: fee estimation timeout parameters 2024-03-05 09:24:27 +01:00
missioncontrol_state.go multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
missioncontrol_state_test.go multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
missioncontrol_store.go missioncontrolstore: remove duplication of in-memory data 2024-06-19 07:34:35 -03:00
missioncontrol_store_test.go missioncontrolstore: add additional tests and benchmarks 2024-06-19 07:33:14 -03:00
missioncontrol_test.go routing+lnrpc: make capacity factor configurable 2023-02-24 15:28:55 +01:00
mock_graph_test.go multi: move DB schemas to channeldb/models 2023-11-08 14:50:35 +02:00
mock_test.go routing: update mockers in unit test 2023-11-13 16:09:12 +08:00
mocks.go routing: add new interface AdditionalEdge. 2024-02-01 17:37:43 +00:00
nodepair.go routing: extended DirectedNodePair functionality 2019-08-13 18:45:06 +02:00
notifications.go feat: add inbound fees to channel notifications 2024-05-07 18:58:25 +02:00
notifications_test.go feat: add inbound fees to channel notifications 2024-05-07 18:58:25 +02:00
pathfind.go routing: add inbound fee support to pathfinding 2024-03-31 18:12:28 +02:00
pathfind_test.go multi: repleace ioutil.ReadFile 2024-04-25 11:22:43 +02:00
payment_lifecycle.go routing+routerrpc: cancelable context in SendPaymentV2 2024-06-17 09:32:26 +02:00
payment_lifecycle_test.go routing+routerrpc: cancelable context in SendPaymentV2 2024-06-17 09:32:26 +02:00
payment_session.go multi: Fix final hop payload size for AMP payments. 2024-02-03 12:16:06 +00:00
payment_session_source.go multi: use new AdditionalEdge interface. 2024-02-03 12:10:46 +00:00
payment_session_test.go routing: track unifiedPolicyEdge 2024-03-31 18:12:28 +02:00
probability_apriori.go trivial: Fix spelling errors 2023-09-21 22:35:33 -04:00
probability_apriori_test.go trivial: Fix spelling errors 2023-09-21 22:35:33 -04:00
probability_bimodal.go routing: stronger use of direct bimodal probability 2023-03-23 11:12:10 +01:00
probability_bimodal_test.go routing: stronger use of direct bimodal probability 2023-03-23 11:12:10 +01:00
probability_estimator.go routing: add probability estimator interface 2023-02-10 09:58:40 +01:00
probability_estimator_test.go routing: add probability benchmarks 2023-02-14 13:34:25 +01:00
README.md scripted-diff: replace ⛰ emoji with $ [skip ci] 2022-10-28 12:06:49 -04:00
result_interpretation.go routing: add handling for blinded errors from final node 2023-12-18 12:07:56 -05:00
result_interpretation_test.go routing: add handling for blinded errors from final node 2023-12-18 12:07:56 -05:00
router.go routing+routerrpc: cancelable context in SendPaymentV2 2024-06-17 09:32:26 +02:00
router_test.go routing: track unifiedPolicyEdge 2024-03-31 18:12:28 +02:00
setup_test.go channeldb/test: test with postgres 2021-10-29 10:54:44 +02:00
stats.go routing/router: log aggregate graph processing stats 2019-06-13 18:18:30 -07:00
unified_edges.go routing: log edge when skipping it 2024-05-16 13:54:54 +02:00
unified_edges_test.go routing: add inbound fee support to pathfinding 2024-03-31 18:12:28 +02:00
validation_barrier.go multi: move DB schemas to channeldb/models 2023-11-08 14:50:35 +02:00
validation_barrier_test.go routing+discovery: uniform error codes in routing 2022-01-05 04:27:33 +08:00

routing

Build Status MIT licensed GoDoc

The routing package implements authentication+validation of channel announcements, pruning of the channel graph, path finding within the network, sending outgoing payments into the network and synchronizing new peers to our channel graph state.

Installation and Updating

$  go get -u github.com/lightningnetwork/lnd/routing