Author: Jorge Timón 2015-08-10 18:04:27
Published on: 2015-08-10T18:04:27+00:00
In a discussion about Lightning Network, a proposed payment channel protocol, a user expresses concern over the "number inversion" in preserving old nSequence semantics. Mark Friedenbach responds by explaining how Lightning uses the sequence number field of the transaction format. He clarifies that BIP 68 specifies a new consensus rule that mandates a required minimum age for each input, achieving a relative lock-time. Lightning uses these relative lock-times with sequence numbers to achieve confirmation delays. For instance, if a script pathway needs to take effect 30 days after confirmation of the parent, the sequence number of the spending transaction (the child) must be equal to MAX_INT - 4320 (= 144 * 30). Later in the thread, Jeremy Rubin asks two questions about the use of sequence numbers in lightning. Firstly, he asks about race conditions and how they are addressed. Secondly, he raises concerns about using sequence numbers to select the right transaction to include, as it could leak information about how many LN transactions took place. He suggests incrementing by a random amount to alleviate reliable metering by external parties.
Updated on: 2023-05-23T19:06:48.586554+00:00