UAHF Test Plan
Version 1.0, 2017-06-14
Introduction
This document is a rough draft of tests planned for UAHF as described in the UAHF Technical Specification [1].
Test cases listed below are currenty incomplete w.r.t. the revised technical specification - this document is very much under construction.
Functional Tests
TEST-1
If UAHF is disabled a large block is considered to break core rules, as is presently the case.
TEST-2
If UAHF is disabled, a regular block is accepted at or after the activation time (as determined by MTP(block.parent) without being considered invalid.
TEST-3
If enabled, a large block is considered excessive if all blocks have time < activation time.
TEST-4
If enabled, a large block B is not considered excessive if MTP(B.parent) >= activation time
TEST-5
If enabled, a large block B is not considered excessive if MTP(B.parent) < activation time, provided a prior block A has MTP(A.parent) >= activation time.
TEST-6
If enabled, a regular block R that is the first such that MTP(R.parent) >= activation time is considered invalid (satisfy REQ-3).
TEST-7
If enabled, a regular block R that is not the first such that MTP(R.parent) >= activation time is considered valid.
TEST-8
A small block more-work chain does not get re-orged to from a big block chain after activation has kicked in.
TEST-9
Test that enabling after being disabled renders a small chain going past activation invalid that was previously valid owing to it being disabled. And vice versa (enabled -> disabled).
TEST-10
If enabled, if a large but < 8MB block is produced, ensure that the degenerate case of sigops heavy instructions does not unduly affect validation times above and beyond the standard expected if UAHF is not enabled.
TEST-11
Test that linear scaling of 20,000 sigops / MB works for block sizes > 1MB (rounding block size up to nearest MB) (ref. BUIP040).
TEST-12
(similar to (TEST-9), but test interoperability of datadir with other clients.)
Test what happens when the unmodified BU / Core / other clients are used on a datadir where the UAHF client has been run. Should test again data from disabled (Core rules data, should be fine) , and enabled (big block data stored - may need to rebuild DB? or provide tool to truncate the data back to pre-fork block?)
References
License of this document
The MIT License (MIT)
Copyright (c) 2017 bitcoincash.org
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.