Integration testing for BitCoin



Summary:

Adam Ritter, a new Bitcoin buyer, noticed the absence of integration tests for Bitcoin and expressed his belief that they are crucial in making the current code more stable and testing attack scenarios. He proposed tests that simulate multiple Bitcoin users and test the entire network of Bitcoin clients. Although he suggested calling them system tests, he preferred to use the term "tests that simulate multiple Bitcoin users” instead. The Bitcoin community already has a system called blocktester, which works by simulating a peer against a slightly instrumented copy of Bitcoin(d/-qt). The tests simulate many complicated network scenarios and test the boundaries of many blockchain validation protocol rules. These tests are run as part of the automated tests on every proposed patch to the reference software via a robot called pulltester, which comments on GitHub requests and produces logs. Pulltester also performs automatic code coverage measurements. Additionally, the Bitcoin community runs a public secondary test Bitcoin network called "testnet," which operates the same as the production network except it allows mining low difficulty blocks to prevent it from going for long times without blocks and some of the protective relaying rules against "non-standard" transaction types are disabled. Most of the testing work has been centered around validating the blockchain behavior because it has serious systemic risk. Measuring the JSON RPC behavior is less interesting, though still useful.


Updated on: 2023-05-19T16:44:12.438328+00:00