• Welcome to forex.pm forex forum binary options trade. Please login or sign up.
 

Are attempts to spend from a timelocked UTXO rejected?

Started by Bitcoin, Mar 25, 2022, 06:27 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bitcoin

Are attempts to spend from a timelocked UTXO rejected?

Background


I was reading a bit about Bitcoin time locked transactions within the context of the Lightning Network. One thing that was never explained is what happens when one tries to prematurely spend the output of a timelocked UTXO.


Example


Alice sends 1 BTC to Bob at address B via transaction T, Output 0. But the transaction is timelocked until the blockheight, currently at H, reaches H+100. So to spend T:0, Bob needs two things:



  1. The private key corresponding to address B

  2. Sufficient time such that the blockheight reaches H+100.


Bob is impatient and tries to spend T:0 when the blockheight H+30. He broadcasts the transaction.


Question


What happens to Bob's transaction? Do the miners ignore it and validators reject it since H+100 hasn't occurred yet? I had always assumed that's what happens; The transaction is simply discarded.


But in researching the Lightning Network, in which timelocked transactions play a key role, it's not unheard of for a channel peer to try and cheat his partner by broadcasting a timelocked TX from a prior state. It's actually up to the innocent party to see this transaction on the blockchain, and somehow use some of the data that's revealed in that transaction as an input their own penalty transaction. And furthermore, that penalty transaction must execute prior to the timelocked cheat transaction going through. And that's what I don't get. How does the innocent party even see this rogue transaction attempt if it's already been rejected by the miners and validators?


Or is my assumption that the miners reject transactions that are dependent upon a not-yet-hit timelocked input incorrect?


Source: Are attempts to spend from a timelocked UTXO rejected?