Skip to content

Commit

Permalink
Use new test vector htlcs for CLTV tie-breaker test
Browse files Browse the repository at this point in the history
  • Loading branch information
araspitzu committed Feb 6, 2019
1 parent 130f421 commit 8e8b4da
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions 03-transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -879,6 +879,14 @@ HTLCs are not used for the first "simple commitment tx with no HTLCs" test.
htlc 4 amount_msat: 4000000
htlc 4 expiry: 504
htlc 4 payment_preimage: 0404040404040404040404040404040404040404040404040404040404040404
htlc 5 direction: local->remote
htlc 5 amount_msat: 5000000
htlc 5 expiry: 505
htlc 5 payment_preimage: 0505050505050505050505050505050505050505050505050505050505050505
htlc 6 direction: local->remote
htlc 6 amount_msat: 5000000
htlc 6 expiry: 506
htlc 6 payment_preimage: 0505050505050505050505050505050505050505050505050505050505050505

<!-- The test vector values are derived, as per Key Derivation, though it's not
required for this test. They're included here for completeness and
Expand Down Expand Up @@ -1268,19 +1276,19 @@ And, here are the test vectors themselves:
to_remote_msat: 3000000000
local_feerate_per_kw: 253
# HTLC 0 received amount 1000000 wscript 76a91414011f7254d96b819c76986c277d115efce6f7b58763ac67210394854aa6eab5b2a8122cc726e9dded053a2184d88256816826d6231c068d4a5b7c8201208763a914b8bcb07f6344b42ab04250c86a6e8b75d3fdbbc688527c21030d417a46946384f88d5f3337267c5e579765875dc4daca813e21734b140639e752ae677502f401b175ac6868
# HTLC 1 offered amount 2000000 wscript 76a91414011f7254d96b819c76986c277d115efce6f7b58763ac67210394854aa6eab5b2a8122cc726e9dded053a2184d88256816826d6231c068d4a5b7c820120876475527c21030d417a46946384f88d5f3337267c5e579765875dc4daca813e21734b140639e752ae67a914b8bcb07f6344b42ab04250c86a6e8b75d3fdbbc688ac6868
# HTLC 2 offered amount 2000000 wscript 76a91414011f7254d96b819c76986c277d115efce6f7b58763ac67210394854aa6eab5b2a8122cc726e9dded053a2184d88256816826d6231c068d4a5b7c820120876475527c21030d417a46946384f88d5f3337267c5e579765875dc4daca813e21734b140639e752ae67a914b8bcb07f6344b42ab04250c86a6e8b75d3fdbbc688ac6868
# HTLC 1 and 2 have CLTV 502 and 503, respectively, all htlc have preimage 0000000000000000000000000000000000000000000000000000000000000000
output commit_tx: 02000000000101bef67e4e2fb9ddeeb3461973cd4c62abb35050b1add772995b820b584a488489000000000038b02b8005e80300000000000022002052bfef0479d7b293c27e0f1eb294bea154c63a3294ef092c19af51409bce0e2ad007000000000000220020b9826699af5c86f289a6fe059b0d541048c6c9299f52ba223305f0920d953759d007000000000000220020b9826699af5c86f289a6fe059b0d541048c6c9299f52ba223305f0920d953759c0c62d0000000000160014ccf1af2f2aabee14bb40fa3851ab2301de843110a79f6a00000000002200204adb4e2f00643db396dd120d4e7dc17625f5f2c11a40d857accc862d6b7dd80e040047304402202254e1ab2b07e8c2c9a0108d7b547b6669ec4eccb2a19ebf68078eb54936ac4902203360cf0fa62315a1154428d34e8fe85133ea4d104ea9fccee57ffabe3aa337720147304402207fb2b0030a35d5ea93297fb87804b55fb43326c8e9f9f33cdd8417cb26a1d3ef02202de9f461f715ede216c03fdb8458dd4156e1d2cbf09e235055b9f72473abafcd01475221023da092f6980e58d2c037173180e9a465476026ee50f96695963e8efe436f54eb21030e9f7b623d2ccc7c9bd44d66d5ce21ce504c0acf6385a132cec6d3c39fa711c152ae3e195220
# local_htlc_signature = 30440220085e8c05ac4935f26b2ce59d0cca609c7d128d6222b457e0c75ef76265091b8902204f39ae4df178590526ee5c3bafcc554b6fbf5cf01410bc0a023f8bbb11393a7401
# remote_htlc_signature = 304402200a16b20a51f44ed3b3d278bdd27745eafaab8c76071552ad18ca23eb7af9a0a202201047af2d13ef67da49413242d859cc08b1de1eae686de4f551dcc967b18abc6401
output htlc_success_tx 0: 02000000000101fa3e2061686b008dc9e8a887fa6d08ba8957a5615b33c747cb398fb1eaf5d5c10000000000000000000137030000000000002200204adb4e2f00643db396dd120d4e7dc17625f5f2c11a40d857accc862d6b7dd80e050047304402200a16b20a51f44ed3b3d278bdd27745eafaab8c76071552ad18ca23eb7af9a0a202201047af2d13ef67da49413242d859cc08b1de1eae686de4f551dcc967b18abc64014730440220085e8c05ac4935f26b2ce59d0cca609c7d128d6222b457e0c75ef76265091b8902204f39ae4df178590526ee5c3bafcc554b6fbf5cf01410bc0a023f8bbb11393a74012000000000000000000000000000000000000000000000000000000000000000008a76a91414011f7254d96b819c76986c277d115efce6f7b58763ac67210394854aa6eab5b2a8122cc726e9dded053a2184d88256816826d6231c068d4a5b7c8201208763a914b8bcb07f6344b42ab04250c86a6e8b75d3fdbbc688527c21030d417a46946384f88d5f3337267c5e579765875dc4daca813e21734b140639e752ae677502f401b175ac686800000000
# local_htlc_signature = 3045022100ef170b5fd02495e74458e063cdaecc37ce9570a839d5f61320e72c7e6deef32802206ae737902b459c4e7e6001e4ce59c6db25d20a72362d184b3f38c31256aeb4cf01
# remote_htlc_signature = 3045022100f15728b1b68e9d1e6f09a7fb66256b29d02530a20f4acdc36e17dc03664277d20220751d484ab536e2017dd767c44ab8b5fba469c007b12a5aa8c64ddab891b17b6401
output htlc_timeout_tx 1: 02000000000101fa3e2061686b008dc9e8a887fa6d08ba8957a5615b33c747cb398fb1eaf5d5c10100000000000000000129070000000000002200204adb4e2f00643db396dd120d4e7dc17625f5f2c11a40d857accc862d6b7dd80e0500483045022100f15728b1b68e9d1e6f09a7fb66256b29d02530a20f4acdc36e17dc03664277d20220751d484ab536e2017dd767c44ab8b5fba469c007b12a5aa8c64ddab891b17b6401483045022100ef170b5fd02495e74458e063cdaecc37ce9570a839d5f61320e72c7e6deef32802206ae737902b459c4e7e6001e4ce59c6db25d20a72362d184b3f38c31256aeb4cf01008576a91414011f7254d96b819c76986c277d115efce6f7b58763ac67210394854aa6eab5b2a8122cc726e9dded053a2184d88256816826d6231c068d4a5b7c820120876475527c21030d417a46946384f88d5f3337267c5e579765875dc4daca813e21734b140639e752ae67a914b8bcb07f6344b42ab04250c86a6e8b75d3fdbbc688ac6868f6010000
# local_htlc_signature = 304402206a68d875bd2a630220b13c212313ce06c5b9d322de5dc332fe6eb0557e9437d502204a063b55af42783401c0c95293557d20d9298f51e478477dccfa49858bc276c401
# remote_htlc_signature = 304402207c32fb1a3daa73a6af77839d7d17e0dfaeaedd7c6e8d0e088f2bf0f2ccfa4ea002202e763f52b403c421bad0ba78961aae11f1426b67602b7ada7b2b9e2e5799f48f01
output htlc_timeout_tx 2: 02000000000101fa3e2061686b008dc9e8a887fa6d08ba8957a5615b33c747cb398fb1eaf5d5c10200000000000000000129070000000000002200204adb4e2f00643db396dd120d4e7dc17625f5f2c11a40d857accc862d6b7dd80e050047304402207c32fb1a3daa73a6af77839d7d17e0dfaeaedd7c6e8d0e088f2bf0f2ccfa4ea002202e763f52b403c421bad0ba78961aae11f1426b67602b7ada7b2b9e2e5799f48f0147304402206a68d875bd2a630220b13c212313ce06c5b9d322de5dc332fe6eb0557e9437d502204a063b55af42783401c0c95293557d20d9298f51e478477dccfa49858bc276c401008576a91414011f7254d96b819c76986c277d115efce6f7b58763ac67210394854aa6eab5b2a8122cc726e9dded053a2184d88256816826d6231c068d4a5b7c820120876475527c21030d417a46946384f88d5f3337267c5e579765875dc4daca813e21734b140639e752ae67a914b8bcb07f6344b42ab04250c86a6e8b75d3fdbbc688ac6868f7010000
# HTLC 5 offered amount 5000000 wscript 76a91414011f7254d96b819c76986c277d115efce6f7b58763ac67210394854aa6eab5b2a8122cc726e9dded053a2184d88256816826d6231c068d4a5b7c820120876475527c21030d417a46946384f88d5f3337267c5e579765875dc4daca813e21734b140639e752ae67a9142002cc93ebefbb1b73f0af055dcc27a0b504ad7688ac6868
# HTLC 6 offered amount 5000000 wscript 76a91414011f7254d96b819c76986c277d115efce6f7b58763ac67210394854aa6eab5b2a8122cc726e9dded053a2184d88256816826d6231c068d4a5b7c820120876475527c21030d417a46946384f88d5f3337267c5e579765875dc4daca813e21734b140639e752ae67a9142002cc93ebefbb1b73f0af055dcc27a0b504ad7688ac6868
# HTLC 5 and 6 have CLTV 505 and 506, respectively, and preimage 0505050505050505050505050505050505050505050505050505050505050505
output commit_tx: 02000000000101bef67e4e2fb9ddeeb3461973cd4c62abb35050b1add772995b820b584a488489000000000038b02b8005e80300000000000022002052bfef0479d7b293c27e0f1eb294bea154c63a3294ef092c19af51409bce0e2a8813000000000000220020305c12e1a0bc21e283c131cea1c66d68857d28b7b2fce0a6fbc40c164852121b8813000000000000220020305c12e1a0bc21e283c131cea1c66d68857d28b7b2fce0a6fbc40c164852121bc0c62d0000000000160014ccf1af2f2aabee14bb40fa3851ab2301de843110a79f6a00000000002200204adb4e2f00643db396dd120d4e7dc17625f5f2c11a40d857accc862d6b7dd80e04004730440220586f17b3f3f6eec96a0dc7040f1a33174c707e032010421fa1965497cd1c81e602204476e6a4cc17d433e8ad82edff2ffa47c954ecb52aad9cc34382befb66f6e00001473044022069797b84fad1e0e7b02e1edeec80cb6e0b6f01170700bca273788715f55e0c560220260833550768b1db3ed88f8c005cf2560821b1879ec69834cd9765de25ec350601475221023da092f6980e58d2c037173180e9a465476026ee50f96695963e8efe436f54eb21030e9f7b623d2ccc7c9bd44d66d5ce21ce504c0acf6385a132cec6d3c39fa711c152ae3e195220
# local_htlc_signature = 3044022077803ffab08308ac6ceaba6024855029f31d88e1420ece6aac1cf35258efb42702207db2cfe24de7b19a6e0e95082c595643fe18b7e0f0071297b2bb940807e774d2
# remote_htlc_signature = 304502210087be93ccb1fd373ebd489c2dbe5f3a95a5cd7b173255f63367d063843f0ed263022027de0683bc4ac9afe1cdff48f16bb1a8e27789328b534e1cc39bf4dd0448ed69
output htlc_success_tx 0: 020000000001012ac263f51690e216ddc176c047106d762592174f52ff72614b037f23124a67440000000000000000000137030000000000002200204adb4e2f00643db396dd120d4e7dc17625f5f2c11a40d857accc862d6b7dd80e050048304502210087be93ccb1fd373ebd489c2dbe5f3a95a5cd7b173255f63367d063843f0ed263022027de0683bc4ac9afe1cdff48f16bb1a8e27789328b534e1cc39bf4dd0448ed6901473044022077803ffab08308ac6ceaba6024855029f31d88e1420ece6aac1cf35258efb42702207db2cfe24de7b19a6e0e95082c595643fe18b7e0f0071297b2bb940807e774d2012000000000000000000000000000000000000000000000000000000000000000008a76a91414011f7254d96b819c76986c277d115efce6f7b58763ac67210394854aa6eab5b2a8122cc726e9dded053a2184d88256816826d6231c068d4a5b7c8201208763a914b8bcb07f6344b42ab04250c86a6e8b75d3fdbbc688527c21030d417a46946384f88d5f3337267c5e579765875dc4daca813e21734b140639e752ae677502f401b175ac686800000000
# local_htlc_signature = 30440220579ac2d6fdbdb0cb7bb07b9d2a52e9cb87aab26156b6290c504c1781f025daa00220310d6a5dc91c4c49cc362c1942b2af84130052c8ec597c1287d9cc18cd349f39
# remote_htlc_signature = 3045022100e75ab7170a3cd3266d0abd38566ca8e6f9102949a4394e497a855dd3c0d7158b02201b91a0f3b18c512d8223eb4fdccb563d1a64b828882ca0b183340ee36dff152f
output htlc_timeout_tx 1: 020000000001012ac263f51690e216ddc176c047106d762592174f52ff72614b037f23124a674401000000000000000001e1120000000000002200204adb4e2f00643db396dd120d4e7dc17625f5f2c11a40d857accc862d6b7dd80e0500483045022100e75ab7170a3cd3266d0abd38566ca8e6f9102949a4394e497a855dd3c0d7158b02201b91a0f3b18c512d8223eb4fdccb563d1a64b828882ca0b183340ee36dff152f014730440220579ac2d6fdbdb0cb7bb07b9d2a52e9cb87aab26156b6290c504c1781f025daa00220310d6a5dc91c4c49cc362c1942b2af84130052c8ec597c1287d9cc18cd349f3901008576a91414011f7254d96b819c76986c277d115efce6f7b58763ac67210394854aa6eab5b2a8122cc726e9dded053a2184d88256816826d6231c068d4a5b7c820120876475527c21030d417a46946384f88d5f3337267c5e579765875dc4daca813e21734b140639e752ae67a9142002cc93ebefbb1b73f0af055dcc27a0b504ad7688ac6868f9010000
# local_htlc_signature = 3045022100a62f73f9345a7821335391f00c64ebcba11628dd2e5058fc6f9827561381092402202c858823d25922fa2bafdac27f9bcd103d99d940823a581abe70bb0ab8ca9352
# remote_htlc_signature = 304402206afc9e5ad67a329bbbc63e00f9ce5fb90d07121cf57c4db0b9dd05881f1ee89d02200917f67fff5c5acfcd5e4825e6e651671af6c261eb69b6a44d159edae724f308
output htlc_timeout_tx 2: 020000000001012ac263f51690e216ddc176c047106d762592174f52ff72614b037f23124a674402000000000000000001e1120000000000002200204adb4e2f00643db396dd120d4e7dc17625f5f2c11a40d857accc862d6b7dd80e050047304402206afc9e5ad67a329bbbc63e00f9ce5fb90d07121cf57c4db0b9dd05881f1ee89d02200917f67fff5c5acfcd5e4825e6e651671af6c261eb69b6a44d159edae724f30801483045022100a62f73f9345a7821335391f00c64ebcba11628dd2e5058fc6f9827561381092402202c858823d25922fa2bafdac27f9bcd103d99d940823a581abe70bb0ab8ca935201008576a91414011f7254d96b819c76986c277d115efce6f7b58763ac67210394854aa6eab5b2a8122cc726e9dded053a2184d88256816826d6231c068d4a5b7c820120876475527c21030d417a46946384f88d5f3337267c5e579765875dc4daca813e21734b140639e752ae67a9142002cc93ebefbb1b73f0af055dcc27a0b504ad7688ac6868fa010000
num_htlcs: 3

# Appendix D: Per-commitment Secret Generation Test Vectors
Expand Down

0 comments on commit 8e8b4da

Please sign in to comment.