Only allow test accepts for now. Use the CoinsViewTemporary to keep
track of coins created by each transaction so that subsequent
transactions can spend them. Uncache all coins since we only
ever do test accepts (Note this is different from ATMP which doesn't
uncache for valid test_accepts) to minimize impact on the coins cache.
Require that the input txns have no conflicts and be ordered
topologically. This commit isn't able to detect unsorted packages.
Introduce a unit test helper to create a valid mempool transaction.
This allows us to easily create transaction chains for package validation.
We don't test_accept if submit=false because we want to be able to make transactions that wouldn't pass ATMP (i.e. a child transaction in a package would fail due to missing inputs).
Add unit tests for ProcessNewPackage.
Key functionality = a transaction with UTXOs not present in UTXO set or mempool can be fully validated instead of being considered an orphan.
Note:
- PolicyScriptChecks does not exist and is part of PreChecks in ABC (see D8203). Thus we cannot use the two separate loops over workspaces. We do all pre-checks on the transaction and add the good transactions to the results immediately.
- Workspace takes a second argument in ABC (D8203)
This is a backport of core#21121 [1/4] and core#20833 [2, 5, 6 & 7 / 13]
https://github.com/bitcoin/bitcoin/pull/21121/commits/9a3bbe8fc57d88919acd4eadbc96124711f17ec2
https://github.com/bitcoin/bitcoin/pull/20833/commits/897e348f5987eadd8559981a973c045c471b3ad8
https://github.com/bitcoin/bitcoin/pull/20833/commits/2ef187941db439c5b3e529f08b6ab153ff061fc5
https://github.com/bitcoin/bitcoin/pull/20833/commits/cd9a11ac96c01e200d0086b2f011f4a614f5a705
https://github.com/bitcoin/bitcoin/pull/20833/commits/363e3d916cc036488783bb4bdcfdd3665aecf711
https://github.com/bitcoin/bitcoin/pull/22084/commits/e8ecc621be6afd3252c0f8147e42c3b4918f7f46 (partial, minor documentation changes to validation.[h|cpp])
Depends on D12122