hsmd_init_reply values don't match CLN native
I added this patch to vls-hsmd/lightning:
diff --git a/lightningd/hsm_control.c b/lightningd/hsm_control.c
index 9a49c03df..0e199deae 100644
--- a/lightningd/hsm_control.c
+++ b/lightningd/hsm_control.c
@@ -123,6 +123,12 @@ struct ext_key *hsm_init(struct lightningd *ld)
errx(HSM_GENERIC_ERROR, "HSM did not give init reply");
}
+ printf("HSMD_INIT_REPLY node_id=%s bip32_base=%s bolt12=%s onion_reply_secret=%s\n",
+ type_to_string(tmpctx, struct node_id, &ld->id),
+ tal_hexstr(tmpctx, bip32_base, sizeof(*bip32_base)),
+ type_to_string(tmpctx, struct point32, &ld->bolt12_base),
+ type_to_string(tmpctx, struct secret, &ld->onion_reply_secret));
+
return bip32_base;
}
Native output:
make config-experimental test-one test=tests/test_pay.py::test_pay VLS_MODE=cln:native |& grep -a HSMD_INIT_REPLY
lightningd-1: HSMD_INIT_REPLY node_id=0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518 bip32_base=b66422df8631ef4ed610a0407c5ba0b822948121bc47bdc5c074e2111841769be8b1813600000000000000000000000000000000020000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000c8dd1eb6448402ecc839f2c8b8e44203b576dad6cf873504000000020b2dc5057bad8cf75a078b75acb96ccbfad3a9ff00152e85777454b3c961b05e0000000000000000000000000000000000000000000000000000000000000000 bolt12=e25c37f1af7cb00984e594eae0f4d1d03537ffe202b7a6b2ebc1e5fcf1dfd9f4 onion_reply_secret=cfd1fb341180bf3fa2f624ed7d4a809aedf388e3ba363c589faf341018cb83e1
lightningd-2: HSMD_INIT_REPLY node_id=022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59 bip32_base=54dbb885b4da8fbe5ff40308e07b2a4766e40123efe45f09b4889db6db241d3a66ad4b03000000000000000000000000000000000200000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000007a4daa5387a0aca4641db0f4f9961aafbe163421cf873504000000024b00812e45d466730defb09eafe745f26d307936a9987f489c018cb998e510600000000000000000000000000000000000000000000000000000000000000000 bolt12=724e511036b40198f05778399027744bb406036ab6aff13cc3960e48dcf66ab9 onion_reply_secret=ee654485906d577b4f82d60a40d24d89b8139218523d33289ab682bebe964f65
Standalone:
make config-experimental test-one test=tests/test_pay.py::test_pay VLS_MODE=cln:standalone |& grep -a HSMD_INIT_REPLY
lightningd-1: HSMD_INIT_REPLY node_id=0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518 bip32_base=b66422df8631ef4ed610a0407c5ba0b822948121bc47bdc5c074e2111841769be8b1813600000000000000000000000000000000020000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000c8dd1eb6448402ecc839f2c8b8e44203b576dad6cf873504000000020b2dc5057bad8cf75a078b75acb96ccbfad3a9ff00152e85777454b3c961b05e0000000000000000000000000000000000000000000000000000000000000000 bolt12=9eeda2c7c08257e921d36148d1c3515f86a53561b10ba3a8b6ca59361af550ee onion_reply_secret=41bfd2660762506c9933ade59f1debf7e6495b10c14a92dbcd2d623da2507d3d
lightningd-2: HSMD_INIT_REPLY node_id=022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59 bip32_base=54dbb885b4da8fbe5ff40308e07b2a4766e40123efe45f09b4889db6db241d3a66ad4b03000000000000000000000000000000000200000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000007a4daa5387a0aca4641db0f4f9961aafbe163421cf873504000000024b00812e45d466730defb09eafe745f26d307936a9987f489c018cb998e510600000000000000000000000000000000000000000000000000000000000000000 bolt12=0fad8fd5c082cbc00608208375ad4dd7f68ed48586146f8cc53a9339843a91cc onion_reply_secret=c4a813f81ffdca1da6864db81795ad2d320add274452cafa1fb2ac2d07d062bd
Inplace:
make config-experimental test-one test=tests/test_pay.py::test_pay VLS_MODE=cln:inplace |& grep -a HSMD_INIT_REPLY
lightningd-1: HSMD_INIT_REPLY node_id=0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518 bip32_base=b66422df8631ef4ed610a0407c5ba0b822948121bc47bdc5c074e2111841769be8b1813600000000000000000000000000000000020000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000c8dd1eb6448402ecc839f2c8b8e44203b576dad6cf873504000000020b2dc5057bad8cf75a078b75acb96ccbfad3a9ff00152e85777454b3c961b05e0000000000000000000000000000000000000000000000000000000000000000 bolt12=9eeda2c7c08257e921d36148d1c3515f86a53561b10ba3a8b6ca59361af550ee onion_reply_secret=0101010101010101010101010101010101010101010101010101010101010101
lightningd-2: HSMD_INIT_REPLY node_id=022d223620a359a47ff7f7ac447c85c46c923da53389221a0054c11c1e3ca31d59 bip32_base=54dbb885b4da8fbe5ff40308e07b2a4766e40123efe45f09b4889db6db241d3a66ad4b03000000000000000000000000000000000200000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000007a4daa5387a0aca4641db0f4f9961aafbe163421cf873504000000024b00812e45d466730defb09eafe745f26d307936a9987f489c018cb998e510600000000000000000000000000000000000000000000000000000000000000000 bolt12=0fad8fd5c082cbc00608208375ad4dd7f68ed48586146f8cc53a9339843a91cc onion_reply_secret=0101010101010101010101010101010101010101010101010101010101010101
Conclusions:
-
node_id: all match -
bip32_base: all match -
bolt12: standalone and inplace match, but are different than native -
onion_reply_secret: all different, inplace is obvious placeholder
Edited by Ken Sedgwick