Open ulidtko opened 3 years ago
I didn't read in deep yet, I think you can split the issue in two, they seem unrelated.
@vincenzopalazzo I care much less about the second issue. Only mentioning it due to potential relevance to the first.
The central issue is not being able to open a channel — for unclear reason; I don't understand why. There's enough coins, there's tcp connectivity... There's also this pretty scary-sounding error Script failed an OP_EQUALVERIFY operation
. Where does it come from?
The central issue is not being able to open a channel — for unclear reason; I don't understand why. There's enough coins, there's tcp connectivity...
It is not an issue related to the lightning protocol, but it is to the bitcoin side, I other words you are not able to sign the transaction for the problem that you have here Script failed an OP_EQUALVERIFY
. What it the reason? Mh unclear now with the data that you give, for example, what it the version of bitcoin that you are using?
@vincenzopalazzo bitcoin-core 0.21
$ bitcoin-cli -testnet --version
Bitcoin Core RPC client version v0.21.0
There's one segwit UTXO in the bitcoin node:
{
"txid": "cde023e34c5d3ed99a01834f4207d3d28f9f2774cc9d9c3802f20bca93945160",
"vout": 1,
"address": "tb1qhn23p2dj8vlp9zdv33n708w8vzn8lwueh6j6y9",
"scriptPubKey": "0014bcd510a9b23b3e1289ac8c67e79dc760a67fbb99",
"amount": 0.00054156,
"confirmations": 4124,
"spendable": true,
"solvable": true,
"desc": "wpkh([f90d9391/0'/1'/3']02b3882c013daca7c715fdebce8516700fbf5c9b0c4cdf0cee4880c5475a95442e)#susphcft",
"safe": true
}
There's more on-chain UTXO's in c-lightningd wallet. Should I thoroughly inspect all of them one-by-one? What to look for? Any test I can perform? Some way to replicate the error from bitcoin node side?
My shallow knowledge about bitcoin tx script lets me interpret Script failed an OP_EQUALVERIFY operation
as a pubkey hash mismatch in a lightning-constructed output script — right?
Why could that be, I wonder?
There's one segwit UTXO in the bitcoin node:
Bitcoin core wallet and c-lightning wallet are different wallets, and they don't share any information. Bitcoin core is used only to talk with the network and nothing else (push transaction and get bitcoin network info like fee rate).
My shallow knowledge about bitcoin tx script lets me interpret Script failed an OP_EQUALVERIFY operation as a pubkey hash mismatch in a lightning-constructed output script — right?
Right, and the thing that jumps to my mind is that there is something wrong with your hsm_secret
, do you make any "custom" operation with it? usually the sign operation it is generated under the hood with the libwally-core, and the wallet information are stored inside the file hsm_secret, so maybe there is some problem with it caused by some custom operation?
there is something wrong with your hsm_secret, do you make any "custom" operation with it?
No... but good idea still, I suspect the hsm_secret
may've been overwritten by imprecise deployment orchestration.
I'm still checking this possibility.
No... but the good idea still, I suspect the hsm_secret may've been overwritten by imprecise deployment orchestration.
Mh, this is a really good thing to know, because there are not a very strange things that can happen from a c-lightning point of view to be the cause of the error.
What could be a reason, and what should I do?
My shallow knowledge about bitcoin tx script lets me interpret Script failed an OP_EQUALVERIFY operation as a pubkey hash mismatch in a lightning-constructed output script — right?
Your assessment here is correct. Two of the three inputs to the funding transaction (the one you're failing to broadcast) have different pubkeys associated with them than the ones your node is providing as part of the signature.
They're failing the pubkey hash check.
First input pubkey: 025fa4d7187714ca781e69c556f7b2811a54c1ea81a82679680e796ed0134b22d8
ripemd160(sha256(pubkey)): 9a9fdeee97b2d292d4de32a4664638f261f54788
Transaction output it's spending: OP_0 OP_PUSHBYTES_20 1547ebd369d628ef9cf7ebeb5b716f5ca3cdf42f
(Original tx found here)
Third input pubkey: 0399594eebce15409f86224dc4f37607adb42436db68503cb3b0fc868f743b4d9e
ripemd160(sha256(pubkey)): 3118d32d47568227c08b52dfc39be2614d54684e
Tx output it's spending: OP_0 OP_PUSHBYTES_20 8e62f481182d5ed5c4c3b51e08724fa5d7b5963a
(Original tx found here)
The one in the middle looks fine.
If your hsm_secret
got corrupted, that'd explain this issue, as the pubkeys are typically found by an index off the hsm_secret
.
What does your lightning-cli listfunds
show?
Hi LN Devs!
I'm running a
v0.10.0
instance on testnet.The central issue right now is that it doesn't open channels anymore:
The only hit I got searching for
non-mandatory-script-verify-flag
is #1680 — which I don't think is related.What could be a reason, and what should I do?
A secondary issue is that this node seems unable to close one of its channels — I've no idea at all if this is related to the above.
The problematic channel should've been to the LDK-1 node.
Here's how c-lightning sees the channel:
Somehow it's both
AWAITING_UNILATERAL
and alsoCHANNELD_AWAITING_LOCKIN
, huh?..The funding TX is not on-chain — absent from mempool as well.
I did manually
close
it (since it wasn't functioning anyway), however the 144 blocksour_to_self_delay
has passed, like, days ago if I'm not mistaken.Same question, what to make of it? Besides blaming LDK, of course :smiley:
Basically, what the user is supposed to do in such a scenario? I guess it's not hard at all to replicate whatever mistakes I did — and end up with similar result. Locked-in liquidity. Any "escape hatches" to accomodate bugs like this,
dev-force-forget-channel-unsafe
maybe?Steps to Reproduce
Unknown yet.
I don't know what to look for when minimizing. Somehow posting the complete history of the node feels both inappropriate and involving tedium.
Inquiries for more information welcome, if any.
getinfo