<p>Note that since 0.16, Segwit is always active on regtest from the genesis block.</p>
<p>Prior to 0.16, Segwit on regtest is defined to have a start time of 0 and can be activated through the BIP 9 versionbits mechanism. In BIP 9, the genesis block always has the state of <code>DEFINED</code>, which means that the signaling period beginning with the genesis block is <code>DEFINED</code> and any signaling in that period does not count for segwit.</p>
<p>Segwit would become <code>STARTED</code> in the second signaling period and only then would signaling blocks be counted. If the threshold is reached, then it will become <code>LOCKED_IN</code> during the third signaling period. Once the third signaling period concludes, Segwit will be active. So under ideal circumstances where all blocks signal for Segwit, 3 signaling periods are needed for Segwit to become active.</p>
<p>In Regtest, each signaling period is 144 blocks. 144 * 3 = 432 blocks need to be mined for Segwit to become active.</p>

CC BY-SA 4.0
2021-10-28T18:08:53.547Z
2021-10-28T18:08:53.547Z
Ava Chow
<p>According to Rusty Russel, you need to mine 432 blocks to activate segwit on regtest. Why this specific blockheight?</p>
<p>Sources:</p>
<ul>
<li><a href="https://rusty-lightning.medium.com/segregated-witness-for-developers-8fa9042f43ed#.6ur6kr5nf" rel="nofollow noreferrer">https://rusty-lightning.medium.com/segregated-witness-for-developers-8fa9042f43ed#.6ur6kr5nf</a></li>
<li><a href="https://github.com/ElementsProject/lightning/blob/f4e94147a7281ec05e078ff9f3e6d65893417bad/test-cli/scripts/generate-block.sh#L11" rel="nofollow noreferrer">https://github.com/ElementsProject/lightning/blob/f4e94147a7281ec05e078ff9f3e6d65893417bad/test-cli/scripts/generate-block.sh#L11</a></li>
</ul>

<segregated-witness><regtest><activation-mechanism>
Why do you have to mine 432 blocks to activate segwit on regtest?
arshbot
# Why do you have to mine 432 blocks to activate segwit on regtest?

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

According to Rusty Russel, you need to mine 432 blocks to activate segwit on regtest. Why this specific blockheight?

Sources:

* <https://rusty-lightning.medium.com/segregated-witness-for-developers-8fa9042f43ed#.6ur6kr5nf>
* <https://github.com/ElementsProject/lightning/blob/f4e94147a7281ec05e078ff9f3e6d65893417bad/test-cli/scripts/generate-block.sh#L11>

**Tags:** segregated-witness, regtest, activation-mechanism


---

## 1 answers

### Answer by username_1 on 2021-10-28. Score: 5

Note that since 0.16, Segwit is always active on regtest from the genesis block.

Prior to 0.16, Segwit on regtest is defined to have a start time of 0 and can be activated through the BIP 9 versionbits mechanism. In BIP 9, the genesis block always has the state of `DEFINED`, which means that the signaling period beginning with the genesis block is `DEFINED` and any signaling in that period does not count for segwit.

Segwit would become `STARTED` in the second signaling period and only then would signaling blocks be counted. If the threshold is reached, then it will become `LOCKED_IN` during the third signaling period. Once the third signaling period concludes, Segwit will be active. So under ideal circumstances where all blocks signal for Segwit, 3 signaling periods are needed for Segwit to become active.

In Regtest, each signaling period is 144 blocks. 144 \* 3 = 432 blocks need to be mined for Segwit to become active.


---

