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 and has been paraphrased.

1 Answer 1


Christian Decker answered this on Twitter.

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 that Polar 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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.