mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-18 13:07:58 +02:00
In this commit, we split the scheduler's resolve step in two and charge the second half on the hops the htlc actually crossed. The event loop had one step for "the htlc is in the air": it sent the route, learned what the network did, and told the router, all at one virtual instant a flat attempt_sec after the route was chosen. That is the uniform tick, and it prices a nine hop settle exactly like a refusal by the sender's own peer. Now the resolve step dispatches and the report step tells the router, and the gap between them is the round trip to whatever hop resolved the htlc. With no latency section the gap is zero and the two run back to back inside one step, so nothing can slip between them and the timeline is the one every scenario file before this stage produced. With one, the sender waits, and the wait depends on the route. The split falls along the line between what the network did and what the sender knows. Money moves and liquidity is reserved at dispatch, out on the network, because that is when it happens and because a sibling racing this payment has to contend with a hold that exists from the moment the shard arrives, not from the moment the news gets home. The router's belief, the amount still owed and the settle of a completed hold all wait for the report. The round trip is priced off the TRUE result, before an attribution section has had a chance to blame a neighbour of the node that really failed. The clock is not something a damaged failure message gets to edit. Reporting is the pair every stage since A has needed: a per-attempt latency in the trace, which is where the differential structure is auditable, and a per-payment wall time, which is what objective L would be charged on. Both are pointers, so a file with no latency section emits neither and stays byte identical, and a file with one emits the zeroes too: a route the fee budget refused never reached the wire and really did cost no time. A latency section needs a clock section, for the reason stage D found concurrency does: with no virtual time nothing the simulator does moves a clock, so the section would be charged nowhere. It also satisfies the concurrency window's own clock requirement on its own, since an attempt that costs a round trip is an attempt that takes time. |
||
|---|---|---|
| .. | ||
| blindedpath | ||
| chainview | ||
| localchans | ||
| route | ||
| shards | ||
| testdata | ||
| additional_edge.go | ||
| additional_edge_test.go | ||
| bandwidth.go | ||
| bandwidth_test.go | ||
| blinding.go | ||
| blinding_test.go | ||
| control_tower.go | ||
| control_tower_test.go | ||
| graph.go | ||
| heap.go | ||
| heap_test.go | ||
| integrated_routing_context_test.go | ||
| integrated_routing_test.go | ||
| log.go | ||
| missioncontrol.go | ||
| missioncontrol_state.go | ||
| missioncontrol_state_test.go | ||
| missioncontrol_store.go | ||
| missioncontrol_store_test.go | ||
| missioncontrol_test.go | ||
| mock_graph_test.go | ||
| mock_test.go | ||
| nodepair.go | ||
| patch_config.go | ||
| patch_config_test.go | ||
| pathfind.go | ||
| pathfind_test.go | ||
| payment_lifecycle.go | ||
| payment_lifecycle_test.go | ||
| payment_session.go | ||
| payment_session_source.go | ||
| payment_session_test.go | ||
| probability_apriori.go | ||
| probability_apriori_test.go | ||
| probability_bimodal.go | ||
| probability_bimodal_test.go | ||
| probability_estimator.go | ||
| probability_estimator_test.go | ||
| README.md | ||
| result_interpretation.go | ||
| result_interpretation_test.go | ||
| router.go | ||
| router_test.go | ||
| setup_test.go | ||
| sim_atomic_test.go | ||
| sim_attribution.go | ||
| sim_attribution_test.go | ||
| sim_concurrency.go | ||
| sim_concurrency_test.go | ||
| sim_corridors_test.go | ||
| sim_fee_limit.go | ||
| sim_fee_limit_test.go | ||
| sim_graph.go | ||
| sim_htlc_limits.go | ||
| sim_htlc_limits_test.go | ||
| sim_inbound_fees.go | ||
| sim_inbound_fees_test.go | ||
| sim_latency.go | ||
| sim_latency_test.go | ||
| sim_liquidity.go | ||
| sim_liquidity_test.go | ||
| sim_load.go | ||
| sim_load_test.go | ||
| sim_policy_test.go | ||
| sim_router.go | ||
| sim_run.go | ||
| sim_test.go | ||
| sim_topology.go | ||
| sim_traffic.go | ||
| sim_traffic_test.go | ||
| sim_warmup_test.go | ||
| sim_weights.go | ||
| sim_weights_test.go | ||
| unified_edges.go | ||
| unified_edges_test.go | ||
routing
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