6

It was definitely on August 24th 2017, but not sure about the block number. Many sources reference block 481,822; but others state 481,824.

Also, even if this was the first block to allow segwit transactions, what was the first very block that contained one of them?

knocte
  • 1,764
  • 1
  • 17
  • 32
  • I believe the first transaction is in block 481825, because this is the block where my parser fails. – Jus12 Dec 15 '17 at 11:30

1 Answers1

5

This is a very old question but probably someone else needs to know the same:

SegWit was activated in block 481824 and that block has two p2wpkh txs:

dfcec48bb8491856c353306ab5febeb7e99e4d783eedf3de98f3ee0812b92bad in block 0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893
f91d0a8a78462bc59398f2c5d7a84fcff491c26ba54c4833478b202796c8aafd in block 0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893

I have to run my script against testnet in order to find the best p2wpk tx.

lontivero
  • 191
  • 1
  • 5
  • 1
    So, block 481824 is the first block that *could* contain a SwgWit transaction according to consensus or is it just the first block that actually does? – Willtech Feb 24 '18 at 00:41
  • 1
    it is the first block that actually does. There is no mention of any specify block height in the segwit activation mechanism, there is a start time and a timeout time (a time frame) when it was possible to activate it. Take a look at the code https://github.com/bitcoin/bitcoin/blob/master/src/chainparams.cpp#L101 – lontivero Feb 24 '18 at 04:56
  • I will try and find out exactly. – Willtech Feb 24 '18 at 06:49
  • According to [this Question](https://bitcoin.stackexchange.com/questions/60095/segwit-is-activated-due-to-bip91) it was indeed block 481824. – Willtech Feb 24 '18 at 06:54
  • 1
    @lontivero just for others "now" is line https://github.com/bitcoin/bitcoin/blob/306ccd4927a2efe325c8d84be1bdb79edeb29b04/src/chainparams.cpp#L76 – WebOrCode Feb 26 '23 at 10:33
  • thanks for that link! – knocte Feb 27 '23 at 01:29