Previously the peg-in validation logic was done in script
which means it was handled correctly by mempool/block logic.
We then moved these checks outside of script, which means
that these checks aren't multithreaded/batched, and return
the specific error states, including CorruptionPossible.
This means that blocks are never considered permanently invalid and
in certain circumstances tried in an infinite loop.
Instead we mark it as a normal failure, and allow the peg-in invalid
block queue to take care of it instead.
0184575 re-enable failing travis build (Gregory Sanders)
f6875bd fix use after free in peg-in mempool logic (Gregory Sanders)
ea9d92d only try to set best chain if signal is registered (Gregory Sanders)
61c5491 fix undefined behavior in confidential commitment serialization (Gregory Sanders)
85eb502 2WP: Verify number of transactions in SPV proof (Steven Roose)
621b52f Check parent RPC version on startup (Steven Roose)
7bfb100 expose CBlockIndex::nTx in getblock(header) (Gregory Sanders)
Use the getblockheader RPC from Bitcoin Core to verify if the number of
transactions mentioned in the SPV proof matches the number for the
block known by the Core daemon.
Inspired by 6b9dc8ceae
Removes medianfeerate result from getblockstats.
Adds feerate_percentiles which give the feerate of the 10th, 25th, 50th,
75th, and 90th percentile weight unit in the block.
3f62b32 QA: Test 2wp using the test framework (Jorge Timón)
2de5765 2WP: QA: Introduce -con_parent_chain_signblockscript (Jorge Timón)
781953b QA: Optionally allow other chains (Jorge Timón)
This allows other elements chains as parent chains for pegs, for testing purposes
for now it also assumes that the parent chain has CT/CA tx format,
which is orthogonal to the parent chain having pow or signed blocks
It would be nice to also test bitcoin-like chains with signed blocks
instead of pow by adding another parameter -con_parent_chain_has_CT or
similar and decouple the logic
Introduce -con_parent_pegged_asset option to check the asset in the
peg-in txs from the parent chains.
CT: Introduce GetAmountFromParentChainPegin for CT txs
RPC: Adapt rpcwallet to initial -con_parent_chain_has_pow
Introduce CheckProofGeneric
Introduce pow::CheckProofParent
a20986b 2WP: Refactor out GetAmountFromParentChainPegin (Jorge Timón)
2be9cae Refactor: Validation: Make parts of IsValidPeginWitness templated (Jorge Timón)