mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
At cold start, if your node is behind the blocktip and you've sent your peer a blockheight counter from the future, we shouldn't confuse ourselves with our rollback/replay. Should fix flakes in CI that were spotting BROKEN blockheight updates. Logs below from a previuos CI fail (edited for relative clarity) The one that sasy "{ SENT_ADD_ACK_REVOCATION:111 }, our current 108` is the tell; the last line is the node finally catching up to the tip. In the test we get into this state by stopping and restarting the node. ``` 2023-07-22T11:24:28.2754533Z lightningd-1 2023-07-22T11:19:34.188Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-chan#2: Already have funding locked in 2023-07-22T11:24:28.2755486Z lightningd-1 2023-07-22T11:19:34.188Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-chan#2: attempting update blockheight a5b23dff5177badd6df725c efeb83ceccbfc52dc64a16b38894a41f0ad8fa181 2023-07-22T11:24:28.2755778Z lightningd-1 2023-07-22T11:19:34.188Z DEBUG lightningd: update_blockheight: height = 108 2023-07-22T11:24:28.2766210Z lightningd-1 2023-07-22T11:19:34.210Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#2: init LOCAL: remote_per_commit = 029563e7c898 5d8b95bdfe19e47e494bb8ec8d53ff4edb93f156be57667bfee8c9, old_remote_per_commit = 02bf3117c149d324361f0b418db8984b1e29af70c773eb2865a41ff7f583c7c9ed next_idx_local = 3 next_idx_remote = 3 revocations_recei ved = 2 feerates { SENT_ADD_ACK_REVOCATION:3750 } range 253-150000 blockheights { SENT_ADD_ACK_REVOCATION:111 }, our current 108 2023-07-22T11:24:28.2768866Z lightningd-1 2023-07-22T11:19:34.211Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#2: peer_out WIRE_CHANNEL_REESTABLISH 2023-07-22T11:24:28.2769416Z lightningd-1 2023-07-22T11:19:34.211Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#2: billboard: Sent reestablish, waiting for the irs 2023-07-22T11:24:28.2771115Z lightningd-1 2023-07-22T11:19:34.212Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#2: peer_in WIRE_CHANNEL_REESTABLISH 2023-07-22T11:24:28.2774150Z lightningd-1 2023-07-22T11:19:34.212Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#2: Got reestablish commit=3 revoke=2 2023-07-22T11:24:28.2776056Z lightningd-1 2023-07-22T11:19:34.212Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#2: next_revocation_number = 2 2023-07-22T11:24:28.2805639Z lightningd-1 2023-07-22T11:19:34.239Z **BROKEN** 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#2: current blockheight 108 less than last 111 2023-07-22T11:24:28.2823960Z lightningd-1 2023-07-22T11:19:34.240Z DEBUG lightningd: Adding block 109: 5f67b6e110eb3c3457bea4fcf0d04ce9be90efeee5df8e083ed4266074ca911f 2023-07-22T11:24:28.2833154Z lightningd-1 2023-07-22T11:19:34.251Z **BROKEN** 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#2: current blockheight 108 less than last 111 2023-07-22T11:24:28.2833630Z lightningd-1 2023-07-22T11:19:34.252Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#2: Trying commit 2023-07-22T11:24:28.2834165Z lightningd-1 2023-07-22T11:19:34.252Z **BROKEN** 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#2: current blockheight 108 less than last 111 2023-07-22T11:24:28.2835070Z lightningd-1 2023-07-22T11:19:34.252Z DEBUG 022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59-channeld-chan#2: Can't send commit: nothing to send, feechange not wanted ({ SENT_ADD_ACK_REVOCATION:3750 }) blockheight not wanted ({ SENT_ADD_ACK_REVOCATION:111 }) 2023-07-22T11:24:28.2835516Z lightningd-1 2023-07-22T11:19:34.350Z DEBUG lightningd: Adding block 110: 5f43f3ac9d808e3a309720d1b0727a00d5a3d3ddca71d97401e233637e87639c 2023-07-22T11:24:28.2835962Z lightningd-1 2023-07-22T11:19:34.476Z DEBUG lightningd: Adding block 111: 55b0d1e0a08ff6233e186e6735cb1cbec33e2b0a6e7d08f2622e8c1db30b54b9 ``` |
||
---|---|---|
.. | ||
test | ||
.gitignore | ||
anchorspend.c | ||
anchorspend.h | ||
bitcoind.c | ||
bitcoind.h | ||
chaintopology.c | ||
chaintopology.h | ||
channel.c | ||
channel.h | ||
channel_control.c | ||
channel_control.h | ||
channel_state.h | ||
closed_channel.c | ||
closed_channel.h | ||
closing_control.c | ||
closing_control.h | ||
coin_mvts.c | ||
coin_mvts.h | ||
configs.c | ||
connect_control.c | ||
connect_control.h | ||
datastore.c | ||
dual_open_control.c | ||
dual_open_control.h | ||
feerate.c | ||
feerate.h | ||
gossip_control.c | ||
gossip_control.h | ||
hsm_control.c | ||
hsm_control.h | ||
htlc_end.c | ||
htlc_end.h | ||
htlc_set.c | ||
htlc_set.h | ||
invoice.c | ||
invoice.h | ||
io_loop_with_timers.c | ||
io_loop_with_timers.h | ||
jsonrpc.c | ||
jsonrpc.h | ||
lightningd.c | ||
lightningd.h | ||
log.c | ||
log.h | ||
log_status.c | ||
log_status.h | ||
Makefile | ||
memdump.c | ||
memdump.h | ||
notification.c | ||
notification.h | ||
offer.c | ||
onchain_control.c | ||
onchain_control.h | ||
onion_message.c | ||
onion_message.h | ||
opening_common.c | ||
opening_common.h | ||
opening_control.c | ||
opening_control.h | ||
options.c | ||
options.h | ||
pay.c | ||
pay.h | ||
peer_control.c | ||
peer_control.h | ||
peer_fd.c | ||
peer_fd.h | ||
peer_htlcs.c | ||
peer_htlcs.h | ||
ping.c | ||
plugin.c | ||
plugin.h | ||
plugin_control.c | ||
plugin_control.h | ||
plugin_hook.c | ||
plugin_hook.h | ||
routehint.c | ||
routehint.h | ||
runes.c | ||
runes.h | ||
signmessage.c | ||
subd.c | ||
subd.h | ||
wait.c | ||
wait.h | ||
watch.c | ||
watch.h |