1

I know setting nSequence 0x00000001 means the transaction is not valid until 1 block has elapsed since its's prevout confirms. At most one spend per two blocks.

What happens if it's set to 0x00000000? I think it means that the transaction is valid and can be relayed as soon as it's prevout is confirmed. At most one spend per block.

..Or does it mean prevout can be zero-conf? Unconfirmed transaction chain limit applies.

1 Answer 1

3

From the relevant section in BIP 68:

When the relative lock-time is block-based, it is interpreted as a minimum block-height constraint over the input's age. A relative block-based lock-time of zero indicates an input which can be included in any block. More generally, a relative block lock-time n can be included n blocks after the mining date of the output it is spending, or any block thereafter.

So an nSequence value of 0 means the transaction can be included in the same block as the transaction whose output it is spending.

In the Bitcoin Core software, transactions can be relayed under the condition that they can be included in the next block. For nSequence=0 transactions that implies they can be relayed before their parents are confirmed.

2
  • In the Bitcoin Core software, transactions can be relayed under the condition that they can be included in the next block. Does it mean an input whose nSequence is 0x00000001, but prevout is zero-conf, can be relayed because age will be “1” the moment it's included in the next block?
    – Burak
    Commented Jun 13, 2021 at 17:50
  • 1
    I would think not, because the prevout transactions needs to confirm firm, and then only the block after that its nSequence=1 spend can confirm, but I'd need to go check the code to be sure. Commented Jun 13, 2021 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.