<p>Christian Decker answered this on <a href="https://twitter.com/Snyke/status/1500518509125808132?s=20&amp;t=GAC1oFVM1BSXXwnv0Me_FQ" rel="nofollow noreferrer">Twitter</a>.</p>
<p><a href="https://github.com/ElementsProject/lightning/tree/master/contrib/pyln-testing" rel="nofollow noreferrer">pyln-testing</a> which is used for testing in c-lightning uses a proxy in front of bitcoind allowing you to mock responses. This allows you to get any node stuck at a height while the others get new blocks. A cooperative close on a smaller base layer subnetwork followed by network unification and chain tip rollback can also be tested on c-lightning but without long chain splits given how unlikely they are to happen (in normal times).</p>
<p>Jamal James <a href="https://twitter.com/jamaljsr/status/1500506818837364737?s=20&amp;t=GAC1oFVM1BSXXwnv0Me_FQ" rel="nofollow noreferrer">added</a> that <a href="https://lightningpolar.com/" rel="nofollow noreferrer">Polar</a> can simulate this scenario (use 3 bitcoind nodes then take the middle one offline, mine blocks on the other two, this results in a chain split).</p>

CC BY-SA 4.0
2022-03-07T11:13:29.817Z
2022-03-07T11:33:20.763Z
2022-03-07T11:33:20.763Z
Michael Folkson
<p>How would one test the impact on the Lightning Network of a network split on the base layer (the blockchain progressing on two separate branches with each branch unaware of the other competing branch)?</p>
<p>Do any Lightning Network spec or implementation test frameworks currently allow you to simulate a network split on the base layer for testing?</p>
<p>This was asked by DrNo_21M on <a href="https://twitter.com/DrNo_21M/status/1500495235272654850" rel="nofollow noreferrer">Twitter</a> and has been paraphrased.</p>

<lightning-network><network><weaknesses>
How would one test the impact on the Lightning Network of a network split on the base layer?
Michael Folkson
# How would one test the impact on the Lightning Network of a network split on the base layer?

(Asked by: username_0 on 2022-03-07)

How would one test the impact on the Lightning Network of a network split on the base layer (the blockchain progressing on two separate branches with each branch unaware of the other competing branch)?

Do any Lightning Network spec or implementation test frameworks currently allow you to simulate a network split on the base layer for testing?

This was asked by DrNo\_21M on [Twitter](https://twitter.com/DrNo_21M/status/1500495235272654850) and has been paraphrased.

**Tags:** lightning-network, network, weaknesses


---

## 1 answers

### Answer by username_0 on 2022-03-07. Score: 2

Christian Decker answered this on [Twitter](https://twitter.com/Snyke/status/1500518509125808132?s=20&t=GAC1oFVM1BSXXwnv0Me_FQ).

[pyln-testing](https://github.com/ElementsProject/lightning/tree/master/contrib/pyln-testing) which is used for testing in c-lightning uses a proxy in front of bitcoind allowing you to mock responses. This allows you to get any node stuck at a height while the others get new blocks. A cooperative close on a smaller base layer subnetwork followed by network unification and chain tip rollback can also be tested on c-lightning but without long chain splits given how unlikely they are to happen (in normal times).

Jamal James [added](https://twitter.com/jamaljsr/status/1500506818837364737?s=20&t=GAC1oFVM1BSXXwnv0Me_FQ) that [Polar](https://lightningpolar.com/) can simulate this scenario (use 3 bitcoind nodes then take the middle one offline, mine blocks on the other two, this results in a chain split).


---

