diff --git a/tests/events/bolt1-01-init.events b/tests/events/bolt1-01-init.events index b8e15cdc7..e4e068bcd 100644 --- a/tests/events/bolt1-01-init.events +++ b/tests/events/bolt1-01-init.events @@ -4,75 +4,75 @@ # Trivial variable to serve as a demonstration EXPECT_INIT=expect-send: type=init -1. connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 -2. $EXPECT_INIT -3. recv: type=init globalfeatures= localfeatures= +* connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 ++ $EXPECT_INIT ++ recv: type=init globalfeatures= localfeatures= - 1. nothing - 1. disconnect: + * nothing + * disconnect: -4. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 # Even if we don't send anything, it should send init. - 1. $EXPECT_INIT + * $EXPECT_INIT # Minimal possible init message. # Spec: MUST send `init` as the first Lightning message for any connection. - 1. $EXPECT_INIT - 2. recv: type=init globalfeatures= localfeatures= + * $EXPECT_INIT + + recv: type=init globalfeatures= localfeatures= # SHOULD NOT set features greater than 13 in `globalfeatures`. - 1. $EXPECT_INIT globalfeatures=000000/030000 + * $EXPECT_INIT globalfeatures=000000/030000 # init msg with unknown odd global bit (19): no error - 2. recv: type=init globalfeatures=020000 localfeatures= + + recv: type=init globalfeatures=020000 localfeatures= # Sanity check that bits 34 and 35 are not used! - 1. $EXPECT_INIT localfeatures=0000000000/0300000000 + * $EXPECT_INIT localfeatures=0000000000/0300000000 # init msg with unknown odd local bit (19): no error - 2. recv: type=init globalfeatures= localfeatures=020000 + + recv: type=init globalfeatures= localfeatures=020000 # init msg with unknown even global bit (34): you will error - 1. $EXPECT_INIT - 2. recv: type=init globalfeatures=0100000000 localfeatures= - 3. expect-error: + * $EXPECT_INIT + + recv: type=init globalfeatures=0100000000 localfeatures= + + expect-error: # init msg with unknown even local bit (34): you will error - 1. $EXPECT_INIT - 2. recv: type=init globalfeatures= localfeatures=0100000000 - 3. expect-error: + * $EXPECT_INIT + + recv: type=init globalfeatures= localfeatures=0100000000 + + expect-error: # If you don't support `option_data_loss_protect`, you will be ok if # we ask for it. - 1. $EXPECT_INIT localfeatures=00/03 !option_data_loss_protect - 2. recv: type=init globalfeatures= localfeatures=02 !option_data_loss_protect + * $EXPECT_INIT localfeatures=00/03 !option_data_loss_protect + + recv: type=init globalfeatures= localfeatures=02 !option_data_loss_protect # If you don't support `option_data_loss_protect`, you will error if # we require it. - 1. $EXPECT_INIT localfeatures=00/03 !option_data_loss_protect - 2. recv: type=init globalfeatures= localfeatures=01 !option_data_loss_protect - 3. expect-error: !option_data_loss_protect + * $EXPECT_INIT localfeatures=00/03 !option_data_loss_protect + + recv: type=init globalfeatures= localfeatures=01 !option_data_loss_protect + + expect-error: !option_data_loss_protect # If you support `option_data_loss_protect`, you will advertize it odd. - 1. $EXPECT_INIT localfeatures=02/03 option_data_loss_protect/odd + * $EXPECT_INIT localfeatures=02/03 option_data_loss_protect/odd # If you require `option_data_loss_protect`, you will advertize it even. - 1. $EXPECT_INIT localfeatures=01/03 option_data_loss_protect/even + * $EXPECT_INIT localfeatures=01/03 option_data_loss_protect/even # If you don't support `option_static_remotekey`, you will be ok if # we ask for it. - 1. $EXPECT_INIT localfeatures=0000/3000 !option_static_remotekey - 2. recv: type=init globalfeatures= localfeatures=2000 !option_static_remotekey + * $EXPECT_INIT localfeatures=0000/3000 !option_static_remotekey + + recv: type=init globalfeatures= localfeatures=2000 !option_static_remotekey # If you don't support `option_static_remotekey`, you will error if # we require it. - 1. $EXPECT_INIT localfeatures=0000/3000 !option_static_remotekey - 2. recv: type=init globalfeatures= localfeatures=1000 !option_static_remotekey - 3. expect-error: !option_static_remotekey + * $EXPECT_INIT localfeatures=0000/3000 !option_static_remotekey + + recv: type=init globalfeatures= localfeatures=1000 !option_static_remotekey + + expect-error: !option_static_remotekey # If you support `option_static_remotekey`, you will advertize it odd. - 1. $EXPECT_INIT localfeatures=2000/3000 option_static_remotekey/odd + * $EXPECT_INIT localfeatures=2000/3000 option_static_remotekey/odd # If you require `option_static_remotekey`, you will advertize it even. - 1. $EXPECT_INIT localfeatures=1000/3000 option_static_remotekey/even + * $EXPECT_INIT localfeatures=1000/3000 option_static_remotekey/even # Note: it's undefined what you'll do if implementation requires # an option and isn't offered it. The recipient of the required feature diff --git a/tests/events/bolt1-02-unknown-messages.events b/tests/events/bolt1-02-unknown-messages.events index 8881aa36d..7fbe8a821 100644 --- a/tests/events/bolt1-02-unknown-messages.events +++ b/tests/events/bolt1-02-unknown-messages.events @@ -8,15 +8,15 @@ # - upon receiving unknown _even_ feature bits that are non-zero: # - MUST fail the connection. -1. connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 -2. expect-send: type=init -3. recv: type=init globalfeatures= localfeatures= +* connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 ++ expect-send: type=init ++ recv: type=init globalfeatures= localfeatures= - 1. nothing + * nothing # Unknown odd is OK. - 1. recv: type=9999 + * recv: type=9999 # Unknown even causes error. - 1. recv: type=10000 - 2. expect-error: + * recv: type=10000 + + expect-error: diff --git a/tests/events/bolt2-01-open_channel.events b/tests/events/bolt2-01-open_channel.events index 8c0b3b855..22c91edfc 100644 --- a/tests/events/bolt2-01-open_channel.events +++ b/tests/events/bolt2-01-open_channel.events @@ -2,16 +2,16 @@ # include setup.incl -1. block: $BLOCK_102 +* block: $BLOCK_102 -2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 -3. expect-send: type=init -4. recv: type=init globalfeatures= localfeatures= ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 ++ expect-send: type=init ++ recv: type=init globalfeatures= localfeatures= # Start with the 'accepter' side of an open_channel (test runner initiates) # We assume a funding_per_kw=253 Satoshi/kSipa. # This gives a channel of 999878sat - 1. recv: type=open_channel + * recv: type=open_channel chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 funding_satoshis=999878 @@ -39,10 +39,10 @@ include setup.incl channel_flags=01 # Ignore unknown odd messages - 1. nothing - 1. recv: type=9999 + * nothing + * recv: type=9999 - 2. expect-send: type=accept_channel + + expect-send: type=accept_channel temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 # funding_privkey=0000000000000000000000000000000000000000000000000000000000000010 funding_pubkey=03e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a @@ -63,10 +63,10 @@ include setup.incl channel_reserve_satoshis=9998 # Ignore unknown messages - 1. nothing - 1. recv: type=9999 + * nothing + * recv: type=9999 - 3. recv: type=funding_created + + recv: type=funding_created temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 # Funding tx is 020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 # txid=41085b995c1f591cfc3ae79ccde012bf0b37c7bde23d80a61c9732bdd6210b2f @@ -75,32 +75,32 @@ include setup.incl # node's commitment tx is 02000000012f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b08410000000000f436a980010f410f0000000000160014749af8703f0d1fd8890a553bd62e9caf15f7bad44cff0020 signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:97b9f4b67c7d404c82f97d86d7e5b2689e366abf1609abd889143a5999c6df47) - 4. expect-send: type=funding_signed + + expect-send: type=funding_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 # test's commitment tx is 02000000012f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b08410000000000f436a980010f410f0000000000220020233d69d88092351875ce0b9fd5ea576b2307c539eaed7abdf97fbb26720f01ac4cff0020 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:49fcc656b58e78f639b8af4bca65fe1ee948ea36eb7629222320518e33a42f29) - 5. block: height=103 n=3 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 + + block: height=103 n=3 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 - 6. expect-send: type=funding_locked + + expect-send: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 - 7. recv: type=funding_locked + + recv: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d # Ignore unknown odd messages - 1. nothing - 1. recv: type=9999 + * nothing + * recv: type=9999 # Now we test the 'opener' side of an open_channel (node initiates) # We set funding_per_kw=253 Satoshi/kSipa. - 1. fundchannel: amount=999877 utxo=16835ac8c154b616baac524163f41fb0c4f82c7b972ad35d4d6f18d854f6856b/1 feerate=253perkw + * fundchannel: amount=999877 utxo=16835ac8c154b616baac524163f41fb0c4f82c7b972ad35d4d6f18d854f6856b/1 feerate=253perkw # This gives a channel of 999877sat - 1. expect-send: type=open_channel + * expect-send: type=open_channel chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 funding_satoshis=999877 @@ -128,10 +128,10 @@ include setup.incl channel_flags=01 # Ignore unknown odd messages - 1. nothing - 1. recv: type=9999 + * nothing + * recv: type=9999 - 2. recv: type=accept_channel + + recv: type=accept_channel temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 dust_limit_satoshis=546 max_htlc_value_in_flight_msat=4294967295 @@ -156,10 +156,10 @@ include setup.incl first_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 # Ignore unknown messages - 1. nothing - 1. recv: type=9999 + * nothing + * recv: type=9999 - 3. expect-send: type=funding_created + + expect-send: type=funding_created temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 # Funding tx is # txid=189c40b0728f382fe91c87270926584e48e0af3a6789f37454afee6c7560311d @@ -168,22 +168,22 @@ include setup.incl # opener's commitment tx is 02000000011d3160756ceeaf5474f389673aafe0484e58260927871ce92f388f72b0409c1800000000006d669280010e410f000000000022002002ea9a3a14d15893571391cb43308d0cf2c873025a7ee3e1c59fc94e7d0b820750e05c20 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:b5f455ab7e6dc6cbdd0e4f5ff9623091f5e2317d90215734f0b7b468b2de4d9f) - 4. recv: type=funding_signed + + recv: type=funding_signed channel_id=1d3160756ceeaf5474f389673aafe0484e58260927871ce92f388f72b0409c18 # accepter's commitment tx is 02000000011d3160756ceeaf5474f389673aafe0484e58260927871ce92f388f72b0409c1800000000006d669280010e410f000000000016001413619a3971c150996e7d1f391d9ade1405df87ec50e05c20 signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:9afc89f545df32a456355a74f435d9f40bdb0b255f38af3d19ff344ab3ea0ea1) - 5. block: height=103 n=3 + + block: height=103 n=3 - 6. recv: type=funding_locked + + recv: type=funding_locked channel_id=1d3160756ceeaf5474f389673aafe0484e58260927871ce92f388f72b0409c18 next_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d - 7. expect-send: type=funding_locked + + expect-send: type=funding_locked channel_id=1d3160756ceeaf5474f389673aafe0484e58260927871ce92f388f72b0409c18 next_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 # Ignore unknown odd messages - 1. nothing - 1. recv: type=9999 + * nothing + * recv: type=9999 diff --git a/tests/events/bolt2-02-add-htlc.events b/tests/events/bolt2-02-add-htlc.events index f528396ee..d90dfeedf 100644 --- a/tests/events/bolt2-02-add-htlc.events +++ b/tests/events/bolt2-02-add-htlc.events @@ -14,12 +14,12 @@ MAYBE_UPDATE=maybe-send: type=channel_update include setup.incl -1. block: $BLOCK_102 +* block: $BLOCK_102 -2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 -3. expect-send: type=init -4. recv: type=init globalfeatures= localfeatures=2002 -5. recv: type=open_channel ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 ++ expect-send: type=init ++ recv: type=init globalfeatures= localfeatures=2002 ++ recv: type=open_channel chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 funding_satoshis=999878 @@ -47,7 +47,7 @@ include setup.incl first_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 channel_flags=01 -6. expect-send: type=accept_channel ++ expect-send: type=accept_channel temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 # funding_privkey=0000000000000000000000000000000000000000000000000000000000000010 funding_pubkey=03e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a @@ -66,7 +66,7 @@ include setup.incl to_self_delay=6 channel_reserve_satoshis=9998 -7. recv: type=funding_created ++ recv: type=funding_created temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 # Funding tx is 020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 # txid=41085b995c1f591cfc3ae79ccde012bf0b37c7bde23d80a61c9732bdd6210b2f @@ -77,44 +77,44 @@ include setup.incl # option_static_remotekey: node's commitment tx is 02000000012f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b08410000000000f436a980010f410f0000000000160014e142ca9bfc2d56cd0adb82f8dc870424767389f74cff0020 signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:f116f87d1a90f2d598b37e922dd568a8757a703b197f00fb131d089060f32493) option_static_remotekey -8. expect-send: type=funding_signed ++ expect-send: type=funding_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 # test's commitment tx is 02000000012f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b08410000000000f436a980010f410f0000000000220020233d69d88092351875ce0b9fd5ea576b2307c539eaed7abdf97fbb26720f01ac4cff0020 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:49fcc656b58e78f639b8af4bca65fe1ee948ea36eb7629222320518e33a42f29) -9. block: height=103 n=3 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 ++ block: height=103 n=3 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 -10. expect-send: type=funding_locked ++ expect-send: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 -11. recv: type=funding_locked ++ recv: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 # per_commitment_secret #1 = dddc3a8d14fddf2b68fa8c7fbad2748274937479dd0f8930d5ebb4ab6bd866a3 next_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d -12. $MAYBE_UPDATE ++ $MAYBE_UPDATE # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init # Note: if we opened channel with option_static_remotekey, it stands even # if we don't negotiate it again! - 4. recv: type=init globalfeatures= localfeatures=2002 - 5. expect-send: type=channel_reestablish + + recv: type=init globalfeatures= localfeatures=2002 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=0 your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_data_loss_protect your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=0288a618cb6027c3218a37cbe9e882379f17d87d03f6e99d0b60292478d2aded06 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=0 @@ -124,22 +124,22 @@ include setup.incl my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE # BOLT #2: # - if `next_commitment_number` is 1 in both the # `channel_reestablish` it sent and received: # - MUST retransmit `funding_locked`. # - otherwise: # - MUST NOT retransmit `funding_locked`. - 8. expect-send: type=funding_locked + + expect-send: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 # That aside has nothing to do with the next aside. -13. nothing ++ nothing # Add a dust HTLC - 1. recv: type=update_add_htlc + * recv: type=update_add_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 amount_msat=1000 @@ -150,23 +150,23 @@ include setup.incl onion_routing_packet=0002eec7245d6b7d2ccb30380bfbe2a3648cd7a942653f5aa340edcea1f283686619b1153ae94698ea83a3298ab3c0ddd9f755853e4e5fbc5d4f3cb457bbb74a9b81d3b5bc9cf42d8617d1fe6966ffb66b8ec0eaa1188865957e26df123d11705395d339472bcc4920e428492f7822424eef8e6d903a768ec01959f3a1f2c1cd8725ba13329df3a932f641dee600dbb1a9f3bbe93a167410961f1777a7b48679d8a3041d57c0b8e795ed4884fbb33a2564d4cdafb528c7b63fc31cd2739e71d1d3b56f35ba7976a373b883eed8f1f263aedd540cce9b548e53e58c32ab604195f6004d8d92fe0a9a454229b9bc0795f3e4ccd54089075483afaa0ef3b32ee12cf321052f7b9e5ac1c28169e57d5628c3aee5c775d5fb33ba835fda195981b1e3a06792bdd0ecf85f8f6107fd830ca932e92c6713ea6d4d5129395f54aeabb54debccca130ad019a1f53a20c0c46dd8625ada068e2a13ea5373b60ecdf412728cc78192ae1a56bae26dfb450d2f6b4905e6bd9843fda7df63eb11fb77ce995b25d3076210eca527bb556b4ddc564fa4c6ccb43f1149163a4959ffe4178d653d35bdc052e4a46dd58b8f95fde83d114c4e35fd02e94a0dd2a9ae21594184808074a57d9de30c5105b53efe03aca192f8c518bc2b9e13211a9761c1948b31aa97f99da449968380005f96ff49a6e5fe833220a82f358eb94197584b2dfa5a1efee8918b5020f028748e5897bb694979f580ff58b8b1d865783340eaff2d1ce738409ec1c62c1bd7f632cf0730a5634a1a2d91244b865302339c1861655e11b264aeaf2feefbf2d1222bb13c6bd6b2d2379d9a548f93de4d2a044928458eafa745021e0a69796bb40f17c1ca53b895c76b53924faa886a4a19f07b50eda5f316e5f3b5422e984c59928144c275d4ae5e78634e16c6dafcfc92bb302c7d5eef1456250b0b8a41f0cabb55dd114d6b0bcaf53ef1ee2185d2383df57a0f1bc21d31f5d3ae395bab6e77370ee83ffe8995e9bfbe2f90b3ff0578720e0584e969479d40327415835579d7b8885037c02a611292c6bbffde25e86c184cc7c7481e8856ce6a3cf7109a6c001e51a2289c5ee3633936578d4dc3de82c18ebb787bf2c475e8fa0393727cbdbcd36849ee0b7411fba6fd5cb8459e63aaf3fba7a4cd4a04b266d8f416f0586e2093ea9c210140a6e6cb72759ae1dee7c24497f68389fb8d154f927cc4ab59b9137652eaf9c7cb56f0cce6c58616646c6fee836b07ce738a965b1ea725d9960c47e61086be053f3e9c48c08ce945404b060d9e699ad962c910208dda42d665f8eacf9865a64d2612ea62e0e2c0a4c731b35ae87b04e45739c34f4c972ce433a2094b10a9601e6711b95a6a226a85f4e4ed0e0417dbc9d737cd7d3513a82943de94ff8e4c9e91838506283f4878e3f41488fec47198b4a262b55d3691d275c6154d2a2ce9ee6ab97087e0f33654b01450869797c993dfca76cd732677bf1856f43d040d68022055987588f64af357bea80491b4bc42341dd6f81631d30fc28e8c5d7e3312655b30d277f10ce76c2525279ad53157b1c2c78b412107fc5f974ac7946bdc33ee54d71f3fc261530d50f20813e4e6aadf39e67573d5dc93a45023edf297b56def6b14ec5e19ca10fbfd1b807f17fa983bec363cf495c708a581db1bba1a23730ce22d0f925d764b04be014d662c3a36ac58b015317c9cf5ca6464f2ecef15e1769f2c91922968532bda66e9aaa2a7f120a9301f563fd33db8e90c940984b0a297e0c595544b7f687476325a07dbaba255c8461e98f069eea2246cfa50f1c2ef8d4c54f5fd509a9cc839548d7c252e60bb9c165d05f30bd525f6b53a4c8afc8fc31026686bcd5a48172593941b3113cbed88e6cfb566f7a693bb63c9a89925c1f5df0a115b4893128866a81c1b # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=2002 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=2002 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=0 your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_data_loss_protect your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=0288a618cb6027c3218a37cbe9e882379f17d87d03f6e99d0b60292478d2aded06 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=0 @@ -175,11 +175,11 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE - 8. expect-send: type=funding_locked + + $MAYBE_UPDATE + + expect-send: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 - 9. recv: type=update_add_htlc + + recv: type=update_add_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 amount_msat=1000 @@ -189,42 +189,42 @@ include setup.incl # hop_data[0] = 00000000000000000000000000000003E8000000C8000000000000000000000000 onion_routing_packet=0002eec7245d6b7d2ccb30380bfbe2a3648cd7a942653f5aa340edcea1f283686619b1153ae94698ea83a3298ab3c0ddd9f755853e4e5fbc5d4f3cb457bbb74a9b81d3b5bc9cf42d8617d1fe6966ffb66b8ec0eaa1188865957e26df123d11705395d339472bcc4920e428492f7822424eef8e6d903a768ec01959f3a1f2c1cd8725ba13329df3a932f641dee600dbb1a9f3bbe93a167410961f1777a7b48679d8a3041d57c0b8e795ed4884fbb33a2564d4cdafb528c7b63fc31cd2739e71d1d3b56f35ba7976a373b883eed8f1f263aedd540cce9b548e53e58c32ab604195f6004d8d92fe0a9a454229b9bc0795f3e4ccd54089075483afaa0ef3b32ee12cf321052f7b9e5ac1c28169e57d5628c3aee5c775d5fb33ba835fda195981b1e3a06792bdd0ecf85f8f6107fd830ca932e92c6713ea6d4d5129395f54aeabb54debccca130ad019a1f53a20c0c46dd8625ada068e2a13ea5373b60ecdf412728cc78192ae1a56bae26dfb450d2f6b4905e6bd9843fda7df63eb11fb77ce995b25d3076210eca527bb556b4ddc564fa4c6ccb43f1149163a4959ffe4178d653d35bdc052e4a46dd58b8f95fde83d114c4e35fd02e94a0dd2a9ae21594184808074a57d9de30c5105b53efe03aca192f8c518bc2b9e13211a9761c1948b31aa97f99da449968380005f96ff49a6e5fe833220a82f358eb94197584b2dfa5a1efee8918b5020f028748e5897bb694979f580ff58b8b1d865783340eaff2d1ce738409ec1c62c1bd7f632cf0730a5634a1a2d91244b865302339c1861655e11b264aeaf2feefbf2d1222bb13c6bd6b2d2379d9a548f93de4d2a044928458eafa745021e0a69796bb40f17c1ca53b895c76b53924faa886a4a19f07b50eda5f316e5f3b5422e984c59928144c275d4ae5e78634e16c6dafcfc92bb302c7d5eef1456250b0b8a41f0cabb55dd114d6b0bcaf53ef1ee2185d2383df57a0f1bc21d31f5d3ae395bab6e77370ee83ffe8995e9bfbe2f90b3ff0578720e0584e969479d40327415835579d7b8885037c02a611292c6bbffde25e86c184cc7c7481e8856ce6a3cf7109a6c001e51a2289c5ee3633936578d4dc3de82c18ebb787bf2c475e8fa0393727cbdbcd36849ee0b7411fba6fd5cb8459e63aaf3fba7a4cd4a04b266d8f416f0586e2093ea9c210140a6e6cb72759ae1dee7c24497f68389fb8d154f927cc4ab59b9137652eaf9c7cb56f0cce6c58616646c6fee836b07ce738a965b1ea725d9960c47e61086be053f3e9c48c08ce945404b060d9e699ad962c910208dda42d665f8eacf9865a64d2612ea62e0e2c0a4c731b35ae87b04e45739c34f4c972ce433a2094b10a9601e6711b95a6a226a85f4e4ed0e0417dbc9d737cd7d3513a82943de94ff8e4c9e91838506283f4878e3f41488fec47198b4a262b55d3691d275c6154d2a2ce9ee6ab97087e0f33654b01450869797c993dfca76cd732677bf1856f43d040d68022055987588f64af357bea80491b4bc42341dd6f81631d30fc28e8c5d7e3312655b30d277f10ce76c2525279ad53157b1c2c78b412107fc5f974ac7946bdc33ee54d71f3fc261530d50f20813e4e6aadf39e67573d5dc93a45023edf297b56def6b14ec5e19ca10fbfd1b807f17fa983bec363cf495c708a581db1bba1a23730ce22d0f925d764b04be014d662c3a36ac58b015317c9cf5ca6464f2ecef15e1769f2c91922968532bda66e9aaa2a7f120a9301f563fd33db8e90c940984b0a297e0c595544b7f687476325a07dbaba255c8461e98f069eea2246cfa50f1c2ef8d4c54f5fd509a9cc839548d7c252e60bb9c165d05f30bd525f6b53a4c8afc8fc31026686bcd5a48172593941b3113cbed88e6cfb566f7a693bb63c9a89925c1f5df0a115b4893128866a81c1b - 2. recv: type=commitment_signed + + recv: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:15d8bb3b8ec14a670144d6d06c399e68fe8cf472d889ed65084d86da20064930) !option_static_remotekey signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:a52afdb15b8282c140516e809793bafb5d7d8f20d246ffe390e837c6a03889b8) option_static_remotekey htlc_signature= - 3. expect-send: type=revoke_and_ack + + expect-send: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=7cc854b54e3e0dcdb010d7a3fee464a9687be6e8db3be6854c475621e007a5dc # per_commitment_secret 2=2273e227a5b7449b6e70f1fb4652864038b1cbf9cd7c043a7d6456b7fc275ad8 next_per_commitment_point=03bca7c4ebe7eb7e8e40b8c2a7b4dde7f4d48404c9a62859d09fe2d00151af40ad - 4. expect-send: type=commitment_signed + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:8319b604143b4dedec0f3670abdf7d1a1c320aaefe589dba4aefbb1d083ec22d) htlc_signature= # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 # If tester did not receive node's revoke_and_ack: - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=2002 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=2002 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=0 your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_data_loss_protect your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=0 @@ -233,31 +233,31 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE # - MUST re-send the `revoke_and_ack`. - 8. expect-send: type=revoke_and_ack + + expect-send: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=7cc854b54e3e0dcdb010d7a3fee464a9687be6e8db3be6854c475621e007a5dc # per_commitment_secret 2=2273e227a5b7449b6e70f1fb4652864038b1cbf9cd7c043a7d6456b7fc275ad8 next_per_commitment_point=03bca7c4ebe7eb7e8e40b8c2a7b4dde7f4d48404c9a62859d09fe2d00151af40ad - 9. expect-send: type=commitment_signed + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:8319b604143b4dedec0f3670abdf7d1a1c320aaefe589dba4aefbb1d083ec22d) htlc_signature= # If tester did receive node's revoke_and_ack, but not commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=2002 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=2002 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=0 your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_data_loss_protect your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=1 @@ -266,25 +266,25 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE - 8. expect-send: type=commitment_signed + + $MAYBE_UPDATE + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:8319b604143b4dedec0f3670abdf7d1a1c320aaefe589dba4aefbb1d083ec22d) htlc_signature= # If tester did receive node's commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=2002 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=2002 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=0 your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_data_loss_protect your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -293,33 +293,33 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE - 5. recv: type=revoke_and_ack + + recv: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 # per_commitment_secret #2=c51a18b13e8527e579ec56365482c62f180b7d5760b46e9477dae59e87ed423a next_per_commitment_point=02e1ea4f6d28dade887280214c359fc808066a64e750e3c81747dc3074833ff0ad # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 # tester must have received node's commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=2002 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=2002 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_data_loss_protect your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -328,10 +328,10 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE # Add a non-dust HTLC - 1. recv: type=update_add_htlc + * recv: type=update_add_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 amount_msat=1000000 @@ -342,23 +342,23 @@ include setup.incl onion_routing_packet=0002eec7245d6b7d2ccb30380bfbe2a3648cd7a942653f5aa340edcea1f283686619b1153ae94698ea83a3298ab3c0ddd6b6fd853e4e5fbc5d4f3cb457bbb74a9b81d3b5bc9cf42d8617d1fe6966ffb66b8ec0eaa1188865957e26df123d11705395d339472bcc4920e428492f7822424eef8e6d903a768ec01959f3a1f2c1cd8725ba13329df3a932f641dee600dbb1a9f3bbe93a167410961f1777a7b48679d8a3041d57c0b8e795ed4884fbb33a2564d4cdafb528c7b63fc31cd2739e71d1d3b56f35ba7976a373b883eed8f1f263aedd540cce9b548e53e58c32ab604195f6004d8d92fe0a9a454229b9bc0795f3e4ccd54089075483afaa0ef3b32ee12cf321052f7b9e5ac1c28169e57d5628c3aee5c775d5fb33ba835fda195981b1e3a06792bdd0ecf85f8f6107fd830ca932e92c6713ea6d4d5129395f54aeabb54debccca130ad019a1f53a20c0c46dd8625ada068e2a13ea5373b60ecdf412728cc78192ae1a56bae26dfb450d2f6b4905e6bd9843fda7df63eb11fb77ce995b25d3076210eca527bb556b4ddc564fa4c6ccb43f1149163a4959ffe4178d653d35bdc052e4a46dd58b8f95fde83d114c4e35fd02e94a0dd2a9ae21594184808074a57d9de30c5105b53efe03aca192f8c518bc2b9e13211a9761c1948b31aa97f99da449968380005f96ff49a6e5fe833220a82f358eb94197584b2dfa5a1efee8918b5020f028748e5897bb694979f580ff58b8b1d865783340eaff2d1ce738409ec1c62c1bd7f632cf0730a5634a1a2d91244b865302339c1861655e11b264aeaf2feefbf2d1222bb13c6bd6b2d2379d9a548f93de4d2a044928458eafa745021e0a69796bb40f17c1ca53b895c76b53924faa886a4a19f07b50eda5f316e5f3b5422e984c59928144c275d4ae5e78634e16c6dafcfc92bb302c7d5eef1456250b0b8a41f0cabb55dd114d6b0bcaf53ef1ee2185d2383df57a0f1bc21d31f5d3ae395bab6e77370ee83ffe8995e9bfbe2f90b3ff0578720e0584e969479d40327415835579d7b8885037c02a611292c6bbffde25e86c184cc7c7481e8856ce6a3cf7109a6c001e51a2289c5ee3633936578d4dc3de82c18ebb787bf2c475e8fa0393727cbdbcd36849ee0b7411fba6fd5cb8459e63aaf3fba7a4cd4a04b266d8f416f0586e2093ea9c210140a6e6cb72759ae1dee7c24497f68389fb8d154f927cc4ab59b9137652eaf9c7cb56f0cce6c58616646c6fee836b07ce738a965b1ea725d9960c47e61086be053f3e9c48c08ce945404b060d9e699ad962c910208dda42d665f8eacf9865a64d2612ea62e0e2c0a4c731b35ae87b04e45739c34f4c972ce433a2094b10a9601e6711b95a6a226a85f4e4ed0e0417dbc9d737cd7d3513a82943de94ff8e4c9e91838506283f4878e3f41488fec47198b4a262b55d3691d275c6154d2a2ce9ee6ab97087e0f33654b01450869797c993dfca76cd732677bf1856f43d040d68022055987588f64af357bea80491b4bc42341dd6f81631d30fc28e8c5d7e3312655b30d277f10ce76c2525279ad53157b1c2c78b412107fc5f974ac7946bdc33ee54d71f3fc261530d50f20813e4e6aadf39e67573d5dc93a45023edf297b56def6b14ec5e19ca10fbfd1b807f17fa983bec363cf495c708a581db1bba1a23730ce22d0f925d764b04be014d662c3a36ac58b015317c9cf5ca6464f2ecef15e1769f2c91922968532bda66e9aaa2a7f120a9301f563fd33db8e90c940984b0a297e0c595544b7f687476325a07dbaba255c8461e98f069eea2246cfa50f1c2ef8d4c54f5fd509a9cc839548d7c252e60bb9c165d05f30bd525f6b53a4c8afc8fc31026686bcd5a48172593941b1450d92edf1300d7cfd2ffa175ab1c551817d67b9d095c976faaa23e598ba243 # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=2002 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=2002 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=0 your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_data_loss_protect your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=0288a618cb6027c3218a37cbe9e882379f17d87d03f6e99d0b60292478d2aded06 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=0 @@ -367,11 +367,11 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE - 8. expect-send: type=funding_locked + + $MAYBE_UPDATE + + expect-send: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 - 9. recv: type=update_add_htlc + + recv: type=update_add_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 amount_msat=1000000 @@ -381,7 +381,7 @@ include setup.incl # hop_data[0] = 00000000000000000000000000000F4240000000C8000000000000000000000000 onion_routing_packet=0002eec7245d6b7d2ccb30380bfbe2a3648cd7a942653f5aa340edcea1f283686619b1153ae94698ea83a3298ab3c0ddd6b6fd853e4e5fbc5d4f3cb457bbb74a9b81d3b5bc9cf42d8617d1fe6966ffb66b8ec0eaa1188865957e26df123d11705395d339472bcc4920e428492f7822424eef8e6d903a768ec01959f3a1f2c1cd8725ba13329df3a932f641dee600dbb1a9f3bbe93a167410961f1777a7b48679d8a3041d57c0b8e795ed4884fbb33a2564d4cdafb528c7b63fc31cd2739e71d1d3b56f35ba7976a373b883eed8f1f263aedd540cce9b548e53e58c32ab604195f6004d8d92fe0a9a454229b9bc0795f3e4ccd54089075483afaa0ef3b32ee12cf321052f7b9e5ac1c28169e57d5628c3aee5c775d5fb33ba835fda195981b1e3a06792bdd0ecf85f8f6107fd830ca932e92c6713ea6d4d5129395f54aeabb54debccca130ad019a1f53a20c0c46dd8625ada068e2a13ea5373b60ecdf412728cc78192ae1a56bae26dfb450d2f6b4905e6bd9843fda7df63eb11fb77ce995b25d3076210eca527bb556b4ddc564fa4c6ccb43f1149163a4959ffe4178d653d35bdc052e4a46dd58b8f95fde83d114c4e35fd02e94a0dd2a9ae21594184808074a57d9de30c5105b53efe03aca192f8c518bc2b9e13211a9761c1948b31aa97f99da449968380005f96ff49a6e5fe833220a82f358eb94197584b2dfa5a1efee8918b5020f028748e5897bb694979f580ff58b8b1d865783340eaff2d1ce738409ec1c62c1bd7f632cf0730a5634a1a2d91244b865302339c1861655e11b264aeaf2feefbf2d1222bb13c6bd6b2d2379d9a548f93de4d2a044928458eafa745021e0a69796bb40f17c1ca53b895c76b53924faa886a4a19f07b50eda5f316e5f3b5422e984c59928144c275d4ae5e78634e16c6dafcfc92bb302c7d5eef1456250b0b8a41f0cabb55dd114d6b0bcaf53ef1ee2185d2383df57a0f1bc21d31f5d3ae395bab6e77370ee83ffe8995e9bfbe2f90b3ff0578720e0584e969479d40327415835579d7b8885037c02a611292c6bbffde25e86c184cc7c7481e8856ce6a3cf7109a6c001e51a2289c5ee3633936578d4dc3de82c18ebb787bf2c475e8fa0393727cbdbcd36849ee0b7411fba6fd5cb8459e63aaf3fba7a4cd4a04b266d8f416f0586e2093ea9c210140a6e6cb72759ae1dee7c24497f68389fb8d154f927cc4ab59b9137652eaf9c7cb56f0cce6c58616646c6fee836b07ce738a965b1ea725d9960c47e61086be053f3e9c48c08ce945404b060d9e699ad962c910208dda42d665f8eacf9865a64d2612ea62e0e2c0a4c731b35ae87b04e45739c34f4c972ce433a2094b10a9601e6711b95a6a226a85f4e4ed0e0417dbc9d737cd7d3513a82943de94ff8e4c9e91838506283f4878e3f41488fec47198b4a262b55d3691d275c6154d2a2ce9ee6ab97087e0f33654b01450869797c993dfca76cd732677bf1856f43d040d68022055987588f64af357bea80491b4bc42341dd6f81631d30fc28e8c5d7e3312655b30d277f10ce76c2525279ad53157b1c2c78b412107fc5f974ac7946bdc33ee54d71f3fc261530d50f20813e4e6aadf39e67573d5dc93a45023edf297b56def6b14ec5e19ca10fbfd1b807f17fa983bec363cf495c708a581db1bba1a23730ce22d0f925d764b04be014d662c3a36ac58b015317c9cf5ca6464f2ecef15e1769f2c91922968532bda66e9aaa2a7f120a9301f563fd33db8e90c940984b0a297e0c595544b7f687476325a07dbaba255c8461e98f069eea2246cfa50f1c2ef8d4c54f5fd509a9cc839548d7c252e60bb9c165d05f30bd525f6b53a4c8afc8fc31026686bcd5a48172593941b1450d92edf1300d7cfd2ffa175ab1c551817d67b9d095c976faaa23e598ba243 - 2. recv: type=commitment_signed + + recv: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 # !option_static_remotekey: ## remote_commitment @@ -402,13 +402,13 @@ include setup.incl signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:5a077920e9a7ec1a548de73b44987193d561f0d7b3648e0147b07775fabd2500) option_static_remotekey htlc_signature=SIG(54b99d3db5bbf9326bcadd27ff599ec9ec286469482482c1f92f70b31e786177:cf81dc68974679ec580ace3aa26e46c06b2bfff16ebf51ccf3c34228b5635339) option_static_remotekey - 3. expect-send: type=revoke_and_ack + + expect-send: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=7cc854b54e3e0dcdb010d7a3fee464a9687be6e8db3be6854c475621e007a5dc # per_commitment_secret 2=2273e227a5b7449b6e70f1fb4652864038b1cbf9cd7c043a7d6456b7fc275ad8 next_per_commitment_point=03bca7c4ebe7eb7e8e40b8c2a7b4dde7f4d48404c9a62859d09fe2d00151af40ad - 4. expect-send: type=commitment_signed + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 # Note: because we only have to-self output, signatures don't change # with option_static_remotekey @@ -416,24 +416,24 @@ include setup.incl htlc_signature=SIG(94549ae2f31fa7adf477a20c34d7c43ec5c4f2144c3ed7281127b00c85f02139:e96e9d7044cb56d55f124a7493f9c13b6389e64ce31efd22e04bb9809a4c3394) # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 # If tester did not receive node's revoke_and_ack: - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=2002 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=2002 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=0 your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_data_loss_protect your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=0 @@ -442,31 +442,31 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE # - MUST re-send the `revoke_and_ack`. - 8. expect-send: type=revoke_and_ack + + expect-send: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=7cc854b54e3e0dcdb010d7a3fee464a9687be6e8db3be6854c475621e007a5dc # per_commitment_secret 2=2273e227a5b7449b6e70f1fb4652864038b1cbf9cd7c043a7d6456b7fc275ad8 next_per_commitment_point=03bca7c4ebe7eb7e8e40b8c2a7b4dde7f4d48404c9a62859d09fe2d00151af40ad - 9. expect-send: type=commitment_signed + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:6dd008b3a07ec3d19a15eecb5982ef762f43ad04966a279d328062dbb2c1e64b) htlc_signature=SIG(94549ae2f31fa7adf477a20c34d7c43ec5c4f2144c3ed7281127b00c85f02139:e96e9d7044cb56d55f124a7493f9c13b6389e64ce31efd22e04bb9809a4c3394) # If tester did receive node's revoke_and_ack, but not commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=2002 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=2002 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=0 your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_data_loss_protect your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=1 @@ -475,25 +475,25 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE - 8. expect-send: type=commitment_signed + + $MAYBE_UPDATE + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:6dd008b3a07ec3d19a15eecb5982ef762f43ad04966a279d328062dbb2c1e64b) htlc_signature=SIG(94549ae2f31fa7adf477a20c34d7c43ec5c4f2144c3ed7281127b00c85f02139:e96e9d7044cb56d55f124a7493f9c13b6389e64ce31efd22e04bb9809a4c3394) # If tester did receive node's commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=2002 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=2002 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=0 your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_data_loss_protect your_last_per_commitment_secret=0000000000000000000000000000000000000000000000000000000000000000 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -502,33 +502,33 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE - 5. recv: type=revoke_and_ack + + recv: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 # per_commitment_secret #2=c51a18b13e8527e579ec56365482c62f180b7d5760b46e9477dae59e87ed423a next_per_commitment_point=02e1ea4f6d28dade887280214c359fc808066a64e750e3c81747dc3074833ff0ad # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 # tester must have received node's commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=2002 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=2002 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_data_loss_protect your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -537,4 +537,4 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE diff --git a/tests/events/bolt2-03-htlc-fail.events b/tests/events/bolt2-03-htlc-fail.events index e7c397476..45bead717 100644 --- a/tests/events/bolt2-03-htlc-fail.events +++ b/tests/events/bolt2-03-htlc-fail.events @@ -14,12 +14,12 @@ MAYBE_UPDATE=maybe-send: type=channel_update include setup.incl -1. block: $BLOCK_102 +* block: $BLOCK_102 -2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 -3. expect-send: type=init -4. recv: type=init globalfeatures= localfeatures=2002 -5. recv: type=open_channel ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 ++ expect-send: type=init ++ recv: type=init globalfeatures= localfeatures=2002 ++ recv: type=open_channel chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 funding_satoshis=999878 @@ -47,7 +47,7 @@ include setup.incl first_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 channel_flags=01 -6. expect-send: type=accept_channel ++ expect-send: type=accept_channel temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 # funding_privkey=0000000000000000000000000000000000000000000000000000000000000010 funding_pubkey=03e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a @@ -66,7 +66,7 @@ include setup.incl to_self_delay=6 channel_reserve_satoshis=9998 -7. recv: type=funding_created ++ recv: type=funding_created temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 # Funding tx is 020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 # txid=41085b995c1f591cfc3ae79ccde012bf0b37c7bde23d80a61c9732bdd6210b2f @@ -77,26 +77,26 @@ include setup.incl # option_static_remotekey: node's commitment tx is 02000000012f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b08410000000000f436a980010f410f0000000000160014e142ca9bfc2d56cd0adb82f8dc870424767389f74cff0020 signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:f116f87d1a90f2d598b37e922dd568a8757a703b197f00fb131d089060f32493) option_static_remotekey -8. expect-send: type=funding_signed ++ expect-send: type=funding_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 # test's commitment tx is 02000000012f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b08410000000000f436a980010f410f0000000000220020233d69d88092351875ce0b9fd5ea576b2307c539eaed7abdf97fbb26720f01ac4cff0020 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:49fcc656b58e78f639b8af4bca65fe1ee948ea36eb7629222320518e33a42f29) -9. block: height=103 n=3 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 ++ block: height=103 n=3 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 -10. expect-send: type=funding_locked ++ expect-send: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 -11. recv: type=funding_locked ++ recv: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 # per_commitment_secret #1 = dddc3a8d14fddf2b68fa8c7fbad2748274937479dd0f8930d5ebb4ab6bd866a3 next_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d -12. $MAYBE_UPDATE ++ $MAYBE_UPDATE # Add a dust HTLC - 1. recv: type=update_add_htlc + * recv: type=update_add_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 amount_msat=1000 @@ -106,45 +106,45 @@ include setup.incl # hop_data[0] = 00000000000000000000000000000003E8000000C8000000000000000000000000 onion_routing_packet=0002eec7245d6b7d2ccb30380bfbe2a3648cd7a942653f5aa340edcea1f283686619b1153ae94698ea83a3298ab3c0ddd9f755853e4e5fbc5d4f3cb457bbb74a9b81d3b5bc9cf42d8617d1fe6966ffb66b8ec0eaa1188865957e26df123d11705395d339472bcc4920e428492f7822424eef8e6d903a768ec01959f3a1f2c1cd8725ba13329df3a932f641dee600dbb1a9f3bbe93a167410961f1777a7b48679d8a3041d57c0b8e795ed4884fbb33a2564d4cdafb528c7b63fc31cd2739e71d1d3b56f35ba7976a373b883eed8f1f263aedd540cce9b548e53e58c32ab604195f6004d8d92fe0a9a454229b9bc0795f3e4ccd54089075483afaa0ef3b32ee12cf321052f7b9e5ac1c28169e57d5628c3aee5c775d5fb33ba835fda195981b1e3a06792bdd0ecf85f8f6107fd830ca932e92c6713ea6d4d5129395f54aeabb54debccca130ad019a1f53a20c0c46dd8625ada068e2a13ea5373b60ecdf412728cc78192ae1a56bae26dfb450d2f6b4905e6bd9843fda7df63eb11fb77ce995b25d3076210eca527bb556b4ddc564fa4c6ccb43f1149163a4959ffe4178d653d35bdc052e4a46dd58b8f95fde83d114c4e35fd02e94a0dd2a9ae21594184808074a57d9de30c5105b53efe03aca192f8c518bc2b9e13211a9761c1948b31aa97f99da449968380005f96ff49a6e5fe833220a82f358eb94197584b2dfa5a1efee8918b5020f028748e5897bb694979f580ff58b8b1d865783340eaff2d1ce738409ec1c62c1bd7f632cf0730a5634a1a2d91244b865302339c1861655e11b264aeaf2feefbf2d1222bb13c6bd6b2d2379d9a548f93de4d2a044928458eafa745021e0a69796bb40f17c1ca53b895c76b53924faa886a4a19f07b50eda5f316e5f3b5422e984c59928144c275d4ae5e78634e16c6dafcfc92bb302c7d5eef1456250b0b8a41f0cabb55dd114d6b0bcaf53ef1ee2185d2383df57a0f1bc21d31f5d3ae395bab6e77370ee83ffe8995e9bfbe2f90b3ff0578720e0584e969479d40327415835579d7b8885037c02a611292c6bbffde25e86c184cc7c7481e8856ce6a3cf7109a6c001e51a2289c5ee3633936578d4dc3de82c18ebb787bf2c475e8fa0393727cbdbcd36849ee0b7411fba6fd5cb8459e63aaf3fba7a4cd4a04b266d8f416f0586e2093ea9c210140a6e6cb72759ae1dee7c24497f68389fb8d154f927cc4ab59b9137652eaf9c7cb56f0cce6c58616646c6fee836b07ce738a965b1ea725d9960c47e61086be053f3e9c48c08ce945404b060d9e699ad962c910208dda42d665f8eacf9865a64d2612ea62e0e2c0a4c731b35ae87b04e45739c34f4c972ce433a2094b10a9601e6711b95a6a226a85f4e4ed0e0417dbc9d737cd7d3513a82943de94ff8e4c9e91838506283f4878e3f41488fec47198b4a262b55d3691d275c6154d2a2ce9ee6ab97087e0f33654b01450869797c993dfca76cd732677bf1856f43d040d68022055987588f64af357bea80491b4bc42341dd6f81631d30fc28e8c5d7e3312655b30d277f10ce76c2525279ad53157b1c2c78b412107fc5f974ac7946bdc33ee54d71f3fc261530d50f20813e4e6aadf39e67573d5dc93a45023edf297b56def6b14ec5e19ca10fbfd1b807f17fa983bec363cf495c708a581db1bba1a23730ce22d0f925d764b04be014d662c3a36ac58b015317c9cf5ca6464f2ecef15e1769f2c91922968532bda66e9aaa2a7f120a9301f563fd33db8e90c940984b0a297e0c595544b7f687476325a07dbaba255c8461e98f069eea2246cfa50f1c2ef8d4c54f5fd509a9cc839548d7c252e60bb9c165d05f30bd525f6b53a4c8afc8fc31026686bcd5a48172593941b3113cbed88e6cfb566f7a693bb63c9a89925c1f5df0a115b4893128866a81c1b - 2. recv: type=commitment_signed + + recv: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:15d8bb3b8ec14a670144d6d06c399e68fe8cf472d889ed65084d86da20064930) !option_static_remotekey signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:a52afdb15b8282c140516e809793bafb5d7d8f20d246ffe390e837c6a03889b8) option_static_remotekey htlc_signature= - 3. expect-send: type=revoke_and_ack + + expect-send: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=7cc854b54e3e0dcdb010d7a3fee464a9687be6e8db3be6854c475621e007a5dc # per_commitment_secret 2=2273e227a5b7449b6e70f1fb4652864038b1cbf9cd7c043a7d6456b7fc275ad8 next_per_commitment_point=03bca7c4ebe7eb7e8e40b8c2a7b4dde7f4d48404c9a62859d09fe2d00151af40ad - 4. expect-send: type=commitment_signed + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:8319b604143b4dedec0f3670abdf7d1a1c320aaefe589dba4aefbb1d083ec22d) htlc_signature= - 5. recv: type=revoke_and_ack + + recv: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 # per_commitment_secret #2=c51a18b13e8527e579ec56365482c62f180b7d5760b46e9477dae59e87ed423a next_per_commitment_point=02e1ea4f6d28dade887280214c359fc808066a64e750e3c81747dc3074833ff0ad # Optional reconnection testing. - 1. nothing + * nothing # tester must have received node's commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_data_loss_protect your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -153,10 +153,10 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE # Add a non-dust HTLC - 1. recv: type=update_add_htlc + * recv: type=update_add_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 amount_msat=1000000 @@ -166,46 +166,46 @@ include setup.incl # hop_data[0] = 00000000000000000000000000000F4240000000C8000000000000000000000000 onion_routing_packet=0002eec7245d6b7d2ccb30380bfbe2a3648cd7a942653f5aa340edcea1f283686619b1153ae94698ea83a3298ab3c0ddd6b6fd853e4e5fbc5d4f3cb457bbb74a9b81d3b5bc9cf42d8617d1fe6966ffb66b8ec0eaa1188865957e26df123d11705395d339472bcc4920e428492f7822424eef8e6d903a768ec01959f3a1f2c1cd8725ba13329df3a932f641dee600dbb1a9f3bbe93a167410961f1777a7b48679d8a3041d57c0b8e795ed4884fbb33a2564d4cdafb528c7b63fc31cd2739e71d1d3b56f35ba7976a373b883eed8f1f263aedd540cce9b548e53e58c32ab604195f6004d8d92fe0a9a454229b9bc0795f3e4ccd54089075483afaa0ef3b32ee12cf321052f7b9e5ac1c28169e57d5628c3aee5c775d5fb33ba835fda195981b1e3a06792bdd0ecf85f8f6107fd830ca932e92c6713ea6d4d5129395f54aeabb54debccca130ad019a1f53a20c0c46dd8625ada068e2a13ea5373b60ecdf412728cc78192ae1a56bae26dfb450d2f6b4905e6bd9843fda7df63eb11fb77ce995b25d3076210eca527bb556b4ddc564fa4c6ccb43f1149163a4959ffe4178d653d35bdc052e4a46dd58b8f95fde83d114c4e35fd02e94a0dd2a9ae21594184808074a57d9de30c5105b53efe03aca192f8c518bc2b9e13211a9761c1948b31aa97f99da449968380005f96ff49a6e5fe833220a82f358eb94197584b2dfa5a1efee8918b5020f028748e5897bb694979f580ff58b8b1d865783340eaff2d1ce738409ec1c62c1bd7f632cf0730a5634a1a2d91244b865302339c1861655e11b264aeaf2feefbf2d1222bb13c6bd6b2d2379d9a548f93de4d2a044928458eafa745021e0a69796bb40f17c1ca53b895c76b53924faa886a4a19f07b50eda5f316e5f3b5422e984c59928144c275d4ae5e78634e16c6dafcfc92bb302c7d5eef1456250b0b8a41f0cabb55dd114d6b0bcaf53ef1ee2185d2383df57a0f1bc21d31f5d3ae395bab6e77370ee83ffe8995e9bfbe2f90b3ff0578720e0584e969479d40327415835579d7b8885037c02a611292c6bbffde25e86c184cc7c7481e8856ce6a3cf7109a6c001e51a2289c5ee3633936578d4dc3de82c18ebb787bf2c475e8fa0393727cbdbcd36849ee0b7411fba6fd5cb8459e63aaf3fba7a4cd4a04b266d8f416f0586e2093ea9c210140a6e6cb72759ae1dee7c24497f68389fb8d154f927cc4ab59b9137652eaf9c7cb56f0cce6c58616646c6fee836b07ce738a965b1ea725d9960c47e61086be053f3e9c48c08ce945404b060d9e699ad962c910208dda42d665f8eacf9865a64d2612ea62e0e2c0a4c731b35ae87b04e45739c34f4c972ce433a2094b10a9601e6711b95a6a226a85f4e4ed0e0417dbc9d737cd7d3513a82943de94ff8e4c9e91838506283f4878e3f41488fec47198b4a262b55d3691d275c6154d2a2ce9ee6ab97087e0f33654b01450869797c993dfca76cd732677bf1856f43d040d68022055987588f64af357bea80491b4bc42341dd6f81631d30fc28e8c5d7e3312655b30d277f10ce76c2525279ad53157b1c2c78b412107fc5f974ac7946bdc33ee54d71f3fc261530d50f20813e4e6aadf39e67573d5dc93a45023edf297b56def6b14ec5e19ca10fbfd1b807f17fa983bec363cf495c708a581db1bba1a23730ce22d0f925d764b04be014d662c3a36ac58b015317c9cf5ca6464f2ecef15e1769f2c91922968532bda66e9aaa2a7f120a9301f563fd33db8e90c940984b0a297e0c595544b7f687476325a07dbaba255c8461e98f069eea2246cfa50f1c2ef8d4c54f5fd509a9cc839548d7c252e60bb9c165d05f30bd525f6b53a4c8afc8fc31026686bcd5a48172593941b1450d92edf1300d7cfd2ffa175ab1c551817d67b9d095c976faaa23e598ba243 - 2. recv: type=commitment_signed + + recv: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:e0872852d75887dd5ea2787aa1dee5188b7962ee61750df37475ec01dbd3dd11) !option_static_remotekey htlc_signature=SIG(54b99d3db5bbf9326bcadd27ff599ec9ec286469482482c1f92f70b31e786177:be34fbaec509cd340a2ced0eaf9cb652ef72f5b4f78e4450cdc592727d7008c6) !option_static_remotekey signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:5a077920e9a7ec1a548de73b44987193d561f0d7b3648e0147b07775fabd2500) option_static_remotekey htlc_signature=SIG(54b99d3db5bbf9326bcadd27ff599ec9ec286469482482c1f92f70b31e786177:cf81dc68974679ec580ace3aa26e46c06b2bfff16ebf51ccf3c34228b5635339) option_static_remotekey - 3. expect-send: type=revoke_and_ack + + expect-send: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=7cc854b54e3e0dcdb010d7a3fee464a9687be6e8db3be6854c475621e007a5dc # per_commitment_secret 2=2273e227a5b7449b6e70f1fb4652864038b1cbf9cd7c043a7d6456b7fc275ad8 next_per_commitment_point=03bca7c4ebe7eb7e8e40b8c2a7b4dde7f4d48404c9a62859d09fe2d00151af40ad - 4. expect-send: type=commitment_signed + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:6dd008b3a07ec3d19a15eecb5982ef762f43ad04966a279d328062dbb2c1e64b) htlc_signature=SIG(94549ae2f31fa7adf477a20c34d7c43ec5c4f2144c3ed7281127b00c85f02139:e96e9d7044cb56d55f124a7493f9c13b6389e64ce31efd22e04bb9809a4c3394) - 5. recv: type=revoke_and_ack + + recv: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 # per_commitment_secret #2=c51a18b13e8527e579ec56365482c62f180b7d5760b46e9477dae59e87ed423a next_per_commitment_point=02e1ea4f6d28dade887280214c359fc808066a64e750e3c81747dc3074833ff0ad # Optional reconnection testing. - 1. nothing + * nothing # tester must have received node's commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_data_loss_protect your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -213,33 +213,33 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE # Either way, it should reject HTLC, as it's not a known preimage. -13. expect-send: type=update_fail_htlc ++ expect-send: type=update_fail_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 # FIXME: check that reason is correct! # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 # tester must have received node's commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_data_loss_protect your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -248,36 +248,36 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE # Now it will re-transmit - 8. expect-send: type=update_fail_htlc + + expect-send: type=update_fail_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 -14. expect-send: type=commitment_signed ++ expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:34441617fff47a6624d7e0c82d2d5fd6b01013ca1413e65f1d2d46fc5afe5131) htlc_signature= # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 # tester has not received last commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_data_loss_protect your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -286,29 +286,29 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE # Now it will re-transmit - 8. expect-send: type=update_fail_htlc + + expect-send: type=update_fail_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 - 9. expect-send: type=commitment_signed + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:34441617fff47a6624d7e0c82d2d5fd6b01013ca1413e65f1d2d46fc5afe5131) htlc_signature= # tester *has* received last commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_data_loss_protect your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=3 next_revocation_number=1 @@ -317,33 +317,33 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02e1ea4f6d28dade887280214c359fc808066a64e750e3c81747dc3074833ff0ad option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE -15. recv: type=revoke_and_ack ++ recv: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=dddc3a8d14fddf2b68fa8c7fbad2748274937479dd0f8930d5ebb4ab6bd866a3 # per_commitment_secret #3=ba65d7b0ef55a3ba300d4e87af29868f394f8f138d78a7011669c79b37b936f4 next_per_commitment_point=030f1b0e7b158de0d85a05ec050304dcf189c879a888e5ca1ce45e829d4b075d37 # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 # tester must have received last commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=2 your_last_per_commitment_secret=dddc3a8d14fddf2b68fa8c7fbad2748274937479dd0f8930d5ebb4ab6bd866a3 option_data_loss_protect your_last_per_commitment_secret=dddc3a8d14fddf2b68fa8c7fbad2748274937479dd0f8930d5ebb4ab6bd866a3 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=3 next_revocation_number=1 @@ -352,39 +352,39 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02e1ea4f6d28dade887280214c359fc808066a64e750e3c81747dc3074833ff0ad option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE -16. recv: type=commitment_signed ++ recv: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:f3d47c8ebc473392eae272f60930ef76794476e2738e1a11f5865603f2aa0abb) !option_static_remotekey signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:32c4246f301b7f4d2f8a84628dc729923aec2a2ad2cd60be3836e544294b2b0c) option_static_remotekey htlc_signature= -17. expect-send: type=revoke_and_ack ++ expect-send: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=c7518c8ae4660ed02894df8976fa1a3659c1a8b4b5bec0c4b872abeba4cb8964 # per_commitment_secret #3=27cddaa5624534cb6cb9d7da077cf2b22ab21e9b506fd4998a51d54502e99116 next_per_commitment_point=02d8489d0db616cbdfc77d5eadd56c1bc8f136b8fb6b184167ff5cc7fceed71977 # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 # tester *has not* received revoke_and_ack - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=3 next_revocation_number=2 your_last_per_commitment_secret=dddc3a8d14fddf2b68fa8c7fbad2748274937479dd0f8930d5ebb4ab6bd866a3 option_data_loss_protect your_last_per_commitment_secret=dddc3a8d14fddf2b68fa8c7fbad2748274937479dd0f8930d5ebb4ab6bd866a3 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=03bca7c4ebe7eb7e8e40b8c2a7b4dde7f4d48404c9a62859d09fe2d00151af40ad option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=3 next_revocation_number=1 @@ -393,21 +393,21 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02e1ea4f6d28dade887280214c359fc808066a64e750e3c81747dc3074833ff0ad option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE # tester *has* received revoke_and_ack - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=3 next_revocation_number=2 your_last_per_commitment_secret=dddc3a8d14fddf2b68fa8c7fbad2748274937479dd0f8930d5ebb4ab6bd866a3 option_data_loss_protect your_last_per_commitment_secret=dddc3a8d14fddf2b68fa8c7fbad2748274937479dd0f8930d5ebb4ab6bd866a3 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=03bca7c4ebe7eb7e8e40b8c2a7b4dde7f4d48404c9a62859d09fe2d00151af40ad option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=3 next_revocation_number=2 @@ -416,4 +416,4 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02e1ea4f6d28dade887280214c359fc808066a64e750e3c81747dc3074833ff0ad option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE diff --git a/tests/events/bolt2-04-htlc-fulfill.events b/tests/events/bolt2-04-htlc-fulfill.events index 7d93fa573..ea1ee1d02 100644 --- a/tests/events/bolt2-04-htlc-fulfill.events +++ b/tests/events/bolt2-04-htlc-fulfill.events @@ -14,16 +14,16 @@ MAYBE_UPDATE=maybe-send: type=channel_update include setup.incl -1. block: $BLOCK_102 +* block: $BLOCK_102 # Make two invoices: one is dust, one is not. -2. invoice: amount=1000 preimage=0000000000000000000000000000000000000000000000000000000000001000 -3. invoice: amount=1000000 preimage=0000000000000000000000000000000000000000000000000000000001000000 ++ invoice: amount=1000 preimage=0000000000000000000000000000000000000000000000000000000000001000 ++ invoice: amount=1000000 preimage=0000000000000000000000000000000000000000000000000000000001000000 -4. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 -5. expect-send: type=init -6. recv: type=init globalfeatures= localfeatures=2002 -7. recv: type=open_channel ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 ++ expect-send: type=init ++ recv: type=init globalfeatures= localfeatures=2002 ++ recv: type=open_channel chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 funding_satoshis=999878 @@ -50,7 +50,7 @@ include setup.incl first_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 channel_flags=01 -8. expect-send: type=accept_channel ++ expect-send: type=accept_channel temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 # funding_privkey=0000000000000000000000000000000000000000000000000000000000000010 funding_pubkey=03e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a @@ -69,7 +69,7 @@ include setup.incl to_self_delay=6 channel_reserve_satoshis=9998 -9. recv: type=funding_created ++ recv: type=funding_created temporary_channel_id=0000000000000000000000000000000000000000000000000000000000000000 # Funding tx is 020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 # txid=41085b995c1f591cfc3ae79ccde012bf0b37c7bde23d80a61c9732bdd6210b2f @@ -80,26 +80,26 @@ include setup.incl # option_static_remotekey: node's commitment tx is 02000000012f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b08410000000000f436a980010f410f0000000000160014e142ca9bfc2d56cd0adb82f8dc870424767389f74cff0020 signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:f116f87d1a90f2d598b37e922dd568a8757a703b197f00fb131d089060f32493) option_static_remotekey -10. expect-send: type=funding_signed ++ expect-send: type=funding_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 # test's commitment tx is 02000000012f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b08410000000000f436a980010f410f0000000000220020233d69d88092351875ce0b9fd5ea576b2307c539eaed7abdf97fbb26720f01ac4cff0020 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:49fcc656b58e78f639b8af4bca65fe1ee948ea36eb7629222320518e33a42f29) -11. block: height=103 n=3 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 ++ block: height=103 n=3 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c6410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d818711738202473044022047e9e6e798ba9adb6c84bdcd6230a96fb6de9dcca84d81103fb2bc08906cb884022027599b1e80289eaf238e9a00119a79a0ccceab7d83d54719e10bd0c3300a0d34012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 -12. expect-send: type=funding_locked ++ expect-send: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 -13. recv: type=funding_locked ++ recv: type=funding_locked channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 # per_commitment_secret #1 = dddc3a8d14fddf2b68fa8c7fbad2748274937479dd0f8930d5ebb4ab6bd866a3 next_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d -14. $MAYBE_UPDATE ++ $MAYBE_UPDATE # First invoice-paying HTLC -15. recv: type=update_add_htlc ++ recv: type=update_add_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 amount_msat=1000 @@ -109,7 +109,7 @@ include setup.incl # hop_data[0] = 00000000000000000000000000000003E8000000C8000000000000000000000000 onion_routing_packet=0002eec7245d6b7d2ccb30380bfbe2a3648cd7a942653f5aa340edcea1f283686619b1153ae94698ea83a3298ab3c0ddd9f755853e4e5fbc5d4f3cb457bbb74a9b81d3b5bc9cf42d8617d1fe6966ffb66b8ec0eaa1188865957e26df123d11705395d339472bcc4920e428492f7822424eef8e6d903a768ec01959f3a1f2c1cd8725ba13329df3a932f641dee600dbb1a9f3bbe93a167410961f1777a7b48679d8a3041d57c0b8e795ed4884fbb33a2564d4cdafb528c7b63fc31cd2739e71d1d3b56f35ba7976a373b883eed8f1f263aedd540cce9b548e53e58c32ab604195f6004d8d92fe0a9a454229b9bc0795f3e4ccd54089075483afaa0ef3b32ee12cf321052f7b9e5ac1c28169e57d5628c3aee5c775d5fb33ba835fda195981b1e3a06792bdd0ecf85f8f6107fd830ca932e92c6713ea6d4d5129395f54aeabb54debccca130ad019a1f53a20c0c46dd8625ada068e2a13ea5373b60ecdf412728cc78192ae1a56bae26dfb450d2f6b4905e6bd9843fda7df63eb11fb77ce995b25d3076210eca527bb556b4ddc564fa4c6ccb43f1149163a4959ffe4178d653d35bdc052e4a46dd58b8f95fde83d114c4e35fd02e94a0dd2a9ae21594184808074a57d9de30c5105b53efe03aca192f8c518bc2b9e13211a9761c1948b31aa97f99da449968380005f96ff49a6e5fe833220a82f358eb94197584b2dfa5a1efee8918b5020f028748e5897bb694979f580ff58b8b1d865783340eaff2d1ce738409ec1c62c1bd7f632cf0730a5634a1a2d91244b865302339c1861655e11b264aeaf2feefbf2d1222bb13c6bd6b2d2379d9a548f93de4d2a044928458eafa745021e0a69796bb40f17c1ca53b895c76b53924faa886a4a19f07b50eda5f316e5f3b5422e984c59928144c275d4ae5e78634e16c6dafcfc92bb302c7d5eef1456250b0b8a41f0cabb55dd114d6b0bcaf53ef1ee2185d2383df57a0f1bc21d31f5d3ae395bab6e77370ee83ffe8995e9bfbe2f90b3ff0578720e0584e969479d40327415835579d7b8885037c02a611292c6bbffde25e86c184cc7c7481e8856ce6a3cf7109a6c001e51a2289c5ee3633936578d4dc3de82c18ebb787bf2c475e8fa0393727cbdbcd36849ee0b7411fba6fd5cb8459e63aaf3fba7a4cd4a04b266d8f416f0586e2093ea9c210140a6e6cb72759ae1dee7c24497f68389fb8d154f927cc4ab59b9137652eaf9c7cb56f0cce6c58616646c6fee836b07ce738a965b1ea725d9960c47e61086be053f3e9c48c08ce945404b060d9e699ad962c910208dda42d665f8eacf9865a64d2612ea62e0e2c0a4c731b35ae87b04e45739c34f4c972ce433a2094b10a9601e6711b95a6a226a85f4e4ed0e0417dbc9d737cd7d3513a82943de94ff8e4c9e91838506283f4878e3f41488fec47198b4a262b55d3691d275c6154d2a2ce9ee6ab97087e0f33654b01450869797c993dfca76cd732677bf1856f43d040d68022055987588f64af357bea80491b4bc42341dd6f81631d30fc28e8c5d7e3312655b30d277f10ce76c2525279ad53157b1c2c78b412107fc5f974ac7946bdc33ee54d71f3fc261530d50f20813e4e6aadf39e67573d5dc93a45023edf297b56def6b14ec5e19ca10fbfd1b807f17fa983bec363cf495c708a581db1bba1a23730ce22d0f925d764b04be014d662c3a36ac58b015317c9cf5ca6464f2ecef15e1769f2c91922968532bda66e9aaa2a7f120a9301f563fd33db8e90c940984b0a297e0c595544b7f687476325a07dbaba255c8461e98f069eea2246cfa50f1c2ef8d4c54f5fd509a9cc839548d7c252e60bb9c165d05f30bd525f6b53a4c8afc8fc31026686bcd5a48172593941ba2804c6057dd454fbb44ad5e52b3383b9bcfda3647eefe650ab93b99ee60c8da -16. recv: type=update_add_htlc ++ recv: type=update_add_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=1 amount_msat=1000000 @@ -119,7 +119,7 @@ include setup.incl # hop_data[0] = 00000000000000000000000000000F4240000000C8000000000000000000000000 onion_routing_packet=0002eec7245d6b7d2ccb30380bfbe2a3648cd7a942653f5aa340edcea1f283686619b1153ae94698ea83a3298ab3c0ddd6b6fd853e4e5fbc5d4f3cb457bbb74a9b81d3b5bc9cf42d8617d1fe6966ffb66b8ec0eaa1188865957e26df123d11705395d339472bcc4920e428492f7822424eef8e6d903a768ec01959f3a1f2c1cd8725ba13329df3a932f641dee600dbb1a9f3bbe93a167410961f1777a7b48679d8a3041d57c0b8e795ed4884fbb33a2564d4cdafb528c7b63fc31cd2739e71d1d3b56f35ba7976a373b883eed8f1f263aedd540cce9b548e53e58c32ab604195f6004d8d92fe0a9a454229b9bc0795f3e4ccd54089075483afaa0ef3b32ee12cf321052f7b9e5ac1c28169e57d5628c3aee5c775d5fb33ba835fda195981b1e3a06792bdd0ecf85f8f6107fd830ca932e92c6713ea6d4d5129395f54aeabb54debccca130ad019a1f53a20c0c46dd8625ada068e2a13ea5373b60ecdf412728cc78192ae1a56bae26dfb450d2f6b4905e6bd9843fda7df63eb11fb77ce995b25d3076210eca527bb556b4ddc564fa4c6ccb43f1149163a4959ffe4178d653d35bdc052e4a46dd58b8f95fde83d114c4e35fd02e94a0dd2a9ae21594184808074a57d9de30c5105b53efe03aca192f8c518bc2b9e13211a9761c1948b31aa97f99da449968380005f96ff49a6e5fe833220a82f358eb94197584b2dfa5a1efee8918b5020f028748e5897bb694979f580ff58b8b1d865783340eaff2d1ce738409ec1c62c1bd7f632cf0730a5634a1a2d91244b865302339c1861655e11b264aeaf2feefbf2d1222bb13c6bd6b2d2379d9a548f93de4d2a044928458eafa745021e0a69796bb40f17c1ca53b895c76b53924faa886a4a19f07b50eda5f316e5f3b5422e984c59928144c275d4ae5e78634e16c6dafcfc92bb302c7d5eef1456250b0b8a41f0cabb55dd114d6b0bcaf53ef1ee2185d2383df57a0f1bc21d31f5d3ae395bab6e77370ee83ffe8995e9bfbe2f90b3ff0578720e0584e969479d40327415835579d7b8885037c02a611292c6bbffde25e86c184cc7c7481e8856ce6a3cf7109a6c001e51a2289c5ee3633936578d4dc3de82c18ebb787bf2c475e8fa0393727cbdbcd36849ee0b7411fba6fd5cb8459e63aaf3fba7a4cd4a04b266d8f416f0586e2093ea9c210140a6e6cb72759ae1dee7c24497f68389fb8d154f927cc4ab59b9137652eaf9c7cb56f0cce6c58616646c6fee836b07ce738a965b1ea725d9960c47e61086be053f3e9c48c08ce945404b060d9e699ad962c910208dda42d665f8eacf9865a64d2612ea62e0e2c0a4c731b35ae87b04e45739c34f4c972ce433a2094b10a9601e6711b95a6a226a85f4e4ed0e0417dbc9d737cd7d3513a82943de94ff8e4c9e91838506283f4878e3f41488fec47198b4a262b55d3691d275c6154d2a2ce9ee6ab97087e0f33654b01450869797c993dfca76cd732677bf1856f43d040d68022055987588f64af357bea80491b4bc42341dd6f81631d30fc28e8c5d7e3312655b30d277f10ce76c2525279ad53157b1c2c78b412107fc5f974ac7946bdc33ee54d71f3fc261530d50f20813e4e6aadf39e67573d5dc93a45023edf297b56def6b14ec5e19ca10fbfd1b807f17fa983bec363cf495c708a581db1bba1a23730ce22d0f925d764b04be014d662c3a36ac58b015317c9cf5ca6464f2ecef15e1769f2c91922968532bda66e9aaa2a7f120a9301f563fd33db8e90c940984b0a297e0c595544b7f687476325a07dbaba255c8461e98f069eea2246cfa50f1c2ef8d4c54f5fd509a9cc839548d7c252e60bb9c165d05f30bd525f6b53a4c8afc8fc31026686bcd5a48172593941b5be6403eef1373ff72577187afc526cac3c467f07dd00cc91886109c914781d7 -17. recv: type=commitment_signed ++ recv: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 # !option_static_remotekey: ## remote_commitment @@ -140,28 +140,28 @@ include setup.incl signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:c127a333bd94cec1a7b2c443f500c0954c19f605a2f1df58b7ea1bbda4d99532) option_static_remotekey htlc_signature=SIG(54b99d3db5bbf9326bcadd27ff599ec9ec286469482482c1f92f70b31e786177:40c3525d2e1690d63458ccca18193d59571a695dcdf805206a88e5cda9edff9a) option_static_remotekey -18. expect-send: type=revoke_and_ack ++ expect-send: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=7cc854b54e3e0dcdb010d7a3fee464a9687be6e8db3be6854c475621e007a5dc # per_commitment_secret 2=2273e227a5b7449b6e70f1fb4652864038b1cbf9cd7c043a7d6456b7fc275ad8 next_per_commitment_point=03bca7c4ebe7eb7e8e40b8c2a7b4dde7f4d48404c9a62859d09fe2d00151af40ad -19. expect-send: type=commitment_signed ++ expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:a52bd92ccb9195c5b45bb2badf390f2c070f20b22edf24fac5cd99f1e1e6db11) htlc_signature=SIG(94549ae2f31fa7adf477a20c34d7c43ec5c4f2144c3ed7281127b00c85f02139:17b05a9103b123ad6d6c990d6262649c92fa730f00345b9c677608526400b06e) # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=0 @@ -171,7 +171,7 @@ include setup.incl my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey # If tester did not receive node's revoke_and_ack: - 1. recv: type=channel_reestablish + * recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=0 @@ -180,20 +180,20 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 option_data_loss_protect !option_static_remotekey - 2. $MAYBE_UPDATE + + $MAYBE_UPDATE # - MUST re-send the `revoke_and_ack` and `commitment_signed` - 3. expect-send: type=revoke_and_ack + + expect-send: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=7cc854b54e3e0dcdb010d7a3fee464a9687be6e8db3be6854c475621e007a5dc # per_commitment_secret 2=2273e227a5b7449b6e70f1fb4652864038b1cbf9cd7c043a7d6456b7fc275ad8 next_per_commitment_point=03bca7c4ebe7eb7e8e40b8c2a7b4dde7f4d48404c9a62859d09fe2d00151af40ad - 4. expect-send: type=commitment_signed + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:a52bd92ccb9195c5b45bb2badf390f2c070f20b22edf24fac5cd99f1e1e6db11) htlc_signature=SIG(94549ae2f31fa7adf477a20c34d7c43ec5c4f2144c3ed7281127b00c85f02139:17b05a9103b123ad6d6c990d6262649c92fa730f00345b9c677608526400b06e) # If tester did receive node's revoke_and_ack, but not commitment_signed - 1. recv: type=channel_reestablish + * recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=1 next_revocation_number=1 @@ -202,15 +202,15 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02037803a3228ec3a517835480ffac64c0557d9d75e0fe85861ab0be9eb224e6f8 option_data_loss_protect !option_static_remotekey - 2. $MAYBE_UPDATE + + $MAYBE_UPDATE # - MUST re-send `commitment_signed` - 3. expect-send: type=commitment_signed + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:a52bd92ccb9195c5b45bb2badf390f2c070f20b22edf24fac5cd99f1e1e6db11) htlc_signature=SIG(94549ae2f31fa7adf477a20c34d7c43ec5c4f2144c3ed7281127b00c85f02139:17b05a9103b123ad6d6c990d6262649c92fa730f00345b9c677608526400b06e) # If tester did receive node's commitment_signed - 1. recv: type=channel_reestablish + * recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -219,9 +219,9 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d option_data_loss_protect !option_static_remotekey - 2. $MAYBE_UPDATE + + $MAYBE_UPDATE -20. recv: type=revoke_and_ack ++ recv: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 # per_commitment_secret #2=c51a18b13e8527e579ec56365482c62f180b7d5760b46e9477dae59e87ed423a @@ -229,38 +229,38 @@ include setup.incl # It should accept both of them, but could be in any order. # (Could also do this in two separate commits, but I didn't add that). -21. Any order: - 1. expect-send: type=update_fulfill_htlc ++ Any order: + * expect-send: type=update_fulfill_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 payment_preimage=0000000000000000000000000000000000000000000000000000000000001000 - 1. expect-send: type=update_fulfill_htlc + * expect-send: type=update_fulfill_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=1 payment_preimage=0000000000000000000000000000000000000000000000000000000001000000 # Separator: next is not part of Any order. -22. nothing ++ nothing # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 # tester must have received node's commitment_signed - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_data_loss_protect your_last_per_commitment_secret=02a40c85b6f28da08dfdbe0926c53fab2de6d28c10301f8f7c4073d5e42e3148 option_static_remotekey !option_data_loss_protect my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey - 6. recv: type=channel_reestablish + + recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -269,19 +269,19 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d option_data_loss_protect !option_static_remotekey - 7. $MAYBE_UPDATE + + $MAYBE_UPDATE # Now it will re-transmit - 8. Any order: - 1. expect-send: type=update_fulfill_htlc + + Any order: + * expect-send: type=update_fulfill_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 payment_preimage=0000000000000000000000000000000000000000000000000000000000001000 - 1. expect-send: type=update_fulfill_htlc + * expect-send: type=update_fulfill_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=1 payment_preimage=0000000000000000000000000000000000000000000000000000000001000000 -23. expect-send: type=commitment_signed ++ expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 # !option_static_remotekey: # unsigned local commitment tx: 02000000012f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b08410000000000f436a98002e903000000000000160014f546ff0865eeecfdef611a3298eca91e656e73b5263d0f00000000002200209d2eb597904551cd8f3b6ee050cef80002b976d5ccf447cefd6a6fc93966580c4eff0020 @@ -293,16 +293,16 @@ include setup.incl htlc_signature= # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -311,7 +311,7 @@ include setup.incl my_current_per_commitment_point=032405cbd0f41225d5f203fe4adac8401321a9e05767c5f8af97d51d2e81fbb206 option_data_loss_protect !option_static_remotekey # tester has not received last commitment_signed - 1. recv: type=channel_reestablish + * recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=2 next_revocation_number=1 @@ -320,25 +320,25 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=027eed8389cf8eb715d73111b73d94d2c2d04bf96dc43dfd5b0970d80b3617009d option_data_loss_protect !option_static_remotekey - 2. $MAYBE_UPDATE + + $MAYBE_UPDATE # Now it will re-transmit - 3. Any order: - 1. expect-send: type=update_fulfill_htlc + + Any order: + * expect-send: type=update_fulfill_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=0 payment_preimage=0000000000000000000000000000000000000000000000000000000000001000 - 1. expect-send: type=update_fulfill_htlc + * expect-send: type=update_fulfill_htlc channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 id=1 payment_preimage=0000000000000000000000000000000000000000000000000000000001000000 - 4. expect-send: type=commitment_signed + + expect-send: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:79d2311d86c38520b3db2477ffc8b971dd518177cbc4c9d8944f819034e45269) !option_static_remotekey signature=SIG(0000000000000000000000000000000000000000000000000000000000000010:fe72bb88dfa91ff143147b4a1c2a5d42185628b70e77745ac0b35a7592b5e897) option_static_remotekey htlc_signature= # tester *has* received last commitment_signed - 1. recv: type=channel_reestablish + * recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=3 next_revocation_number=1 @@ -347,37 +347,37 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02e1ea4f6d28dade887280214c359fc808066a64e750e3c81747dc3074833ff0ad option_data_loss_protect !option_static_remotekey - 2. $MAYBE_UPDATE + + $MAYBE_UPDATE -24. recv: type=revoke_and_ack ++ recv: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=dddc3a8d14fddf2b68fa8c7fbad2748274937479dd0f8930d5ebb4ab6bd866a3 # per_commitment_secret #3=ba65d7b0ef55a3ba300d4e87af29868f394f8f138d78a7011669c79b37b936f4 next_per_commitment_point=030f1b0e7b158de0d85a05ec050304dcf189c879a888e5ca1ce45e829d4b075d37 -25. recv: type=commitment_signed ++ recv: type=commitment_signed channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:ade3011148ec17fcddb87113a1fb6f1c053b669f81196a1b50f1b3c047d9cfe2) !option_static_remotekey signature=SIG(0000000000000000000000000000000000000000000000000000000000000020:4b9baaa069e2f9d78037e4721609dc8d55249daa36e29f410d74e64cfaf7d645) option_static_remotekey htlc_signature= -26. expect-send: type=revoke_and_ack ++ expect-send: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=c7518c8ae4660ed02894df8976fa1a3659c1a8b4b5bec0c4b872abeba4cb8964 # per_commitment_secret #3=27cddaa5624534cb6cb9d7da077cf2b22ab21e9b506fd4998a51d54502e99116 next_per_commitment_point=02d8489d0db616cbdfc77d5eadd56c1bc8f136b8fb6b184167ff5cc7fceed71977 # Optional reconnection testing. - 1. nothing + * nothing # Ignore unknown odd messages - 1. recv: type=9999 + * recv: type=9999 - 1. disconnect: - 2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 - 3. expect-send: type=init - 4. recv: type=init globalfeatures= localfeatures=02 - 5. expect-send: type=channel_reestablish + * disconnect: + + connect: privkey=0000000000000000000000000000000000000000000000000000000000000002 + + expect-send: type=init + + recv: type=init globalfeatures= localfeatures=02 + + expect-send: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=3 next_revocation_number=2 @@ -386,7 +386,7 @@ include setup.incl my_current_per_commitment_point=03bca7c4ebe7eb7e8e40b8c2a7b4dde7f4d48404c9a62859d09fe2d00151af40ad option_data_loss_protect !option_static_remotekey # tester *has not* received revoke_and_ack - 1. recv: type=channel_reestablish + * recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=3 next_revocation_number=1 @@ -395,15 +395,15 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02e1ea4f6d28dade887280214c359fc808066a64e750e3c81747dc3074833ff0ad option_data_loss_protect !option_static_remotekey - 2. $MAYBE_UPDATE - 3. expect-send: type=revoke_and_ack + + $MAYBE_UPDATE + + expect-send: type=revoke_and_ack channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 per_commitment_secret=c7518c8ae4660ed02894df8976fa1a3659c1a8b4b5bec0c4b872abeba4cb8964 # per_commitment_secret #3=27cddaa5624534cb6cb9d7da077cf2b22ab21e9b506fd4998a51d54502e99116 next_per_commitment_point=02d8489d0db616cbdfc77d5eadd56c1bc8f136b8fb6b184167ff5cc7fceed71977 # tester *has* received revoke_and_ack - 1. recv: type=channel_reestablish + * recv: type=channel_reestablish channel_id=2f0b21d6bd32971ca6803de2bdc7370bbf12e0cd9ce73afc1c591f5c995b0841 next_commitment_number=3 next_revocation_number=2 @@ -412,4 +412,4 @@ include setup.incl # If we have option_static_remotekey, this field is ignored (must be valid point though!) my_current_per_commitment_point=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 option_static_remotekey my_current_per_commitment_point=02e1ea4f6d28dade887280214c359fc808066a64e750e3c81747dc3074833ff0ad option_data_loss_protect !option_static_remotekey - 2. $MAYBE_UPDATE + + $MAYBE_UPDATE diff --git a/tests/events/bolt7-01-channel_announcement-success.events b/tests/events/bolt7-01-channel_announcement-success.events index 2ddaf429c..5fa142f68 100644 --- a/tests/events/bolt7-01-channel_announcement-success.events +++ b/tests/events/bolt7-01-channel_announcement-success.events @@ -2,17 +2,17 @@ include setup.incl -1. block: $BLOCK_102 +* block: $BLOCK_102 -2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 -3. expect-send: type=init -4. recv: type=init localfeatures= globalfeatures= ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 ++ expect-send: type=init ++ recv: type=init localfeatures= globalfeatures= # Funding tx spending 16835ac8c154b616baac524163f41fb0c4f82c7b972ad35d4d6f18d854f6856b/1, feerate 253 to bitcoin privkeys 0000000000000000000000000000000000000000000000000000000000000010 and 0000000000000000000000000000000000000000000000000000000000000020 # txid 189c40b0728f382fe91c87270926584e48e0af3a6789f37454afee6c7560311d -5. block: height=103 n=6 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c5410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d8187117382024730440220798d96d5a057b5b7797988a855217f41af05ece3ba8278366e2f69763c72e785022065d5dd7eeddc0766ddf65557c92b9c52c301f23f94d2cf681860d32153e6ae1e012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 ++ block: height=103 n=6 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c5410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d8187117382024730440220798d96d5a057b5b7797988a855217f41af05ece3ba8278366e2f69763c72e785022065d5dd7eeddc0766ddf65557c92b9c52c301f23f94d2cf681860d32153e6ae1e012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 -6. recv: type=channel_announcement ++ recv: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) @@ -26,13 +26,13 @@ include setup.incl bitcoin_key_2=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 # New peer connects, asking for initial_routing_sync. We *won't* relay channel_announcement, as there is no channel_update. -7. connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 -8. expect-send: type=init -9. recv: type=init localfeatures=08 globalfeatures= -10. must-not-send: type=channel_announcement -11. disconnect: ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: type=init ++ recv: type=init localfeatures=08 globalfeatures= ++ must-not-send: type=channel_announcement ++ disconnect: -12. recv: type=channel_update ++ recv: type=channel_update signature=SIG(0000000000000000000000000000000000000000000000000000000000000002:5133e0542731e0b4b70b4cb99f8fb7dab2e6658b5a5add8d9dfd1a8e2c549f95) chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f short_channel_id=103x1x0 @@ -45,10 +45,10 @@ include setup.incl fee_proportional_millionths=10 # Now we'll relay to a new peer. -13. connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 -14. expect-send: type=init -15. recv: type=init localfeatures=08 globalfeatures= -16. expect-send: type=channel_announcement ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: type=init ++ recv: type=init localfeatures=08 globalfeatures= ++ expect-send: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) @@ -60,7 +60,7 @@ include setup.incl node_id_2=02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9 bitcoin_key_1=03e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a bitcoin_key_2=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 -17. expect-send: type=channel_update ++ expect-send: type=channel_update signature=SIG(0000000000000000000000000000000000000000000000000000000000000002:5133e0542731e0b4b70b4cb99f8fb7dab2e6658b5a5add8d9dfd1a8e2c549f95) chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f short_channel_id=103x1x0 @@ -73,7 +73,7 @@ include setup.incl fee_proportional_millionths=10 # And it will relay this, too. -18. recv: conn=0000000000000000000000000000000000000000000000000000000000000003 type=channel_update ++ recv: conn=0000000000000000000000000000000000000000000000000000000000000003 type=channel_update signature=SIG(0000000000000000000000000000000000000000000000000000000000000003:d86dd6f31dc7956bae1e86407f38548fb2cda5f3f7441577694b1c5d455f153f) chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f short_channel_id=103x1x0 @@ -85,7 +85,7 @@ include setup.incl fee_base_msat=100 fee_proportional_millionths=11 htlc_maximum_msat=100000 -19. expect-send: type=channel_update ++ expect-send: type=channel_update signature=SIG(0000000000000000000000000000000000000000000000000000000000000003:d86dd6f31dc7956bae1e86407f38548fb2cda5f3f7441577694b1c5d455f153f) chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f short_channel_id=103x1x0 @@ -97,14 +97,14 @@ include setup.incl fee_base_msat=100 fee_proportional_millionths=11 htlc_maximum_msat=100000 -20. disconnect: ++ disconnect: # Now, if channel closes, it won't be relayed. -21. block: height=109 n=1 tx=020000000001011d3160756ceeaf5474f389673aafe0484e58260927871ce92f388f72b0409c180000000000ffffffff010e410f00000000001600141b42e1fc7b1cd93a469fa67ed5eabf36ce354dd60400483045022100d93a21312af5b9a46041d2189e5b72f593fc865d920f705d76a25a728de5790302207995cc2dd45ff20c96ccea8b117be41581da8b84466dabfeea728ed858a3a7fd0147304402206d9f5e3b2b2540002ffc37815cef3fbc4ba7646a7bca1aa7605941edd735dee802205130da104d584df6b59c18704c94cd4edd032aed7e0c3044dc8815183552f2dd0147522103d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e652103e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a52ae00000000 ++ block: height=109 n=1 tx=020000000001011d3160756ceeaf5474f389673aafe0484e58260927871ce92f388f72b0409c180000000000ffffffff010e410f00000000001600141b42e1fc7b1cd93a469fa67ed5eabf36ce354dd60400483045022100d93a21312af5b9a46041d2189e5b72f593fc865d920f705d76a25a728de5790302207995cc2dd45ff20c96ccea8b117be41581da8b84466dabfeea728ed858a3a7fd0147304402206d9f5e3b2b2540002ffc37815cef3fbc4ba7646a7bca1aa7605941edd735dee802205130da104d584df6b59c18704c94cd4edd032aed7e0c3044dc8815183552f2dd0147522103d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e652103e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a52ae00000000 -22. connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 -23. expect-send: type=init -24. recv: type=init localfeatures=08 globalfeatures= -25. must-not-send: type=channel_announcement -26. must-not-send: type=channel_update ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: type=init ++ recv: type=init localfeatures=08 globalfeatures= ++ must-not-send: type=channel_announcement ++ must-not-send: type=channel_update diff --git a/tests/events/bolt7-02-channel_announcement-failures.events b/tests/events/bolt7-02-channel_announcement-failures.events index 0c22f9cd8..05cdbffef 100644 --- a/tests/events/bolt7-02-channel_announcement-failures.events +++ b/tests/events/bolt7-02-channel_announcement-failures.events @@ -1,20 +1,20 @@ # Tests for malformed/bad channel_announcement include setup.incl -1. block: $BLOCK_102 +* block: $BLOCK_102 -2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 -3. expect-send: type=init -4. recv: type=init localfeatures= globalfeatures= ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 ++ expect-send: type=init ++ recv: type=init localfeatures= globalfeatures= # Funding tx spending 16835ac8c154b616baac524163f41fb0c4f82c7b972ad35d4d6f18d854f6856b/1, feerate 253 to bitcoin privkeys 0000000000000000000000000000000000000000000000000000000000000010 and 0000000000000000000000000000000000000000000000000000000000000020 # txid 189c40b0728f382fe91c87270926584e48e0af3a6789f37454afee6c7560311d -5. block: height=103 n=1 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c5410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d8187117382024730440220798d96d5a057b5b7797988a855217f41af05ece3ba8278366e2f69763c72e785022065d5dd7eeddc0766ddf65557c92b9c52c301f23f94d2cf681860d32153e6ae1e012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 ++ block: height=103 n=1 tx=020000000001016b85f654d8186f4d5dd32a977b2cf8c4b01ff4634152acba16b654c1c85a83160100000000ffffffff01c5410f0000000000220020c46bf3d1686d6dbb2d9244f8f67b90370c5aa2747045f1aeccb77d8187117382024730440220798d96d5a057b5b7797988a855217f41af05ece3ba8278366e2f69763c72e785022065d5dd7eeddc0766ddf65557c92b9c52c301f23f94d2cf681860d32153e6ae1e012102d6a3c2d0cf7904ab6af54d7c959435a452b24a63194e1c4e7c337d3ebbb3017b00000000 # Invalid `channel_announcement`: short_channel_id too young. # It's allowed (even encouraged!) to cache this, so we separate this # from the other tests. - 1. recv: type=channel_announcement + * recv: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) @@ -28,8 +28,8 @@ include setup.incl bitcoin_key_2=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 # Invalid `channel_announcement`: short_channel_id *still* too young. - 1. block: height=104 n=4 - 2. recv: type=channel_announcement + * block: height=104 n=4 + + recv: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) @@ -43,10 +43,10 @@ include setup.incl bitcoin_key_2=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 # This makes announcement otherwise acceptable. - 1. block: height=104 n=5 + * block: height=104 n=5 # Invalid `channel_announcement`: bad node_signature_1. - 1. recv: type=channel_announcement + * recv: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791b) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) @@ -58,10 +58,10 @@ include setup.incl node_id_2=02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9 bitcoin_key_1=03e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a bitcoin_key_2=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 - 2. expect-error: + + expect-error: # Invalid `channel_announcement`: bad node_signature_2. - 1. recv: type=channel_announcement + * recv: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791b) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) @@ -73,10 +73,10 @@ include setup.incl node_id_2=02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9 bitcoin_key_1=03e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a bitcoin_key_2=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 - 2. expect-error: + + expect-error: # Invalid `channel_announcement`: bad bitcoin_signature_1. - 1. recv: type=channel_announcement + * recv: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791b) @@ -88,10 +88,10 @@ include setup.incl node_id_2=02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9 bitcoin_key_1=03e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a bitcoin_key_2=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 - 2. expect-error: + + expect-error: # Invalid `channel_announcement`: bad bitcoin_signature_2. - 1. recv: type=channel_announcement + * recv: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) @@ -103,10 +103,10 @@ include setup.incl node_id_2=02f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9 bitcoin_key_1=03e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a bitcoin_key_2=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 - 2. expect-error: + + expect-error: # Ignored `channel_announcement`: bad chain_hash - 1. recv: type=channel_announcement + * recv: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:4ad0946fa8c3996015dec325c4b0540299287427ec8d8313842ce6f8dc06791a) @@ -120,7 +120,7 @@ include setup.incl bitcoin_key_2=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 # Invalid `channel_announcement`: short_channel_id DNE - 1. recv: type=channel_announcement + * recv: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:31592d21e4e2bb642dd9af658ab9ba629322fc028682f1b2eeb9afd8dfbf5cb5) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:31592d21e4e2bb642dd9af658ab9ba629322fc028682f1b2eeb9afd8dfbf5cb5) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:31592d21e4e2bb642dd9af658ab9ba629322fc028682f1b2eeb9afd8dfbf5cb5) @@ -134,7 +134,7 @@ include setup.incl bitcoin_key_2=03d30199d74fb5a22d47b6e054e2f378cedacffcb89904a61d75d0dbd407143e65 # Invalid `channel_announcement`: short_channel_id output DNE - 1. recv: type=channel_announcement + * recv: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:ad0d16d5bcc1826294f8c316e801a95a4f3b1514fed0b9f38e0314ebcc0f2409) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:ad0d16d5bcc1826294f8c316e801a95a4f3b1514fed0b9f38e0314ebcc0f2409) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:ad0d16d5bcc1826294f8c316e801a95a4f3b1514fed0b9f38e0314ebcc0f2409) @@ -149,7 +149,7 @@ include setup.incl # Invalid `channel_announcement`: short_channel_id tx does not match # (second bitcoin privkey is ...021 instead of ...020) - 1. recv: type=channel_announcement + * recv: type=channel_announcement node_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000002:57b5c0c52e239a20200877037040492feb27a92d0184ac47c979e1ef5c0a0a4a) node_signature_2=SIG(0000000000000000000000000000000000000000000000000000000000000003:57b5c0c52e239a20200877037040492feb27a92d0184ac47c979e1ef5c0a0a4a) bitcoin_signature_1=SIG(0000000000000000000000000000000000000000000000000000000000000010:57b5c0c52e239a20200877037040492feb27a92d0184ac47c979e1ef5c0a0a4a) @@ -164,8 +164,8 @@ include setup.incl # To test if it accepted one of those channel_announcements, give it # the matching channel_update, which should make it broadcast. -6. connect: privkey=0000000000000000000000000000000000000000000000000000000000000004 -7. recv: type=channel_update ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000004 ++ recv: type=channel_update signature=SIG(0000000000000000000000000000000000000000000000000000000000000002:5133e0542731e0b4b70b4cb99f8fb7dab2e6658b5a5add8d9dfd1a8e2c549f95) chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f short_channel_id=103x1x0 @@ -176,7 +176,7 @@ include setup.incl htlc_minimum_msat=0 fee_base_msat=1000 fee_proportional_millionths=10 -8. recv: type=channel_update ++ recv: type=channel_update signature=SIG(0000000000000000000000000000000000000000000000000000000000000002:2ce3390486bfbb1cd2a93022aa6a52e0453f819cc0f233bb7995f4b93bfd787e) chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f short_channel_id=103x1x1 @@ -187,7 +187,7 @@ include setup.incl htlc_minimum_msat=0 fee_base_msat=1000 fee_proportional_millionths=10 -9. recv: type=channel_update ++ recv: type=channel_update signature=SIG(0000000000000000000000000000000000000000000000000000000000000002:85f489ae81c450943aa159c0013c4536c8a104b5419be6276e61e165956081e6) chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f short_channel_id=103x5x0 @@ -200,8 +200,8 @@ include setup.incl fee_proportional_millionths=10 # New peer connects, asking for initial_routing_sync. We *won't* relay channel_announcement. -10. connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 -11. expect-send: type=init -12. recv: type=init localfeatures=08 globalfeatures= -13. must-not-send: type=channel_announcement -14. must-not-send: type=channel_update ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: type=init ++ recv: type=init localfeatures=08 globalfeatures= ++ must-not-send: type=channel_announcement ++ must-not-send: type=channel_update diff --git a/tests/events/bolt7-10-gossip_timestamp_filter.events b/tests/events/bolt7-10-gossip_timestamp_filter.events index bb25211cd..2ec275e24 100644 --- a/tests/events/bolt7-10-gossip_timestamp_filter.events +++ b/tests/events/bolt7-10-gossip_timestamp_filter.events @@ -2,44 +2,44 @@ # Variables for some standard gossiping messages. include setup.incl -1. block: $BLOCK_102 +* block: $BLOCK_102 -2. connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 -3. expect-send: type=init -4. recv: type=init localfeatures= globalfeatures= ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 ++ expect-send: type=init ++ recv: type=init localfeatures= globalfeatures= -5. block: $BLOCK_103 ++ block: $BLOCK_103 -6. recv: $CHAN_ANN_103x1x0 -7. recv: $NODE_ANN_002 ++ recv: $CHAN_ANN_103x1x0 ++ recv: $NODE_ANN_002 # New peer connects, asks for gossip_timestamp_filter=all. We *won't* relay channel_announcement, as there is no channel_update. -8. connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 -9. expect-send: type=init -10. recv: type=init localfeatures= globalfeatures= -11. recv: type=gossip_timestamp_filter ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: type=init ++ recv: type=init localfeatures= globalfeatures= ++ recv: type=gossip_timestamp_filter chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_timestamp=0 timestamp_range=4294967295 -12. must-not-send: type=channel_announcement -13. must-not-send: type=node_announcement -14. disconnect: ++ must-not-send: type=channel_announcement ++ must-not-send: type=node_announcement ++ disconnect: -15. recv: $CHAN_UPDATE_103x1x0_002 ++ recv: $CHAN_UPDATE_103x1x0_002 # New peer connects, asks for gossip_timestamp_filter=all. update and node announcement will be relayed. -16. connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 -17. expect-send: type=init -18. recv: type=init localfeatures= globalfeatures= -19. recv: type=gossip_timestamp_filter ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: type=init ++ recv: type=init localfeatures= globalfeatures= ++ recv: type=gossip_timestamp_filter chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_timestamp=0 timestamp_range=4294967295 -20. expect-send: $CHAN_ANN_103x1x0 -21. Any order: - 1. expect-send: $CHAN_UPDATE_103x1x0_002 - 1. expect-send: $NODE_ANN_002 -22. disconnect: ++ expect-send: $CHAN_ANN_103x1x0 ++ Any order: + * expect-send: $CHAN_UPDATE_103x1x0_002 + * expect-send: $NODE_ANN_002 ++ disconnect: # BOLT 7: # The receiver: @@ -47,89 +47,89 @@ include setup.incl # equal to `first_timestamp`, and less than `first_timestamp` plus # `timestamp_range`. -23. connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 -24. expect-send: type=init -25. recv: type=init localfeatures= globalfeatures= -26. recv: type=gossip_timestamp_filter ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: type=init ++ recv: type=init localfeatures= globalfeatures= ++ recv: type=gossip_timestamp_filter chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_timestamp=1000 timestamp_range=1565586763 -27. must-not-send: type=channel_announcement -28. must-not-send: type=channel_update -29. must-not-send: type=node_announcement -30. disconnect: - -31. connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 -32. expect-send: type=init -33. recv: type=init localfeatures= globalfeatures= -34. recv: type=gossip_timestamp_filter ++ must-not-send: type=channel_announcement ++ must-not-send: type=channel_update ++ must-not-send: type=node_announcement ++ disconnect: + ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: type=init ++ recv: type=init localfeatures= globalfeatures= ++ recv: type=gossip_timestamp_filter chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_timestamp=1565587764 timestamp_range=4294967295 -35. must-not-send: type=channel_announcement -36. must-not-send: type=channel_update -37. must-not-send: type=node_announcement -38. disconnect: ++ must-not-send: type=channel_announcement ++ must-not-send: type=channel_update ++ must-not-send: type=node_announcement ++ disconnect: # These two succeed in getting the gossip, then stay connected for next test. -39. connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 -40. expect-send: type=init -41. recv: type=init localfeatures= globalfeatures= -42. recv: type=gossip_timestamp_filter ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: type=init ++ recv: type=init localfeatures= globalfeatures= ++ recv: type=gossip_timestamp_filter chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_timestamp=1565587763 timestamp_range=4294967295 -43. expect-send: $CHAN_ANN_103x1x0 -44. Any order: - 1. expect-send: $CHAN_UPDATE_103x1x0_002 - 1. expect-send: $NODE_ANN_002 - -45. connect: privkey=0000000000000000000000000000000000000000000000000000000000000006 -46. expect-send: type=init -47. recv: type=init localfeatures= globalfeatures= -48. recv: type=gossip_timestamp_filter ++ expect-send: $CHAN_ANN_103x1x0 ++ Any order: + * expect-send: $CHAN_UPDATE_103x1x0_002 + * expect-send: $NODE_ANN_002 + ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000006 ++ expect-send: type=init ++ recv: type=init localfeatures= globalfeatures= ++ recv: type=gossip_timestamp_filter chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_timestamp=1000 timestamp_range=1565586764 -49. expect-send: $CHAN_ANN_103x1x0 -50. Any order: - 1. expect-send: $CHAN_UPDATE_103x1x0_002 - 1. expect-send: $NODE_ANN_002 ++ expect-send: $CHAN_ANN_103x1x0 ++ Any order: + * expect-send: $CHAN_UPDATE_103x1x0_002 + * expect-send: $NODE_ANN_002 # BOLT 7: # - SHOULD restrict future gossip messages to those whose `timestamp` # is greater or equal to `first_timestamp`, and less than # `first_timestamp` plus `timestamp_range`. -51. block: $BLOCK_109 ++ block: $BLOCK_109 -52. recv: conn=0000000000000000000000000000000000000000000000000000000000000003 ++ recv: conn=0000000000000000000000000000000000000000000000000000000000000003 $CHAN_ANN_109x1x0 -53. recv: conn=0000000000000000000000000000000000000000000000000000000000000003 ++ recv: conn=0000000000000000000000000000000000000000000000000000000000000003 $CHAN_UPDATE_109x1x0_004 -54. recv: conn=0000000000000000000000000000000000000000000000000000000000000003 ++ recv: conn=0000000000000000000000000000000000000000000000000000000000000003 $CHAN_UPDATE_109x1x0_005 -55. recv: conn=0000000000000000000000000000000000000000000000000000000000000003 ++ recv: conn=0000000000000000000000000000000000000000000000000000000000000003 $NODE_ANN_004 # 005's filter covers this, 006's doesn't. -56. expect-send: conn=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: conn=0000000000000000000000000000000000000000000000000000000000000005 $CHAN_ANN_109x1x0 -57. Any order: - 1. expect-send: conn=0000000000000000000000000000000000000000000000000000000000000005 ++ Any order: + * expect-send: conn=0000000000000000000000000000000000000000000000000000000000000005 $CHAN_UPDATE_109x1x0_004 - 1. expect-send: conn=0000000000000000000000000000000000000000000000000000000000000005 + * expect-send: conn=0000000000000000000000000000000000000000000000000000000000000005 $CHAN_UPDATE_109x1x0_005 - 1. expect-send: conn=0000000000000000000000000000000000000000000000000000000000000005 + * expect-send: conn=0000000000000000000000000000000000000000000000000000000000000005 $NODE_ANN_004 -58. must-not-send: conn=0000000000000000000000000000000000000000000000000000000000000006 ++ must-not-send: conn=0000000000000000000000000000000000000000000000000000000000000006 type=channel_announcement -59. must-not-send: conn=0000000000000000000000000000000000000000000000000000000000000006 ++ must-not-send: conn=0000000000000000000000000000000000000000000000000000000000000006 type=channel_update -60. must-not-send: conn=0000000000000000000000000000000000000000000000000000000000000006 ++ must-not-send: conn=0000000000000000000000000000000000000000000000000000000000000006 type=node_announcement diff --git a/tests/events/bolt7-20-query_channel_range.events b/tests/events/bolt7-20-query_channel_range.events index bb876d5e5..de4f80509 100644 --- a/tests/events/bolt7-20-query_channel_range.events +++ b/tests/events/bolt7-20-query_channel_range.events @@ -7,92 +7,92 @@ # Meanwhile, we assume an exact reply. include setup.incl -1. block: $BLOCK_102 +* block: $BLOCK_102 # Our two channels. -2. block: $BLOCK_103 -3. block: $BLOCK_109 ++ block: $BLOCK_103 ++ block: $BLOCK_109 -4. connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 -5. expect-send: type=init -6. recv: type=init localfeatures= globalfeatures= ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 ++ expect-send: type=init ++ recv: type=init localfeatures= globalfeatures= # They can send this, we'll ignore it. -7. maybe-send: type=gossip_timestamp_filter ++ maybe-send: type=gossip_timestamp_filter # Channel 103x1x0 (between 002 and 003) -8. recv: $CHAN_ANN_103x1x0 -9. recv: $CHAN_UPDATE_103x1x0_002 ++ recv: $CHAN_ANN_103x1x0 ++ recv: $CHAN_UPDATE_103x1x0_002 # Channel 109x1x0 (between 004 and 005) -10. recv: $CHAN_ANN_109x1x0 -11. recv: $CHAN_UPDATE_109x1x0_005 -12. recv: $CHAN_UPDATE_109x1x0_004 ++ recv: $CHAN_ANN_109x1x0 ++ recv: $CHAN_UPDATE_109x1x0_005 ++ recv: $CHAN_UPDATE_109x1x0_004 # New peer connects, with gossip_query option. -13. connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 -14. expect-send: type=init -15. recv: type=init localfeatures=80 globalfeatures= -16. maybe-send: type=gossip_timestamp_filter ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: type=init ++ recv: type=init localfeatures=80 globalfeatures= ++ maybe-send: type=gossip_timestamp_filter # No queries? Must not get anything. - 1. must-not-send: type=channel_announcement - 2. must-not-send: type=channel_update - 3. must-not-send: type=node_announcement + * must-not-send: type=channel_announcement + + must-not-send: type=channel_update + + must-not-send: type=node_announcement # This should elicit an empty response (we assume no zlib for that!) - 1. recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=0 number_of_blocks=103 option_gossip_queries - 2. One of: option_gossip_queries - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=0 number_of_blocks=103 encoded_short_ids=00 option_gossip_queries - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=0 number_of_blocks=103 encoded_short_ids=01789c030000000001 option_gossip_queries + * recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=0 number_of_blocks=103 option_gossip_queries + + One of: option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=0 number_of_blocks=103 encoded_short_ids=00 option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=0 number_of_blocks=103 encoded_short_ids=01789c030000000001 option_gossip_queries # This should get the first one, not the second. - 1. recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=1 option_gossip_queries - 2. One of: option_gossip_queries - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=1 encoded_short_ids=000000670000010000 option_gossip_queries - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=1 encoded_short_ids=01789c6360486760606460000002750069 option_gossip_queries + * recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=1 option_gossip_queries + + One of: option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=1 encoded_short_ids=000000670000010000 option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=1 encoded_short_ids=01789c6360486760606460000002750069 option_gossip_queries # This should get the second one, not the first. - 1. recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=109 number_of_blocks=4294967295 option_gossip_queries - 2. One of: option_gossip_queries - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=109 number_of_blocks=4294967295 encoded_short_ids=0000006d0000010000 option_gossip_queries + * recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=109 number_of_blocks=4294967295 option_gossip_queries + + One of: option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=109 number_of_blocks=4294967295 encoded_short_ids=0000006d0000010000 option_gossip_queries # Could truncate number_of_blocks. - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=109 number_of_blocks=4294967187 encoded_short_ids=0000006d0000010000 option_gossip_queries - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=109 number_of_blocks=4294967295 encoded_short_ids=01789c6360c8656060646000000299006f option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=109 number_of_blocks=4294967187 encoded_short_ids=0000006d0000010000 option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=109 number_of_blocks=4294967295 encoded_short_ids=01789c6360c8656060646000000299006f option_gossip_queries # Could truncate number_of_blocks. - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=109 number_of_blocks=4294967187 encoded_short_ids=01789c6360c8656060646000000299006f option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=109 number_of_blocks=4294967187 encoded_short_ids=01789c6360c8656060646000000299006f option_gossip_queries # This should get both. - 1. recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 option_gossip_queries - 2. One of: option_gossip_queries - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 option_gossip_queries - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 option_gossip_queries + * recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 option_gossip_queries + + One of: option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 option_gossip_queries # This should get appended timestamp fields with option_gossip_queries_ex - 1. recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 tlvs=010101 option_gossip_queries - 2. One of: option_gossip_queries - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 option_gossip_queries !option_gossip_queries_ex - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 option_gossip_queries !option_gossip_queries_ex + * recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 tlvs=010101 option_gossip_queries + + One of: option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 option_gossip_queries !option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 option_gossip_queries !option_gossip_queries_ex # Timestamps may or may not be zlib encoded. - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 tlvs=0111005d50f933000000005d50f9355d50f934 option_gossip_queries option_gossip_queries_ex - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 tlvs=011601789c8b0df869cc0004b1013f4d81d804002b46058f option_gossip_queries option_gossip_queries_ex - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 tlvs=011601789c8b0df869cc0004b1013f4d81d804002b46058f option_gossip_queries option_gossip_queries_ex - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 tlvs=011601789c8b0df869cc0004b1013f4d81d804002b46058f option_gossip_queries option_gossip_queries_ex option_gossip_queries option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 tlvs=0111005d50f933000000005d50f9355d50f934 option_gossip_queries option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 tlvs=011601789c8b0df869cc0004b1013f4d81d804002b46058f option_gossip_queries option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 tlvs=011601789c8b0df869cc0004b1013f4d81d804002b46058f option_gossip_queries option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 tlvs=011601789c8b0df869cc0004b1013f4d81d804002b46058f option_gossip_queries option_gossip_queries_ex option_gossip_queries option_gossip_queries_ex # This should get appended checksum fields with option_gossip_queries_ex - 1. recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 tlvs=010102 option_gossip_queries - 2. One of: option_gossip_queries - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 option_gossip_queries !option_gossip_queries_ex - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 option_gossip_queries !option_gossip_queries_ex - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 tlvs=03101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 tlvs=03101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex + * recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 tlvs=010102 option_gossip_queries + + One of: option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 option_gossip_queries !option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 option_gossip_queries !option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 tlvs=03101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 tlvs=03101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex # This should append timestamps and checksums with option_gossip_queries_ex - 1. recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 tlvs=010103 option_gossip_queries - 2. One of: option_gossip_queries - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 option_gossip_queries !option_gossip_queries_ex - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 option_gossip_queries !option_gossip_queries_ex + * recv: type=query_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 tlvs=010103 option_gossip_queries + + One of: option_gossip_queries + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 option_gossip_queries !option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 option_gossip_queries !option_gossip_queries_ex # Timestamps may or may not be zlib encoded. - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 tlvs=0111005d50f933000000005d50f9355d50f93403101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 tlvs=011601789c8b0df869cc0004b1013f4d81d804002b46058f03101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 tlvs=0111005d50f933000000005d50f9355d50f93403101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex - 1. expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 tlvs=011601789c8b0df869cc0004b1013f4d81d804002b46058f03101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 tlvs=0111005d50f933000000005d50f9355d50f93403101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=00000067000001000000006d0000010000 tlvs=011601789c8b0df869cc0004b1013f4d81d804002b46058f03101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 tlvs=0111005d50f933000000005d50f9355d50f93403101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex + * expect-send: type=reply_channel_range chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f first_blocknum=103 number_of_blocks=7 encoded_short_ids=01789c6360486760606400825c300d00084e00d7 tlvs=011601789c8b0df869cc0004b1013f4d81d804002b46058f03101112fa3000000000f32ce9689bece840 option_gossip_queries option_gossip_queries_ex diff --git a/tests/events/bolt7-25-query_short_channel_ids.events b/tests/events/bolt7-25-query_short_channel_ids.events index 8efdbdf61..52569bb59 100644 --- a/tests/events/bolt7-25-query_short_channel_ids.events +++ b/tests/events/bolt7-25-query_short_channel_ids.events @@ -1,124 +1,124 @@ # Tests for query_short_channel_ids. include setup.incl -1. block: $BLOCK_102 +* block: $BLOCK_102 # Our three channels, and four nodes. -2. block: $BLOCK_103 -3. block: $BLOCK_109 -4. block: $BLOCK_115 ++ block: $BLOCK_103 ++ block: $BLOCK_109 ++ block: $BLOCK_115 -5. connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 -6. expect-send: type=init -7. recv: type=init localfeatures= globalfeatures= ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000003 ++ expect-send: type=init ++ recv: type=init localfeatures= globalfeatures= # They can send this, we'll ignore it. -8. maybe-send: type=gossip_timestamp_filter ++ maybe-send: type=gossip_timestamp_filter # Channel 103x1x0 (between 002 and 003), only one update, both node_announce -9. recv: $CHAN_ANN_103x1x0 -10. recv: $CHAN_UPDATE_103x1x0_002 -11. recv: $NODE_ANN_002 -12. recv: $NODE_ANN_003 ++ recv: $CHAN_ANN_103x1x0 ++ recv: $CHAN_UPDATE_103x1x0_002 ++ recv: $NODE_ANN_002 ++ recv: $NODE_ANN_003 # Channel 109x1x0 (between 004 and 005): both updates, only one node_announce -13. recv: $CHAN_ANN_109x1x0 ++ recv: $CHAN_ANN_109x1x0 # Node-announce first is legal -14. recv: $NODE_ANN_004 -15. recv: $CHAN_UPDATE_109x1x0_004 -16. recv: $CHAN_UPDATE_109x1x0_005 ++ recv: $NODE_ANN_004 ++ recv: $CHAN_UPDATE_109x1x0_004 ++ recv: $CHAN_UPDATE_109x1x0_005 # Channel 115x1x0 (between 003 and 004): no updates. -17. recv: $CHAN_ANN_115x1x0 ++ recv: $CHAN_ANN_115x1x0 # New peer connects, with gossip_query option. -18. connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 -19. expect-send: type=init -20. recv: type=init localfeatures=80 globalfeatures= -21. maybe-send: type=gossip_timestamp_filter ++ connect: privkey=0000000000000000000000000000000000000000000000000000000000000005 ++ expect-send: type=init ++ recv: type=init localfeatures=80 globalfeatures= ++ maybe-send: type=gossip_timestamp_filter # Query for non-existent channels (104x1x0 105x1x0 106x1x0 107x1x0) -22. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=000000680000010000000069000001000000006a000001000000006b0000010000 -23. expect-send: type=reply_short_channel_ids_end ++ recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=000000680000010000000069000001000000006a000001000000006b0000010000 ++ expect-send: type=reply_short_channel_ids_end # zlib version -24. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=01789c6360c86060606400824c289d05a5b3c134001de001ab -25. expect-send: type=reply_short_channel_ids_end ++ recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=01789c6360c86060606400824c289d05a5b3c134001de001ab ++ expect-send: type=reply_short_channel_ids_end # Query for one channel (103x1x0) -26. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=000000670000010000 -27. expect-send: $CHAN_ANN_103x1x0 -28. Any order: - 1. expect-send: $CHAN_UPDATE_103x1x0_002 - 1. expect-send: $NODE_ANN_002 - 1. expect-send: $NODE_ANN_003 -29. expect-send: type=reply_short_channel_ids_end ++ recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=000000670000010000 ++ expect-send: $CHAN_ANN_103x1x0 ++ Any order: + * expect-send: $CHAN_UPDATE_103x1x0_002 + * expect-send: $NODE_ANN_002 + * expect-send: $NODE_ANN_003 ++ expect-send: type=reply_short_channel_ids_end # Query for two channels (103x1x0 109x1x0) -30. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 -31. One of: # the channel_announcements must lead, then it gets messy. - 1. expect-send: $CHAN_ANN_103x1x0 - 2. Any order: # Not really *any* order, since ann must predate update. - 1. expect-send: $CHAN_UPDATE_103x1x0_002 - 1. expect-send: $NODE_ANN_002 - 1. expect-send: $NODE_ANN_003 - 1. expect-send: $CHAN_ANN_109x1x0 - 1. expect-send: $CHAN_UPDATE_109x1x0_004 - 1. expect-send: $CHAN_UPDATE_109x1x0_005 - 1. expect-send: $NODE_ANN_004 - 1. expect-send: $CHAN_ANN_109x1x0 - 2. Any order: - 1. expect-send: $CHAN_ANN_103x1x0 - 1. expect-send: $CHAN_UPDATE_103x1x0_002 - 1. expect-send: $NODE_ANN_002 - 1. expect-send: $NODE_ANN_003 - 1. expect-send: $CHAN_UPDATE_109x1x0_004 - 1. expect-send: $CHAN_UPDATE_109x1x0_005 - 1. expect-send: $NODE_ANN_004 -32. expect-send: type=reply_short_channel_ids_end ++ recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 ++ One of: # the channel_announcements must lead, then it gets messy. + * expect-send: $CHAN_ANN_103x1x0 + + Any order: # Not really *any* order, since ann must predate update. + * expect-send: $CHAN_UPDATE_103x1x0_002 + * expect-send: $NODE_ANN_002 + * expect-send: $NODE_ANN_003 + * expect-send: $CHAN_ANN_109x1x0 + * expect-send: $CHAN_UPDATE_109x1x0_004 + * expect-send: $CHAN_UPDATE_109x1x0_005 + * expect-send: $NODE_ANN_004 + * expect-send: $CHAN_ANN_109x1x0 + + Any order: + * expect-send: $CHAN_ANN_103x1x0 + * expect-send: $CHAN_UPDATE_103x1x0_002 + * expect-send: $NODE_ANN_002 + * expect-send: $NODE_ANN_003 + * expect-send: $CHAN_UPDATE_109x1x0_004 + * expect-send: $CHAN_UPDATE_109x1x0_005 + * expect-send: $NODE_ANN_004 ++ expect-send: type=reply_short_channel_ids_end # Query for specific things only, if supported. # Announce messages only. - 1. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=0103000101 option_gossip_queries_ex + * recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=0103000101 option_gossip_queries_ex # zlib-encoded variant - 1. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=010b01789c6364040000050003 option_gossip_queries_ex -33. Any order: option_gossip_queries_ex - 1. expect-send: $CHAN_ANN_103x1x0 option_gossip_queries_ex - 1. expect-send: $CHAN_ANN_109x1x0 option_gossip_queries_ex -34. expect-send: type=reply_short_channel_ids_end option_gossip_queries_ex + * recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=010b01789c6364040000050003 option_gossip_queries_ex ++ Any order: option_gossip_queries_ex + * expect-send: $CHAN_ANN_103x1x0 option_gossip_queries_ex + * expect-send: $CHAN_ANN_109x1x0 option_gossip_queries_ex ++ expect-send: type=reply_short_channel_ids_end option_gossip_queries_ex # Node 1 channel_update messages only. - 1. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=0103000202 option_gossip_queries_ex + * recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=0103000202 option_gossip_queries_ex # zlib-encoded variant - 1. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=010b01789c6362020000080005 option_gossip_queries_ex + * recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=010b01789c6362020000080005 option_gossip_queries_ex -35. Any order: option_gossip_queries_ex - 1. expect-send: $CHAN_UPDATE_103x1x0_002 option_gossip_queries_ex - 1. expect-send: $CHAN_UPDATE_109x1x0_005 option_gossip_queries_ex -36. expect-send: type=reply_short_channel_ids_end option_gossip_queries_ex ++ Any order: option_gossip_queries_ex + * expect-send: $CHAN_UPDATE_103x1x0_002 option_gossip_queries_ex + * expect-send: $CHAN_UPDATE_109x1x0_005 option_gossip_queries_ex ++ expect-send: type=reply_short_channel_ids_end option_gossip_queries_ex # Node 2 channel_update messages only. - 1. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=0103000404 option_gossip_queries_ex + * recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=0103000404 option_gossip_queries_ex # zlib-encoded variant - 1. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=010b01789c63610100000e0009 option_gossip_queries_ex + * recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=010b01789c63610100000e0009 option_gossip_queries_ex -37. expect-send: $CHAN_UPDATE_109x1x0_004 option_gossip_queries_ex -38. expect-send: type=reply_short_channel_ids_end option_gossip_queries_ex ++ expect-send: $CHAN_UPDATE_109x1x0_004 option_gossip_queries_ex ++ expect-send: type=reply_short_channel_ids_end option_gossip_queries_ex # Node 1 announcements only. - 1. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=0103000808 option_gossip_queries_ex + * recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=0103000808 option_gossip_queries_ex # zlib-encoded variant - 1. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=010b01789ce3e00000001a0011 option_gossip_queries_ex + * recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=010b01789ce3e00000001a0011 option_gossip_queries_ex -39. expect-send: $NODE_ANN_002 option_gossip_queries_ex -40. expect-send: type=reply_short_channel_ids_end option_gossip_queries_ex ++ expect-send: $NODE_ANN_002 option_gossip_queries_ex ++ expect-send: type=reply_short_channel_ids_end option_gossip_queries_ex # Node 2 announcements only. - 1. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=0103001010 option_gossip_queries_ex + * recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=0103001010 option_gossip_queries_ex # zlib-encoded variant - 1. recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=010b01789c1310000000320021 option_gossip_queries_ex + * recv: type=query_short_channel_ids chain_hash=06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f encoded_short_ids=00000067000001000000006d0000010000 tlvs=010b01789c1310000000320021 option_gossip_queries_ex -41. Any order: option_gossip_queries_ex - 1. expect-send: $NODE_ANN_003 option_gossip_queries_ex - 1. expect-send: $NODE_ANN_004 option_gossip_queries_ex -42. expect-send: type=reply_short_channel_ids_end option_gossip_queries_ex ++ Any order: option_gossip_queries_ex + * expect-send: $NODE_ANN_003 option_gossip_queries_ex + * expect-send: $NODE_ANN_004 option_gossip_queries_ex ++ expect-send: type=reply_short_channel_ids_end option_gossip_queries_ex diff --git a/tests/events/test-spec.md b/tests/events/test-spec.md index 97f76597c..bb8a2b046 100644 --- a/tests/events/test-spec.md +++ b/tests/events/test-spec.md @@ -13,16 +13,17 @@ FILE := SEQUENCE* SEQUENCE := SEQUENCE_LINE+ SEQUENCE_LINE := SEQUENCE_STEP OPTION_SPEC* | META_LINE -SEQUENCE_STEP := INDENT4* NUMBER `.` SPACE+ EVENT_OR_SERIES OPTION_SPEC* +SEQUENCE_STEP := INDENT4* MARKER SPACE+ EVENT_OR_SERIES OPTION_SPEC* EVENT_OR_SERIES := EVENT | `One of:` | `Any order:` EVENT := INPUT_EVENT | OUTPUT_EVENT | `nothing` -META_LINE := COMMENT | SPACE* | VARSET | INCLUDE +META_LINE := COMMENT | SPACE* | VARSET | INCLUDE | SKIPIF COMMENT := `#` [SPACE|STRING]* VARSET := IDENTIFIER`=`[SPACE|STRING]* OPTION_SPEC* INCLUDE := `include` SPACE STRING OPTION_SPEC* +SKIPIF := `skipif` SPACE STRING OPTION_SPEC* Comment and blank lines are ignored. @@ -31,6 +32,9 @@ a `$` prefix. There's currently no scope to variables. Include lines pull in other files, which is helpful for complex tests. +Skipif lines cause immediate passing if the OPTION_SPECs match (and +print out the string); helpful for tests which require specific features. + Other lines are indented by multiples of 4 spaces; a line not indented by a multiple of 4 is be joined to the previous line (this allows nicer formatting for long lines). @@ -41,27 +45,26 @@ Each non-comment line indicates something to do to the implementation Indentation indicates alternative sequences, eg. this reflects two tests, STEP1->STEP2a->STEP3 and STEP1->STEP2b->STEP3: - 1. STEP1 - 1. STEP2a - 1. STEP2b - 2. STEP3 + * STEP1 + * STEP2a + * STEP2b + + STEP3 -An step must either have NUMBER 1, in which case it follows directly -from the parent, or NUMBER one greater than the previous step at the -same level, in which case it follows the previous. +An step must either have `*`, in which case it follows directly +from the parent, or `+` in which case it follows the previous. -There must be exactly one top-level `1.` step. +There must be exactly one top-level `*` step. The special marker `Any order:` indicates that the following sequences starting with distinct output events will occur, but might happen in any order. This is useful for gossip messages which can be ordered in multiple ways: - 1. STEP1 - 2. Any order: - 1. STEP2a - 1. STEP2b - 1. STEP2c + * STEP1 + + Any order: + * STEP2a + * STEP2b + * STEP2c This means the test will accept STEP1->STEP2a->STEP2b->STEP2c, STEP1->STEP2a->STEP2c->STEP2b, STEP1->STEP2b->STEP2a->STEP2c, @@ -72,12 +75,12 @@ The special marker `One of:` indicate sequences starting with distinct output events, only one of which could occur. This is useful for optional outputs which are more constrained, eg: - 1. STEP1 - 2. One of: - 1. STEP2a - 2. STEP2b - 1. STEP2c - 2. STEP3 + * STEP1 + + One of: + * STEP2a + + STEP2b + * STEP2c + + STEP3 This means the test will accept STEP1->STEP2a->STEP2b->STEP3, or STEP1->STEP2c->STEP3. @@ -99,7 +102,7 @@ compulsory (`even`). ## Input Events -INPUT_EVENT := CONNECT | RECV | BLOCK | DISCONNECT | OPENCMD +INPUT_EVENT := CONNECT | RECV | BLOCK | DISCONNECT | FUNDCHANCMD | INVOICECMD | ADDHTLCCMD CONNECT := `connect:` SPACE+ CONNECT_OPTS CONNECT_OPTS := `privkey=` HEX64 @@ -118,6 +121,8 @@ FUNDCHANCMD := `fundchannel:` [CONNSPEC] SPACE+ `amount=`NUMBER SPACE+ `utxo=`HE INVOICECMD := `invoice:` SPACE+ `amount=`NUMBER SPACE+ `preimage=`HEX64 +ADDHTLCCMD := `addhtlc:` [CONNSPEC] SPACE+ `amount=`NUMBER SPACE+ `preimage=`HEX64 + CONNSPEC := SPACE+ `conn=`HEX64 Input events are: @@ -137,6 +142,7 @@ Input events are: * `disconnect`: a connection closed by a peer. * `fundchannel`: tell the implementation to initiate the opening of a channel of the given `amount` of satoshis with the specific peer identified by `conn` (default, last `connect`). The funding comes from a single `utxo`, as specified by txid and output number. * `invoice`: tell the implementation to accept a payment of `amount` msatoshis, with payment_preimage `preimage`. +* `addhtlc`: tell the implementation to add (and commit) a simple htlc directly to the test peer, with CLTV 5 past the current block. ## Output Events diff --git a/tools/test-events-clightning.py b/tools/test-events-clightning.py index 0a802ee1b..1568310c4 100755 --- a/tools/test-events-clightning.py +++ b/tools/test-events-clightning.py @@ -6,9 +6,11 @@ import bitcoin import bitcoin.rpc +import hashlib import importlib import lightning import os +import secp256k1 import shutil import struct import subprocess @@ -146,6 +148,7 @@ def start(self): '--dev-bitcoind-poll=1', '--dev-fast-gossip', '--dev-gossip-time=1565587763', + '--dev-no-htlc-timeout', '--bind-addr=127.0.0.1:{}'.format(self.lightning_port), '--network=regtest', '--bitcoin-rpcuser=rpcuser', @@ -339,6 +342,22 @@ def invoice(self, amount, preimage, line): description='invoice from {}'.format(line), preimage=preimage) + + def addhtlc(self, conn, amount, preimage, line): + # Here's the completely undocumented way to use python secp! + pubkey = secp256k1.PrivateKey(bytes.fromhex(conn.connkey)).pubkey.serialize().hex() + payhash = hashlib.sha256(bytes.fromhex(preimage)).hexdigest() + routestep = { + 'msatoshi': amount, + 'id': pubkey, + # We internally add one. + 'delay': 4, + # We actually ignore this. + 'channel': '1x1x1' + } + self.rpc.sendpay([routestep], payhash) + + def _readmsg(self, conn): rawl = conn.proc.stdout.read(2) length = struct.unpack('>H', rawl)[0] diff --git a/tools/test-events.py b/tools/test-events.py index c3e8dcb37..5d43047c4 100755 --- a/tools/test-events.py +++ b/tools/test-events.py @@ -239,6 +239,11 @@ def invoice(self, amount, preimage, line): print("[INVOICE for {} with PREIMAGE {} {}]" .format(amount, preimage, line)) + def addhtlc(self, conn, amount, preimage, line): + if self.verbose: + print("[ADDHTLC TO {} for {} with PREIMAGE {} {}]" + .format(conn, amount, preimage, line)) + def expect_send(self, conn, line): if self.verbose: print("[EXPECT-SEND {}]".format(line)) @@ -268,8 +273,8 @@ def __init__(self, message, name, typename, count, options): self.options = options self.islenvar = False # This contains all the integer types: otherwise it's a hexstring, - self.isinteger = (typename in name2structfmt and - not (typename == 'byte' and count)) + self.isinteger = (typename in name2structfmt + and not (typename == 'byte' and count)) # This is set for static-sized array. self.arraylen = None @@ -864,6 +869,7 @@ def action(self, runner, line): runner.recv(which_connection(line, runner, self.connkey), self.b, line) + def compare_results(msgname, f, v, exp): """ f -> field; v -> value; exp -> expected value """ @@ -879,24 +885,25 @@ def compare_results(msgname, f, v, exp): .format(f.name)) # Do signature verification, if necessary - if (f.typename == 'signature' and isinstance(exp,tuple)) or (f.typename == 'signature' - and (f.arrayvar or f.arraylen) and isinstance(exp,list)): - if f.arrayvar or f.arraylen: - for (e, val) in list(map(lambda x,y: (x,y), exp, v)): - if isinstance(e, tuple): - if not Sigs.verify_sig(e[0], e[1], val): - return "Invalid signature ({}) for privkey {}, hash {}".format( - val.hex(), e[0], e[1]) - elif e != val: - return ("Expected {}.{}(type:{}) {} but got {}" - .format(msgname, - f.name, f.typename, e.hex(), val.hex())) - else: - # v should be a valid signature, a byte-array r||s - if not Sigs.verify_sig(exp[0], exp[1], v): - return "Invalid signature ({}) for privkey {}, hash {}".format(v.hex(), exp[0], exp[1]) - # Successfully matched all sigs!! - return None + if ((f.typename == 'signature' and isinstance(exp, tuple)) + or (f.typename == 'signature' + and (f.arrayvar or f.arraylen) and isinstance(exp, list))): + if f.arrayvar or f.arraylen: + for (e, val) in list(map(lambda x, y: (x, y), exp, v)): + if isinstance(e, tuple): + if not Sigs.verify_sig(e[0], e[1], val): + return "Invalid signature ({}) for privkey {}, hash {}".format( + val.hex(), e[0], e[1]) + elif e != val: + return ("Expected {}.{}(type:{}) {} but got {}" + .format(msgname, + f.name, f.typename, e.hex(), val.hex())) + else: + # v should be a valid signature, a byte-array r||s + if not Sigs.verify_sig(exp[0], exp[1], v): + return "Invalid signature ({}) for privkey {}, hash {}".format(v.hex(), exp[0], exp[1]) + # Successfully matched all sigs!! + return None if isinstance(exp, tuple): # Out-of-range bitmaps are considered 0 (eg. feature tests) @@ -933,7 +940,7 @@ def compare_results(msgname, f, v, exp): valstr = str(v) expectstr = str(exp) # Same as above note about a range of length - elif isinstance(exp,str) and exp.startswith('*'): + elif isinstance(exp, str) and exp.startswith('*'): if check_range(exp[1:], len(v.hex()) // 2): return None expectstr = "result of bytelen {}".format(exp[1:]) @@ -957,6 +964,7 @@ def check_range(exp, val_len): return int(len_range[0]) <= val_len and int(len_range[1]) >= val_len + def message_match(expectmsg, expectfields, b): """Internal helper to see if b matches expectmsg & expectfields. @@ -1147,6 +1155,19 @@ def action(self, runner, line): runner.invoice(self.amount, self.preimage, line) +class AddHtlcEvent(object): + def __init__(self, line, parts): + d = parse_params(line, parts, ['amount', 'preimage'], ['conn']) + self.connkey = optional_connection(line, d) + self.preimage = d['preimage'] + check_hex(line, self.preimage, 64) + self.amount = int(d['amount']) + + def action(self, runner, line): + runner.addhtlc(which_connection(line, runner, self.connkey), + self.amount, self.preimage, line) + + class ExpectErrorEvent(object): def __init__(self, line, parts): d = parse_params(line, parts, [], ['conn']) @@ -1185,6 +1206,8 @@ def __init__(self, args, desc, line): self.actor = FundChannelEvent(line, parts[1:]) elif parts[0] == 'invoice:': self.actor = InvoiceEvent(line, parts[1:]) + elif parts[0] == 'addhtlc:': + self.actor = AddHtlcEvent(line, parts[1:]) elif parts[0] == 'expect-error:': self.actor = ExpectErrorEvent(line, parts[1:]) elif parts[0] == 'nothing': @@ -1386,11 +1409,11 @@ def act(self, runner): # it, if allow_children). Returns the initial Sequence, a list of # Sequence leaves, and the next linenum. def load_sequence(args, lines, linenum, indentlevel, graph): - count = 1 init_seq = Sequence(args) seq = init_seq terminals = [seq] + expect = '*' if graph is not None: graph.add_node(seq) @@ -1398,8 +1421,8 @@ def load_sequence(args, lines, linenum, indentlevel, graph): # We always parse one child. if lines[linenum].indentlevel != indentlevel: raise LineError(lines[linenum], "Expected {} indents.", indentlevel) - if not lines[linenum].line.startswith('1.'): - raise LineError(lines[linenum], "Expected 1.") + if not lines[linenum].line.startswith('*'): + raise LineError(lines[linenum], "Expected *") while linenum < len(lines): # Unindent? We're done. @@ -1431,17 +1454,17 @@ def load_sequence(args, lines, linenum, indentlevel, graph): elif lines[linenum].indentlevel != indentlevel: raise LineError(lines[linenum], "Unexpected indent.") - # Same level. - parts = lines[linenum].line.partition('.') - if parts[1] != '.': - raise LineError(lines[linenum], - "Expected '{}.' or '1.'".format(count)) + # First time around, we expect '*', then '+'. + if lines[linenum].line[0] != expect: + # Unexpected * means a new start. + if lines[linenum].line[0] == '*': + return init_seq, terminals, linenum - # Unexpected 1. means a new start. - if parts[0] != str(count): - return init_seq, terminals, linenum + raise LineError(lines[linenum], "Expected '*' or '+'") - if parts[2].split() == ['One', 'of:']: + expect = '+' + part = lines[linenum].line[1:] + if part.split() == ['One', 'of:']: event = OneOfEvent(args, lines[linenum]) # We expect indented sequences @@ -1456,7 +1479,7 @@ def load_sequence(args, lines, linenum, indentlevel, graph): if event.sequences == []: raise LineError(lines[linenum], "Expected indented sequences after 'One of:'") - elif parts[2].split() == ['Any', 'order:']: + elif part.split() == ['Any', 'order:']: event = AnyOrderEvent(args, lines[linenum]) # We expect indented sequences @@ -1472,7 +1495,7 @@ def load_sequence(args, lines, linenum, indentlevel, graph): raise LineError(lines[linenum], "Expected indented sequences after 'Any order:'") else: - event = Event(args, parts[2], lines[linenum]) + event = Event(args, part, lines[linenum]) linenum += 1 # Any children from last step, start new Sequence for them to connect. @@ -1487,7 +1510,6 @@ def load_sequence(args, lines, linenum, indentlevel, graph): terminals = [seq] else: seq.add_event(event) - count += 1 # Any children will continue from our last event(s). return init_seq, terminals, linenum @@ -1524,31 +1546,31 @@ def line_minus_comments(verbose, line, linenum): def filter_out(args, line, filename, linenum): - """Trim options: we discard the line if it doesn't qualify.""" - while True: - m = re.search("(?P!?)" - "(?Popt[A-Za-z_]*)" - r"(?P(/(odd|even))?)\s*$", line) - if m is None: - return line - - if m.group('oddoreven') != '': - present = m.group('optname') + m.group('oddoreven') in args.option - else: - present = (m.group('optname') + '/odd' in args.option - or m.group('optname') + '/even' in args.option) + """Trim options: we discard the line if it doesn't qualify.""" + while True: + m = re.search("(?P!?)" + "(?Popt[A-Za-z_]*)" + r"(?P(/(odd|even))?)\s*$", line) + if m is None: + return line + + if m.group('oddoreven') != '': + present = m.group('optname') + m.group('oddoreven') in args.option + else: + present = (m.group('optname') + '/odd' in args.option + or m.group('optname') + '/even' in args.option) - # If option was specified as --option, invert must be set. - wanted = m.group('invert') != '!' - if present != wanted: - if args.verbose: - print("# Removing line {}: requires {}{}{}" - .format(Line(filename, linenum, linenum, 0, line), - m.group('invert'), - m.group('optname'), - m.group('oddoreven'))) - return '' - line = line[:m.start()] + # If option was specified as --option, invert must be set. + wanted = m.group('invert') != '!' + if present != wanted: + if args.verbose: + print("# Removing line {}: requires {}{}{}" + .format(Line(filename, linenum, linenum, 0, line), + m.group('invert'), + m.group('optname'), + m.group('oddoreven'))) + return '' + line = line[:m.start()] def indentation(s): @@ -1567,6 +1589,13 @@ def indentation(s): return s[consumed:], level +class SkipParsingException(Exception): + """Exception raised when skipif is found during parsing""" + def __init__(self, reason): + super().__init__() + self.reason = reason + + def parse_file(args, f, filename, variables): """Get non-comment lines, as [(linenums,indentlevel,line)], grab vars""" content = [] @@ -1631,7 +1660,7 @@ def parse_file(args, f, filename, variables): indentlevel, lines[i]), "Re-setting var {}".format(parts[0])) variables[parts[0]] = parts[2] - # Similarly, do include directives immediately. + # Similarly, do include/skipif directives immediately. elif line.startswith('include '): # Filenames are assumed to be relative. subfilename = path.join(path.dirname(filename), line[8:]) @@ -1642,6 +1671,8 @@ def parse_file(args, f, filename, variables): for l in sublines: l.indentlevel += indentlevel content += sublines + elif line.startswith('skipif '): + raise SkipParsingException(line[7:]) else: content.append(Line(filename, line_start, line_end, indentlevel, line)) @@ -1662,7 +1693,13 @@ def main(args, runner): else: f = open(filename) - lines, _ = parse_file(args, f, filename, {}) + try: + lines, _ = parse_file(args, f, filename, {}) + except SkipParsingException as e: + print("{}: skipped: {}".format(filename, e.reason)) + f.close() + continue + f.close() graph = nx.DiGraph()