Week 5 and 6
During these weeks, I started working on the remaining BOLT2. These included:
- test_bolt2-02-reestablish.py
- test_bolt2-10-add-htlc.py
- test_bolt2-20-open_channel_accepter.py
- test_bolt2-30-channel_type-open-accept-tlvs.py
Out of these tests, the test_bolt2-20-open_channel_accepter.py
is a bit flaky in CI and is marked to be skipped in pytest. The test_bolt2-30-channel_type-open-accept-tlvs.py
is working with C-Lightning but needs to be updated to specify tlvs.
The reestablish
and add-htlc
tests were failing simply because many fields were set to hard coded values. I made another pull request which uses new code in these tests and uses the stash
to set the fields to the values required by an implementation. This made the tests pass.
While working with these tests, I also found out that Lnprototest sends no features from their side. This worked with C-Lightning but gave errors with LDK as LDK requires some specific features in peer nodes.
When Vincenzo introduced the stash
, Lnprototest was updated to send the same features that the implementation sends. This also caused errors as there are some features( like upfront_shutdown_script) which require a script when you advertise them.
I came up with a solution and made a method called runner_features
in the runner class which sends the features required by an implementation and this method can be modified in the runner script of the implementation, hence it can be different for different implementations. This allowed me to send the features required by LDK(Features 8, 12, 14) and made Lnprototest more compatible with other implementations.
Here is the pull request.
Now I will start working on the BOLT#7 tests.