-
Notifications
You must be signed in to change notification settings - Fork 942
Fix flakes #17 #8258
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
Merged
ShahanaFarooqui
merged 6 commits into
ElementsProject:master
from
rustyrussell:guilt/fix-flakes17
May 2, 2025
Merged
Fix flakes #17 #8258
ShahanaFarooqui
merged 6 commits into
ElementsProject:master
from
rustyrussell:guilt/fix-flakes17
May 2, 2025
+22
−10
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CLTV can be one less if l1 hasn't seen block yet: ``` 2025-04-24T05:38:12.8587408Z > l1.daemon.wait_for_log(f'Adding HTLC 0 amount=15002msat cltv={110 + 1 + 100 + 200 + 400}') 2025-04-24T05:38:12.8587715Z 2025-04-24T05:38:12.8587804Z tests/test_xpay.py:824: ... 2025-04-24T05:38:12.9889506Z lightningd-1 2025-04-24T05:30:45.255Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#1: Adding HTLC 0 amount=15002msat cltv=812 gave CHANNEL_ERR_ADD_OK ``` Signed-off-by: Rusty Russell <[email protected]>
Make sure l1 sees the l5 channel! ``` 2025-04-29T02:39:42.1086397Z # now we send two 'sticky' htlcs, l1->l5 + l4->l1 2025-04-29T02:39:42.1086837Z amt = 10**8 // 2 2025-04-29T02:39:42.1087231Z sticky_inv_1 = l5.rpc.invoice(amt, '2', 'sticky') 2025-04-29T02:39:42.1087767Z > route = l1.rpc.getroute(l5.info['id'], amt, 1)['route'] 2025-04-29T02:39:42.1088126Z 2025-04-29T02:39:42.1088279Z tests/test_closing.py:1432: ... 2025-04-29T02:39:42.1111693Z elif "error" in resp: 2025-04-29T02:39:42.1111976Z > raise RpcError(method, payload, resp['error']) 2025-04-29T02:39:42.1113258Z E pyln.client.lightning.RpcError: RPC call failed: method: getroute, payload: {'id': '032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e', 'amount_msat': 50000000, 'riskfactor': 1, 'cltv': 9}, error: {'code': -32602, 'message': '032cf15d1ad9c4a08d26eab1918f732d8ef8fdc6abb9640bf3db174372c491304e: unknown destination node_id (no public channels?)'} ``` Signed-off-by: Rusty Russell <[email protected]>
We were supposed to put the sqlite db in a different directory, but the test was wrong! So occasionally we would crash with: ``` Failed to commit DB transaction: Failed to commit a transaction: disk I/O error ``` Signed-off-by: Rusty Russell <[email protected]>
Otherwise it comes out as "**BROKEN**" messages: ``` lightningd-2 2025-05-02T03:51:28.760Z **BROKEN** plugin-chanbackup: Peer storage sent! lightningd-1 2025-05-02T03:51:28.770Z **BROKEN** plugin-chanbackup: Peer storage sent! ``` Signed-off-by: Rusty Russell <[email protected]>
It's not completely stable, which is OK, and we will solve this next release. Signed-off-by: Rusty Russell <[email protected]>
fundwallet() actually mines a block, putting our count out. If we see both blocks at once, we will say "52" blocks instead of "51": ``` 2025-05-02T05:28:40.5315155Z have_forgotten = l2.daemon.is_in_log( 2025-05-02T05:28:40.5315650Z r"UNUSUAL {}-chan#1: Forgetting channel: It has been 51 blocks without the funding transaction ".format(l1.info['id']) 2025-05-02T05:28:40.5316105Z ) 2025-05-02T05:28:40.5316263Z 2025-05-02T05:28:40.5316417Z if dopay: 2025-05-02T05:28:40.5316616Z assert not have_forgotten 2025-05-02T05:28:40.5317056Z assert set([c['peer_id'] for c in l2.rpc.listpeerchannels()["channels"]]) == set([l1.info['id'], l3.info['id']]) 2025-05-02T05:28:40.5317477Z else: 2025-05-02T05:28:40.5317662Z > assert have_forgotten 2025-05-02T05:28:40.5317887Z E assert None ``` ``` 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-chan#1: Forgetting channel: It has been 52 blocks without the funding transaction 0bb0579df6b1d983dda49dad47513afc71696c9d5bea3c8b955ba4b76bb053de getting deeply confirmed. We are fundee and can forget channel without loss of funds. ``` Signed-off-by: Rusty Russell <[email protected]>
endothermicdev
approved these changes
May 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catches. I didn't realize libplugin did not support trace level logging.
ACK b63c1db
a12c02b
into
ElementsProject:master
16 of 40 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog-None