-
Notifications
You must be signed in to change notification settings - Fork 27
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
track: VLS <> CLN desync in v24.02 #476
Comments
if so the question is how we arrived at this state. the question is whether 696 was actually signed by VLS?
logs regarding the signing of holder commitment transactions would be useful here. |
I'm not quite sure how this could happen, as it appears that the CLN node made progress while the VLS state did not? That's what I'm reading out of the error reporting that CLN is trying to revoke our current commitment number, right? But we persist the VLS state first, and only then pass it to the node, so how could the latter make progress without the former? |
I have a node ( |
We have the following entry in the DB for the channel:
Notice the
And the signer state for this channel is this (formatted as a JSON document): {
"blockheight": None,
"channel_setup": {
"channel_value_sat": 105000,
"commitment_type": "AnchorsZeroFeeHtlc",
"counterparty_points": {
"delayed_payment_basepoint": "033e1e74247f8b4825a308560b4f40dc20c4837f3f7543a55ae81d8264ecf2f9c1",
"funding_pubkey": "03daa3e7827dcda27b240797ff43691f62ef5db21a3c78da57b33b9c99f280592b",
"htlc_basepoint": "02595a3116d6984f639f3d0510c303c9dc286b03a9fccefb009ca4088cd00653d3",
"payment_point": "03c9e0ad6900853d166362c7c6a15524c40046f8bd201ea140b247d514fd57d618",
"revocation_basepoint": "02e338223fb0b618b46f221ed5fd2d4094da857ca63dc72ba6e9cba8bf477fb72f"
},
"counterparty_selected_contest_delay": 144,
"counterparty_shutdown_script": None,
"funding_outpoint": {"txid": "91fcb6f06b5b94586b13101b827bb204d78137d87031a346b27501280b239f0d", "vout": 0},
"holder_selected_contest_delay": 144,
"holder_shutdown_script": None,
"is_outbound": False,
"push_value_msat": 0
},
"channel_value_satoshis": 105000,
"enforcement_state": {
"channel_closed": False,
"counterparty_secrets": {
"old_secrets": [
[[216, 142, 164, 23, 77, 205, 108, 33, 114, 15, 186, 148, 200, 222, 118, 180, 109, 0, 222, 144, 68, 188, 165, 0, 151, 28, 154, 24, 161, 115, 81, 40], 281474976688569],
[[129, 119, 227, 98, 245, 155, 79, 163, 184, 252, 82, 148, 98, 89, 99, 239, 181, 13, 206, 209, 156, 250, 79, 109, 156, 41, 4, 217, 34, 195, 79, 181], 281474976688570],
[[189, 236, 242, 157, 175, 129, 246, 142, 121, 103, 118, 37, 162, 128, 245, 210, 253, 42, 238, 143, 28, 239, 113, 233, 214, 88, 248, 204, 171, 134, 236, 230], 281474976688572],
[[148, 181, 99, 13, 185, 143, 42, 51, 211, 235, 107, 6, 97, 64, 181, 118, 204, 213, 21, 125, 155, 6, 96, 222, 64, 237, 46, 29, 178, 153, 26, 70], 281474976688568],
[[59, 54, 146, 91, 49, 211, 208, 113, 170, 170, 215, 51, 98, 254, 155, 170, 55, 112, 116, 19, 110, 70, 248, 198, 162, 76, 248, 215, 119, 160, 246, 27], 281474976688592],
[[87, 170, 72, 42, 98, 152, 174, 197, 80, 115, 100, 179, 187, 16, 198, 38, 168, 197, 30, 87, 205, 147, 111, 38, 56, 90, 156, 80, 10, 9, 53, 229], 281474976688608],
[[101, 181, 121, 243, 54, 211, 24, 37, 130, 3, 9, 171, 217, 133, 152, 12, 52, 121, 106, 67, 64, 236, 174, 148, 181, 84, 86, 9, 223, 86, 55, 101], 281474976688576],
[[145, 166, 87, 205, 168, 157, 2, 64, 22, 223, 188, 69, 180, 17, 228, 143, 165, 1, 106, 40, 49, 207, 224, 35, 33, 214, 216, 53, 223, 210, 138, 243], 281474976688768],
[[173, 217, 166, 113, 98, 235, 5, 3, 138, 106, 109, 59, 75, 29, 192, 253, 175, 76, 22, 172, 209, 174, 87, 2, 225, 10, 219, 32, 215, 46, 14, 128], 281474976688896],
[[42, 143, 149, 197, 27, 180, 199, 250, 249, 108, 15, 70, 187, 128, 76, 189, 39, 51, 180, 112, 39, 176, 207, 19, 246, 164, 235, 91, 113, 113, 222, 114], 281474976688640],
[[241, 50, 195, 86, 217, 83, 174, 42, 250, 189, 30, 189, 84, 75, 181, 3, 206, 235, 166, 138, 19, 40, 13, 255, 191, 175, 37, 7, 248, 245, 166, 159], 281474976689152],
[[77, 214, 9, 134, 195, 112, 174, 9, 107, 164, 61, 226, 217, 85, 27, 101, 152, 182, 169, 235, 96, 72, 44, 90, 148, 72, 170, 51, 26, 9, 227, 72], 281474976692224],
[[222, 36, 179, 80, 238, 24, 83, 5, 61, 14, 223, 138, 19, 156, 165, 76, 225, 200, 68, 127, 3, 248, 203, 146, 217, 95, 130, 18, 217, 218, 34, 194], 281474976690176],
[[218, 140, 179, 160, 87, 48, 211, 238, 168, 39, 239, 120, 155, 55, 14, 101, 180, 207, 38, 200, 101, 223, 42, 0, 32, 182, 45, 49, 102, 206, 129, 198], 281474976702464],
[[9, 12, 81, 184, 24, 251, 48, 65, 240, 120, 65, 255, 28, 207, 23, 191, 169, 81, 95, 92, 242, 129, 116, 251, 216, 111, 249, 46, 37, 127, 33, 191], 281474976694272],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 281474976710656]
]
},
"current_counterparty_commit_info": {"feerate_per_kw": 1405, "is_counterparty_broadcaster": True, "offered_htlcs": [], "received_htlcs": [], "to_broadcaster_value_sat": 101430, "to_countersigner_value_sat": 1330},
"current_counterparty_point": "03ecb61cb9a984e727f38f94f5f298e18ebbbb4296a0bd408bb5003be156acafd0",
"current_counterparty_signatures": ["3044022044b87211cb947c15edb8331dc7600f731326e1315bc2bcbf40007d6032d74bef02201012db5ad200ee9af5d9c91a3291736ab86903fa0297f3d2664304c60bb1900d", []],
"current_holder_commit_info": {"feerate_per_kw": 1405, "is_counterparty_broadcaster": False, "offered_htlcs": [], "received_htlcs": [], "to_broadcaster_value_sat": 1330, "to_countersigner_value_sat": 101430},
"initial_holder_value": 0,
"next_counterparty_commit_num": 22089,
"next_counterparty_revoke_num": 22088,
"next_holder_commit_info": None,
"next_holder_commit_num": 22092,
"previous_counterparty_commit_info": None,
"previous_counterparty_point": "028dd8f530f122ebc4fb19fecd7c7a9312088db9dbb5d917516e2626c8d1d8e933"
},
"id": None
} Let"s dig in :-) |
Notice that this is my personal node, which is why I'm happy to share this information publicly. This is not something we do for user nodes, but in this case not having to jump through hoops is useful ^^ |
so, yes, it's looks desynced - CLN thinks that 22092 is the current holder commit num, and VLS thinks it's the next. but I was more interested in logs, to understand how we got there. |
or to put it more precisely: if 22092 is the current commit num, then 22091 must have been revoked. so the thing to check is that VLS actually got that revocation. if it didn't, then something is wrong on the CLN side. if it did, then something is wrong on VLS side. just to make sure about correct 2-phase commit: you first persist the VLS state, and only when that is successful you return the result to CLN, right? |
Yeah, I'll look through the logs asap to see how we got into this state (I have them pulled, just didn't have time to give them a go). The 2PC idea is essentially that we delay the ratcheting on the vls state until CLN has committed, and make the ratcheting idempotent (so that we can replay it against the signer to sync it up again). From what I can tell here CLN advanced for some reason but the VLS state lagged behind, so maybe this is a revocation that CLN processed but didn't quite forward to the signer yet? |
well, I don't see how that can logically happen, because VLS would not have released the revocation secret if it didn't actually revoke and persist. that's the mystery... |
Maybe VLS regressed the commitment number due to VLS #502 |
ah, very good point. will follow up offline |
the relevant fix is in 0.12, currently in release-candidate, should be final mid next week. |
to clarify, our fix prevents a specific desync scenario. it does not correct a desynced state that has already been persisted |
Some users have been reporting an issue with the VLS signer refusing to sign a channel re-establish (likely the commitment secret exchagne) due to the following error:
On the server-side we can see the same in the log lines:
Which then eventually times out the reconnection timeout, we try to pay anyway, but fail because no channels are available.
This does appear to be a new issue, but reminiscent of #431 which was fixed by v24.02. There appears to be another non-atomic transition in VLS <> CLN that we are not reflecting.
The text was updated successfully, but these errors were encountered: