Skip to content

Fix flaky test_trampoline_single_hop_receive test #3716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tnull opened this issue Apr 8, 2025 · 0 comments
Open

Fix flaky test_trampoline_single_hop_receive test #3716

tnull opened this issue Apr 8, 2025 · 0 comments

Comments

@tnull
Copy link
Contributor

tnull commented Apr 8, 2025

In #3623 we discovered that test_trampoline_single_hop_receive is flaky, likely depending on a particular EntropySource output.

If we call entropy_source.get_secure_random_bytes() in ChainMonitor's block connection code, test_trampoline_single_hop_receive fails with:

node 0 DEBUG [lightning::ln::onion_utils:1249] Invalid HMAC in attribution data for node at pos 0
node 0 TRACE [lightning::ln::outbound_payment:2244] Failing outbound payment HTLC with payment_hash 66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925
node 0 TRACE [lightning::ln::channelmanager:11511] Handling event PaymentPathFailed { payment_id: Some(66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925), payment_hash: 66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925, payment_failed_permanently: false, failure: OnPath { network_update: None }, path: Path { hops: [RouteHop { pubkey: PublicKey(236cdaa42692b2c9dcaa1e9755b09f01015badea0cbd02b6162d328a23d2f8550b2875c8c2a0382aa31936f841ca09946202c0c6d5177ed9a1234ff4969b49db), node_features: [], short_channel_id: 1099511627776, channel_features: [], fee_msat: 1000, cltv_expiry_delta: 48, maybe_announced_channel: false }, RouteHop { pubkey: PublicKey(ce1dc610d880181464ae9a76568387c1fd3839d8af69f74012d241f33d2e8f88c4e526dbe59946cf190e949a2c5f92bafcccce5aa9708d2455d18231162afeb5), node_features: [], short_channel_id: 12094627971072, channel_features: [], fee_msat: 0, cltv_expiry_delta: 48, maybe_announced_channel: false }], blinded_tail: Some(BlindedTail { trampoline_hops: [TrampolineHop { pubkey: PublicKey(ce1dc610d880181464ae9a76568387c1fd3839d8af69f74012d241f33d2e8f88c4e526dbe59946cf190e949a2c5f92bafcccce5aa9708d2455d18231162afeb5), node_features: [], fee_msat: 1000, cltv_expiry_delta: 24 }], hops: [BlindedHop { blinded_node_id: PublicKey(e425f629dfaafc9c40c92932546ec17aa84606be5b5ecec24683331eef75e7a79b48b40c5290cf0a05c651b2a1d9fe5a392035e3b9f80552cf5ab1a36d6b6727), encrypted_payload: [27, 215, 137, 83, 5, 227, 231, 162, 4, 182, 46, 244, 76, 204, 219, 75, 124, 56, 46, 180, 104, 46, 225, 92, 161, 49, 221, 129, 185, 0, 247, 67, 94, 116, 128, 128, 160, 41, 2, 201, 41, 162, 62, 221, 250, 126, 119, 51, 81, 254, 248, 159, 209, 59, 160, 252, 175, 216, 31, 184, 193, 11, 5, 144, 166, 80, 200] }], blinding_point: PublicKey(588125d5825b65016232a0ff30868bc396351d6813680799377603d40391296c7794d2a56ae95ba85a20c1c2450a6068a19ebc3c3fcd4b54473fd1214b19a399), excess_final_cltv_expiry_delta: 39, final_value_msat: 1000 }) }, short_channel_id: Some(1099511627776), error_code: None, error_data: None }...
node 0 TRACE [lightning::ln::channelmanager:11511] Done handling event, result: Ok(())
node 0 TRACE [lightning::ln::channelmanager:11511] Handling event PaymentFailed { payment_id: 66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925, payment_hash: Some(66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925), reason: Some(RetriesExhausted) }...
node 0 TRACE [lightning::ln::channelmanager:11511] Done handling event, result: Ok(())

thread 'ln::blinded_payment_tests::test_trampoline_single_hop_receive' panicked at lightning/src/ln/functional_test_utils.rs:2586:13:
assertion `left == right` failed: unexpected payment_failed_permanently value
  left: false
 right: true
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/e6ed56aad81a8bc50c403535370164132e96bb08/library/std/src/panicking.rs:697:5
   1: core::panicking::panic_fmt
             at /rustc/e6ed56aad81a8bc50c403535370164132e96bb08/library/core/src/panicking.rs:75:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
             at /rustc/e6ed56aad81a8bc50c403535370164132e96bb08/library/core/src/panicking.rs:380:5
   4: lightning::ln::functional_test_utils::expect_payment_failed_conditions_event
   5: lightning::ln::functional_test_utils::expect_payment_failed_conditions
             at ./src/ln/functional_test_utils.rs:2640:2
   6: lightning::ln::blinded_payment_tests::do_test_trampoline_single_hop_receive
             at ./src/ln/blinded_payment_tests.rs:2166:4
   7: lightning::ln::blinded_payment_tests::test_trampoline_single_hop_receive::{{closure}}
             at ./src/ln/blinded_payment_tests.rs:2172:40
   8: core::ops::function::FnOnce::call_once
             at /rustc/e6ed56aad81a8bc50c403535370164132e96bb08/library/core/src/ops/function.rs:250:5
   9: core::ops::function::FnOnce::call_once
             at /rustc/e6ed56aad81a8bc50c403535370164132e96bb08/library/core/src/ops/function.rs:250:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

(cc @Arik)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants