1

The unit and functional tests of the latest release of Bitcoin Core obviously test the codebase of that release.

What backward compatibility testing is done to ensure the latest release passes previous releases' versions of the unit and functional tests?

And conversely what backward compatibility testing is done to ensure previous releases pass the current unit and functional tests?

3
  • 2
    There's no need for a new release to pass functional tests of the old release. However nodes should be compatible when they connect to older versions via the peer to peer network. Currently this testing is pretty limited, see your own answer. In addition, it should be possible to upgrade a node on your own computer, so it should be able to read old (block, mempool, etc) files. Ideally a downgrade should also work. Commented Dec 30, 2020 at 14:20
  • Thanks for this Sjors. In an imaginary world of unlimited resources and testers it is possible (if unlikely) that bug(s) could be caught by running a new release against functional tests of old release? I get it is pretty low on the list of priorities. Commented Dec 30, 2020 at 14:37
  • The problem is that each release has changes and the tests are updated to reflect those changes. Commented Dec 31, 2020 at 15:34

1 Answer 1

1

What backward compatibility testing is done to ensure the latest release passes previous releases' versions of the functional tests?

There is a feature_backwards_compatibility.py functional test which spins up functional test nodes from each of the previous releases to do testing between them at the same time.

Once you have built the latest version of Bitcoin Core you can download the previous release binaries using:

test/get_previous_releases.py -b v0.19.1 v0.18.1 v0.17.2 v0.16.3 v0.15.2

You can then run the feature_backwards_compatibility.py test individually or through the test runner.

e.g. test/functional/test_runner.py feature_backwards_compatibility.py

This test is updated with each new release to add a functional test node from the latest release to functional test nodes from previous releases.

At the time of writing (December 2020) there is an open pull request from Sjors Provoost to add v0.20.1 to the backwards compatibility test.

And conversely what backward compatibility testing is done to ensure previous releases pass the current unit and functional tests?

I don't know at this stage if this in any way a priority (or for that matter whether it should be). It is certainly more resource intensive to build entire previous releases and then test them rather than merely spin up functional test nodes from previous releases. (I will update if I learn more.)

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.