Written by: Antony Zegers
Bitcoin ABC has a policy to “deploy network consensus changes in a careful manner, well ahead of time”, as stated in a recent article. The primary reason this is done is so that businesses and other BCH ecosystem participants have plenty of time to prepare for the upgrade. It allows them to roll out and deploy the update node software in an organized and deliberate manner.
Helping Businesses Prepare
One of the ways that Bitcoin Cash businesses and users may wish to prepare for network upgrades, is to test out upcoming features. To facilitate this, the Bitcoin ABC team has a practice of organizing an “upgrade testnet” prior to each scheduled network upgrade. These testnets have also been by volunteer contributors, such as Imaginary Username who ran the primary infrastructure for these testnets for the May and November 2019 upgrades. And there has also been corporate support, such as prior to those upgrades, early in the history of BCH, when Bitprim helped with testnet infrastructure.
Running a testnet with the upgrade activated early allows businesses to use it as an early testbed for the upcoming features. For example, Tobias Ruck of be.cash has been using the upgrade testnet to run new versions of his smart contract script using the upcoming OP_REVERSEBYTES opcode. Using the upgrade testnet in this manner allows development using new features to proceed more rapidly than it would if it were necessary to wait until the actual upgrade.
Projects have also used the past upgrade testnets simply to test that they could continue functioning unchanged. For instance, wallets could test that changes to consensus rules do not affect their ability to function normally.
Testing the Node
A second goal of the upgrade testnet is to test the node software itself. For this purpose, we run activation tests, where various tests are performed, such as testing the validity of transactions before and after activation. We also conduct various other tests, such as doing blockchain reorganizations through the activation point.
For example, for the current upgrade test, we broadcast transactions containing the OP_REVERSEBYTES opcode before and after the activation. The tests confirmed that prior to upgrade activation, the transactions are rejected with the correct error code (upgrade-conditional-script-failure (Opcode missing or not understood) (code 16) (code -26)), and after activation they are accepted.
Bitcoin ABC typically does activation tests around the time the upgrade release is made, which was around Feb 15th this time around. We also conducted an activation test on April 15th to test Bitcoin Unlimited’s release, and we did a pre-release test today (April 28th, 2020) for BCHD. This OP_REVERSE containing transaction was broadcast by a BCHD node during today’s test.
Testing out the node behavior during activation tests is an area where people can get involved and help out. We have set up the infrastructure to mine upgraded blocks, so it’s a good opportunity for people to connect to that network and test things out. For instance, Tobias Ruck stepped up to create the transactions needed to test OP_REVERSEBYTES.
Another change in the coming upgrade is a change to the way signature operations are accounted for, called SigChecks. This will remove the old “sigops” rules, and replace them with new limits on the actual number of sigops executed in scripts. There are per-block and per-transaction limits, as well as an input density limit. For someone who is interested, it would be a good project to construct transactions, and even blocks that violate the old sigops rules, but fit within the new rules, and vice versa. There are many cases to be tested, and this is something we have not had the time or resources to do yet. So if anyone is interested, feel free to reach out! The testing workgroup would be a good place to start.
We are busy building, working towards improving Bitcoin Cash and helping ensure smooth upgrades. Participation in the Upgrade Testnet from other node projects and builders in the BCH ecosystem is a great way to help ensure that upgrades are safe and uneventful.
So please join us in testing out the network upgrades, and building to grow Bitcoin Cash into the best money the world has ever seen.
Join the Bitcoin ABC team in building censorship-resistant P2P electronic cash for billions of daily users and realizing the vision that is Bitcoin Cash!
Visit fund.bitcoinabc.org to find our business plan, budget, delivery timeline, funding options and feedback mechanisms.
We can only do this together.
Got questions? Ask us below.