BIP68 doesn’t apply on regtest

on

|

views

and

comments


On regtest, I can use generateblock to efficiently a mine transaction i.e containing an enter with nSequence (0x05000000), though the enter has not reached the desired age (5 confirmations). Although I get non-BIP68-final (code -26) error once I use sendrawtransaction. Questioning why that is the case.

This is how I do it:

For simple demonstration I fund OP_TRUE (decodescript 51). It offers me p2wsh deal with: bcrt1qft5p2uhsdcdc3l2ua4ap5qqfg4pjaqlp250x7us7a8qqhrxrxfsqseac85.

Then I fund this deal with 1000 sats: TXID: a21c3ccc203f0c30c613e4409b011e5753ca10bb93fe5036849ab87e14e4cb6c, VOUT: 1.

Then I mine this funding transaction:

generateblock 2N1AwW2Jv4NcsgBWwggDPN7PLx4MpgRNjhs '["a21c3ccc203f0c30c613e4409b011e5753ca10bb93fe5036849ab87e14e4cb6c"]'

Then I manually assemble a uncooked tx spending this enter with witness 0x51, with nSequence 0x02000000:

020000000001016ccbe4147eb89a843650fe93bb10ca53571e019b40e413c6300c3f20cc3c1ca201000000000200000001f4010000000000002251209bb9efbddf9d70afd3ac2cef011747236bdf90832a78b08f57d1139f07aa918501015100000000

sendrawtransaction 020000000001016ccbe4147eb89a843650fe93bb10ca53571e019b40e413c6300c3f20cc3c1ca201000000000200000001f4010000000000002251209bb9efbddf9d70afd3ac2cef011747236bdf90832a78b08f57d1139f07aa918501015100000000 offers me the error: “non-BIP68-final (code -26)”

Nevertheless,

generateblock 2N1AwW2Jv4NcsgBWwggDPN7PLx4MpgRNjhs '["020000000001016ccbe4147eb89a843650fe93bb10ca53571e019b40e413c6300c3f20cc3c1ca201000000000200000001f4010000000000002251209bb9efbddf9d70afd3ac2cef011747236bdf90832a78b08f57d1139f07aa918501015100000000"]'
efficiently mines the block:

{
  "hash": "0f63ae01726730e186a5a8e16c2b4f9673ce135c46d033f8c60ee636319ffa6a"
}

Share this
Tags

Must-read

Self-driving taxis are coming to London – ought to we be anxious? | Jack Stilgoe

At the top of the nineteenth century, the world’s main cities had an issue. The streets had been flooded with manure, the unintended...

US regulators open inquiry into Waymo self-driving automobile that struck youngster in California | Expertise

The US’s federal transportation regulator stated Thursday it had opened an investigation after a Waymo self-driving car struck a toddler close to an...

US robotaxis bear coaching for London’s quirks earlier than deliberate rollout this yr | London

American robotaxis as a consequence of be unleashed on London’s streets earlier than the tip of the yr have been quietly present process...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here