rust-lightning-bitcoinrpc
rust-lightning-bitcoinrpc copied to clipboard
Can't open channel between 2 rust-lightning-bitcoinrpc instances
I have 2 instances running on different ports. I try to open a channel between them:
> n 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa 10000 5000
Channel created, sending open_channel!
> TRACE [lightning::ln::peer_handler : /home/justin/.cargo/registry/src/github.com-1ecc6299db9ec823/lightning-0.0.9/src/ln/peer_handler.rs, 826] Handling SendOpenChannel event in peer_handler for node 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa for channel fcf810a23f955f9190843aba2d99528c3eb263550f22b9a9d391b97b09b5c360
TRACE [lightning::ln::peer_handler : /home/justin/.cargo/registry/src/github.com-1ecc6299db9ec823/lightning-0.0.9/src/ln/peer_handler.rs, 567] Received message of type 33 from 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa
thread 'tokio-runtime-worker-2' panicked at 'assertion failed: changepos == 0 || changepos == 1', src/main.rs:118:9
Seems this failed, yet a pending channel shows (but never confirms):
> l c
All channels:
id: fcf810a23f955f9190843aba2d99528c3eb263550f22b9a9d391b97b09b5c360, not yet confirmed, peer: 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa, value: 10000 sat
No corresponding transaction shows up in bitcoin-cli -testnet listtransactions
on the node being used as RPC backend (I'm assuming it should).
The logs of the other node I was opening the channel with contain the following:
> TRACE [lightning::ln::peer_handler : /home/justin/.cargo/registry/src/github.com-1ecc6299db9ec823/lightning-0.0.9/src/ln/peer_handler.rs, 567] Received message of type 32 from 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa
TRACE [lightning::ln::peer_handler : /home/justin/.cargo/registry/src/github.com-1ecc6299db9ec823/lightning-0.0.9/src/ln/peer_handler.rs, 816] Handling SendAcceptChannel event in peer_handler for node 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa for channel fcf810a23f955f9190843aba2d99528c3eb263550f22b9a9d391b97b09b5c360
Here's what the transaction looks like when the assertion fails:
{
"txid": "7b1f830d3dbca79da56691a85009914ae658496fbb3432bd84bae159dd90820a",
"hash": "7b1f830d3dbca79da56691a85009914ae658496fbb3432bd84bae159dd90820a",
"version": 2,
"size": 135,
"vsize": 135,
"weight": 540,
"locktime": 0,
"vin": [
{
"txid": "cc09b90bf08d2e26959f4f35a82d7ae1da78d830848ca6db3e55d59e43635818",
"vout": 1,
"scriptSig": {
"asm": "",
"hex": ""
},
"sequence": 4294967294
},
{
"txid": "7f37ab32901ee477039d2b23f4469eb2b8284b87901062ea4d8b2f2dc32ae9e3",
"vout": 1,
"scriptSig": {
"asm": "",
"hex": ""
},
"sequence": 4294967294
}
],
"vout": [
{
"value": 0.00010000,
"n": 0,
"scriptPubKey": {
"asm": "0 0ad91aadda1d20a489f25e79afc7977bafd91476c0ebc40427b6b2a8cdaf65a1",
"hex": "00200ad91aadda1d20a489f25e79afc7977bafd91476c0ebc40427b6b2a8cdaf65a1",
"reqSigs": 1,
"type": "witness_v0_scripthash",
"addresses": [
"tb1qptv34tw6r5s2fz0jteu6l3uh0whaj9rkcr4ugpp8k6e23nd0vkssasc3hv"
]
}
}
]
}
I think it’s likely because Bitcoin Core RPC decided it didn’t need change (though we should obviously handle that, but luckily it’s a bug in this demo wrapper, not rust-lightning itself). Maybe try with a different value, otherwise may fix it eventually.
On Oct 4, 2019, at 20:31, Justin Moon [email protected] wrote:
I have 2 instances running on different ports. I try to open a channel between them:
n 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa 10000 5000 Channel created, sending open_channel! TRACE [lightning::ln::peer_handler : /home/justin/.cargo/registry/src/github.com-1ecc6299db9ec823/lightning-0.0.9/src/ln/peer_handler.rs, 826] Handling SendOpenChannel event in peer_handler for node 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa for channel fcf810a23f955f9190843aba2d99528c3eb263550f22b9a9d391b97b09b5c360 TRACE [lightning::ln::peer_handler : /home/justin/.cargo/registry/src/github.com-1ecc6299db9ec823/lightning-0.0.9/src/ln/peer_handler.rs, 567] Received message of type 33 from 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa thread 'tokio-runtime-worker-2' panicked at 'assertion failed: changepos == 0 || changepos == 1', src/main.rs:118:9 Seems this failed, yet a pending channel shows (but never confirms):
l c All channels: id: fcf810a23f955f9190843aba2d99528c3eb263550f22b9a9d391b97b09b5c360, not yet confirmed, peer: 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa, value: 10000 sat No corresponding transaction shows up in bitcoin-cli -testnet listtransactions on the node being used as RPC backend (I'm assuming it should).
The logs of the other node I was opening the channel with contain the following:
TRACE [lightning::ln::peer_handler : /home/justin/.cargo/registry/src/github.com-1ecc6299db9ec823/lightning-0.0.9/src/ln/peer_handler.rs, 567] Received message of type 32 from 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa TRACE [lightning::ln::peer_handler : /home/justin/.cargo/registry/src/github.com-1ecc6299db9ec823/lightning-0.0.9/src/ln/peer_handler.rs, 816] Handling SendAcceptChannel event in peer_handler for node 0264868880feff31f445c1118928974b29d61257c936183e2ede395f254d0eaaaa for channel fcf810a23f955f9190843aba2d99528c3eb263550f22b9a9d391b97b09b5c360 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Oops!
That was the problem.
Still an issue, even if there is a workaround :).