locktime – What are the correct “threshold” values of the nSequence in order to activate relative time lock and only absolute time lock?

[ad_1]

Based on BIP68, relative lock time is activated if the most significant bit in nSequence value is not set. In other words, if the 32th (1<<31) bit is not set. So for the nSequence values less-equal than:

  1. 01111111111111111111111111111111 in binary
  2. 0x7FFFFFFF in hexadecimal

… relative lock time is activated.

However, in the Ugam Kamat's answer, he said that the relative lock time is activated for a nSequence values less than 0xEFFFFFFF.

If nSequence <= 0xEFFFFFFF, it implies relative locktime.

1. How is it possible? What is correct upper value to activate relative time lock?

Also, for activating just an absolute lock time without relative lock time, he said in his answer that the nSequence must be between 0xF0000000 and 0xFFFFFFFD (to also activate RBF).

So for using nLocktime along with Opt-in RBF, your nSequence value has to be between 0xF0000000 to 0xFFFFFFFD.

However, based on BIP68, to deactivate relative lock time it is only necessary to set most significant bit (32th bit) in the nSequence. So for the nSequence values greater-equal than:

  1. 10000000000000000000000000000000 in binary
  2. 0x80000000 in hexadecimal

… relative lock time is not activated.

2. What is the smallest value we can set for nSequences so that only the absolute lock time is activated without the relative one?

[ad_2]

Source link


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *