Open antonilol opened 2 years ago
Yes, lightning implementations need to specifically check if the funding transaction is a coinbase, and in that case need to delay channel_ready until 100 blocks have passed.
When (coop or force) closing the channel before the 100 blocks the lightning implementation needs to wait until the close tx is valid an then broadcast it instead of giving the user bitcoind's error and giving up (or if the transaction is rebroadcast every block (and ignores errors) or so that should be fine too)
Adding a recommendation to the BOLTs would make sense for this: I don't think all implementations do this now!
Miners can open a lightning channel directly from the coinbase transaction to spend funds locked in there for 100 blocks by bitcoin's consensus rules earlier. Channels created from coinbase transactions also can't be closed in the 100 blocks after the block has been mined. This can be fixed by either
I believe this an issue of the lightning network (not a specific implementation) an that it should be addressed in the spec
Questions/feedback welcome!