mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-18 13:07:58 +02:00
In this commit, we give the simulator the one thing mainnet has that it never had: an unreliable failure channel. A new attribution section on the scenario file can strip a failed attempt's source and code with probability unknown_prob (what a sender holds after an onion error it cannot decrypt), blame an adjacent hop with shift_prob (a well formed, plausible, wrong answer), and hold every result back delay_slices of virtual time during which the background traffic engine keeps moving liquidity. The degradation applies at the single ReportAttempt delivery point, so lnd and the candidates face the identical draw sequence — three uniforms per attempt regardless of outcome, so the stream is a function of the attempt index and not of how often a router fails. The lnd path converts the unreadable marker to a nil failure message before ReportPaymentFail, which is exactly what the switch hands mission control on ErrUnreadableFailureMessage, so lnd exercises its real processPaymentOutcomeUnknown logic (fail every pair of the route, both directions) rather than anything sim-invented. Truth is preserved upstream of the delivery point: attempt traces and the served-observation export still record what actually happened. Scenarios without the section are proven byte-identical against a pre-change binary across three tiers, and the zero-value config equals the unconfigured run result-for-result under test. Every evolved router survives the degraded channel; notably none of them writes a liquidity bound from an unattributed failure, and mx_c3 turns out to have EVOLVED an anonymous-failure contingency (recordAnonymousFailure) that a truly unreadable error routes past. |
||
|---|---|---|
| .. | ||
| commands | ||
| lncli | ||
| lnd | ||
| routesim | ||