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

<p>SegWit was activated in block 481824 and that block has two p2wpkh txs:</p>

<pre><code>dfcec48bb8491856c353306ab5febeb7e99e4d783eedf3de98f3ee0812b92bad in block 0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893
f91d0a8a78462bc59398f2c5d7a84fcff491c26ba54c4833478b202796c8aafd in block 0000000000000000001c8018d9cb3b742ef25114f27563e3fc4a1902167f9893
</code></pre>

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

CC BY-SA 3.0
2018-02-24T00:41:53.483Z
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
CC BY-SA 3.0
2018-02-24T04:56:00.770Z
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
CC BY-SA 3.0
2018-02-24T06:49:24.087Z
I will try and find out exactly.
Willtech
CC BY-SA 3.0
2018-02-24T06:54:27.923Z
According to [this Question](https://bitcoin.stackexchange.com/questions/60095/segwit-is-activated-due-to-bip91) it was indeed block 481824.
Willtech
CC BY-SA 4.0
2023-02-26T10:33:56.450Z
@lontivero just for others "now" is line https://github.com/bitcoin/bitcoin/blob/306ccd4927a2efe325c8d84be1bdb79edeb29b04/src/chainparams.cpp#L76
WebOrCode
CC BY-SA 4.0
2023-02-27T01:29:08.537Z
thanks for that link!
knocte
CC BY-SA 3.0
2018-02-24T00:13:18.657Z
2018-02-24T00:13:18.657Z
lontivero
<p>Blockchair indexes this BTW: <a href="https://blockchair.com/bitcoin/transactions?s=block_id(asc)&amp;q=has_witness(true)#f=hash,block_id,input_count,output_count,time,output_total,output_total_usd,fee_usd,has_witness" rel="nofollow noreferrer">https://blockchair.com/bitcoin/transactions?s=block_id(asc)&amp;q=has_witness(true)#f=hash,block_id,input_count,output_count,time,output_total,output_total_usd,fee_usd,has_witness</a> which confirms the 481,824. I filtered by &quot;has witness&quot; and sorted by block.</p>

CC BY-SA 4.0
2024-03-18T21:56:44.693Z
2024-03-18T21:56:44.693Z
Ciro Santilli OurBigBook.com
<p>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.</p>

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

CC BY-SA 3.0
2017-12-15T11:30:19.167Z
I believe the first transaction is in block 481825, because this is the block where my parser fails.
Jus12
<segregated-witness><segwit2x>
What was the number of the block in which SegWit got activated? And first transaction?
knocte
# What was the number of the block in which SegWit got activated? And first transaction?

(Asked by: username_0 on 2017-10-28)

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?

**Tags:** segregated-witness, segwit2x

> **Comments:**
> **username_1**: I believe the first transaction is in block 481825, because this is the block where my parser fails.  

---

## 2 answers

### Answer by username_2 on 2018-02-24. Score: 6

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.

> **Comments:**
> **username_3**: 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?  
> **username_2**: 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  
> **username_3**: I will try and find out exactly.  
> **username_3**: According to [this Question](https://bitcoin.stackexchange.com/questions/60095/segwit-is-activated-due-to-bip91) it was indeed block 481824.  
> **username_4**: @username_2 just for others "now" is line https://github.com/bitcoin/bitcoin/blob/306ccd4927a2efe325c8d84be1bdb79edeb29b04/src/chainparams.cpp#L76  
> **username_0**: thanks for that link!  

---

### Answer by username_5 on 2024-03-18. Score: 0

Blockchair indexes this BTW: <https://blockchair.com/bitcoin/transactions?s=block_id(asc)&q=has_witness(true)#f=hash,block_id,input_count,output_count,time,output_total,output_total_usd,fee_usd,has_witness> which confirms the 481,824. I filtered by "has witness" and sorted by block.


---

