elements/src
W. J. van der Laan 7257e50dba
Merge bitcoin/bitcoin#20833: rpc/validation: enable packages through testmempoolaccept
13650fe2e5 [policy] detect unsorted packages (glozow)
9ef643e21b [doc] add release note for package testmempoolaccept (glozow)
c4259f4b7e [test] functional test for packages in RPCs (glozow)
9ede34a6f2 [rpc] allow multiple txns in testmempoolaccept (glozow)
ae8e6df709 [policy] limit package sizes (glozow)
c9e1a26d1f [fuzz] add ProcessNewPackage call in tx_pool fuzzer (glozow)
363e3d916c [test] unit tests for ProcessNewPackage (glozow)
cd9a11ac96 [test] make submit optional in CreateValidMempoolTransaction (glozow)
2ef187941d [validation] package validation for test accepts (glozow)
578148ded6 [validation] explicit Success/Failure ctors for MempoolAcceptResult (glozow)
b88d77aec5 [policy] Define packages (glozow)
249f43f3cc [refactor] add option to disable RBF (glozow)
897e348f59 [coins/mempool] extend CCoinsViewMemPool to track temporary coins (glozow)
42cf8b25df [validation] make CheckSequenceLocks context-free (glozow)

Pull request description:

  This PR enables validation dry-runs of packages through the `testmempoolaccept` RPC. The expectation is that the results returned from `testmempoolaccept` are what you'd get from test-then-submitting each transaction individually, in that order (this means the package is expected to be sorted in topological order, for now at least). The validation is also atomic: in the case of failure, it immediately halts and may return "unfinished" `MempoolAcceptResult`s for transactions that weren't fully validated. The API for 1 transaction stays the same.

  **Motivation:**
  - This allows you to test validity for transaction chains (e.g. with multiple spending paths and where you don't want to broadcast yet); closes #18480.
  - It's also a first step towards package validation in a minimally invasive way.
  - The RPC commit happens to close #21074 by clarifying the "allowed" key.

  There are a few added restrictions on the packages, mostly to simplify the logic for areas that aren't critical to main package use cases:
  - No package can have conflicts, i.e. none of them can spend the same inputs, even if it would be a valid BIP125 replacement.
  - The package cannot conflict with the mempool, i.e. RBF is disabled.
  - The total count of the package cannot exceed 25 (the default descendant count limit), and total size cannot exceed 101KvB (the default descendant size limit).

  If you're looking for review comments and github isn't loading them, I have a gist compiling some topics of discussion [here](https://gist.github.com/glozow/c3acaf161c95bba491fce31585b2aaf7)

ACKs for top commit:
  laanwj:
    Code review re-ACK 13650fe2e5
  jnewbery:
    Code review ACK 13650fe2e5
  ariard:
    ACK 13650fe

Tree-SHA512: 8c5cbfa91a6c714e1c8710bb281d5ff1c5af36741872a7c5df6b24874d6272b4a09f816cb8a4c7de33ef8e1c2a2c252c0df5105b7802f70bc6ff821ed7cc1a2f
2021-05-27 22:40:24 +02:00
..
bench Merge bitcoin/bitcoin#17331: Use effective values throughout coin selection 2021-05-26 01:35:43 +12:00
compat Remove support for double serialization 2021-05-24 16:15:05 -07:00
config
consensus
crc32c
crypto crypto: Make MuHash Remove method efficient 2021-04-19 20:28:46 +02:00
index scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
init scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
interfaces multiprocess: Add echoipc RPC method and test 2021-04-23 03:02:50 -05:00
ipc multiprocess: Add echoipc RPC method and test 2021-04-23 03:02:50 -05:00
leveldb
logging
node Merge bitcoin/bitcoin#21845: net processing: Don't require locking cs_main before calling RelayTransactions() 2021-05-07 11:11:05 +08:00
policy Merge bitcoin/bitcoin#20833: rpc/validation: enable packages through testmempoolaccept 2021-05-27 22:40:24 +02:00
primitives
qt English translations update 2021-05-27 13:47:26 +03:00
rpc Merge bitcoin/bitcoin#20833: rpc/validation: enable packages through testmempoolaccept 2021-05-27 22:40:24 +02:00
script move-only: Add util/hash_type 2021-05-11 10:38:18 +02:00
secp256k1
support
test Merge bitcoin/bitcoin#20833: rpc/validation: enable packages through testmempoolaccept 2021-05-27 22:40:24 +02:00
univalue
util Remove support for double serialization 2021-05-24 16:15:05 -07:00
wallet scripted-diff: Fix ellipsis after pr20773 2021-05-27 13:46:36 +03:00
zmq refactor: Avoid &foo[0] on C-Style arrays 2021-05-04 06:55:30 +02:00
.clang-format
addrdb.cpp scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
addrdb.h
addrman.cpp p2p: pull time call out of loop in CAddrMan::GetAddr_() 2021-05-19 13:04:09 +02:00
addrman.h move-only: Group and re-order CAddrMan members by access type 2021-05-24 19:26:49 +03:00
amount.h
arith_uint256.cpp
arith_uint256.h
attributes.h
banman.cpp scripted-diff: Replace three dots with ellipsis in the UI strings 2021-05-02 22:17:16 +03:00
banman.h
base58.cpp
base58.h
bech32.cpp
bech32.h
bitcoin-cli-res.rc
bitcoin-cli.cpp cli: use C++17 std::array class template argument deduction (CTAD) 2021-04-20 10:35:53 +02:00
bitcoin-tx-res.rc
bitcoin-tx.cpp
bitcoin-util-res.rc
bitcoin-util.cpp
bitcoin-wallet-res.rc
bitcoin-wallet.cpp
bitcoind-res.rc
bitcoind.cpp multiprocess: Add bitcoin-node process spawning support 2021-04-23 03:02:50 -05:00
blockencodings.cpp
blockencodings.h
blockfilter.cpp
blockfilter.h
bloom.cpp
bloom.h
chain.cpp
chain.h
chainparams.cpp fuzz: Add utxo_snapshot target 2021-05-16 11:34:27 +02:00
chainparams.h refactor: Use type-safe assumeutxo hash 2021-05-11 10:40:40 +02:00
chainparamsbase.cpp
chainparamsbase.h
chainparamsseeds.h contrib: add torv3 seed nodes for testnet, drop v2 ones 2021-05-25 16:07:56 +02:00
checkqueue.h
clientversion.cpp
clientversion.h
coins.cpp
coins.h refactor: Remove unused code 2021-05-11 10:39:44 +02:00
compat.h
compressor.cpp refactor: Use CPubKey vector constructor where possible 2021-05-04 06:53:32 +02:00
compressor.h
core_io.h
core_memusage.h
core_read.cpp
core_write.cpp
cuckoocache.h
dbwrapper.cpp refactor: Use only one temporary buffer in CreateObfuscateKey 2021-05-04 06:53:37 +02:00
dbwrapper.h
dummywallet.cpp
external_signer.cpp external_signer: remove ExternalSignerException 2021-04-13 20:09:34 +08:00
external_signer.h external_signer: remove ExternalSignerException 2021-04-13 20:09:34 +08:00
flatfile.cpp
flatfile.h
fs.cpp
fs.h
hash.cpp
hash.h
httprpc.cpp
httprpc.h
httpserver.cpp refactor: Add TSA annotations to the WorkQueue class members 2021-05-09 13:48:07 +03:00
httpserver.h
i2p.cpp
i2p.h
indirectmap.h
init.cpp Merge bitcoin/bitcoin#21992: p2p: Remove -feefilter option 2021-05-25 08:42:30 +02:00
init.h
key.cpp refactor: Avoid &foo[0] on C-Style arrays 2021-05-04 06:55:30 +02:00
key.h refactor: Avoid &foo[0] on C-Style arrays 2021-05-04 06:55:30 +02:00
key_io.cpp
key_io.h
logging.cpp multiprocess: Add Ipc interface implementation 2021-04-23 03:02:50 -05:00
logging.h multiprocess: Add Ipc interface implementation 2021-04-23 03:02:50 -05:00
Makefile.am Merge bitcoin/bitcoin#20833: rpc/validation: enable packages through testmempoolaccept 2021-05-27 22:40:24 +02:00
Makefile.bench.include
Makefile.crc32c.include
Makefile.leveldb.include
Makefile.qt.include Merge bitcoin/bitcoin#22063: build: Use Qt archive of the same version as the compiled binaries 2021-05-27 13:48:56 +02:00
Makefile.qt_locale.include
Makefile.qttest.include
Makefile.test.include Merge bitcoin/bitcoin#22029: [fuzz] Improve transport deserialization fuzz test coverage 2021-05-27 15:02:57 +02:00
Makefile.test_fuzz.include
Makefile.test_util.include
mapport.cpp refactor: Use appropriate thread constructor 2021-04-29 18:39:01 +03:00
mapport.h
memusage.h
merkleblock.cpp
merkleblock.h
miner.cpp
miner.h
net.cpp Merge bitcoin/bitcoin#22013: net: ignore block-relay-only peers when skipping DNS seed 2021-05-24 20:42:08 +08:00
net.h Merge bitcoin/bitcoin#21186: net/net processing: Move addr data into net_processing 2021-05-24 20:28:31 +08:00
net_permissions.cpp p2p: pass strings to NetPermissions::TryParse functions by const ref 2021-05-19 19:41:05 +02:00
net_permissions.h p2p: pass strings to NetPermissions::TryParse functions by const ref 2021-05-19 19:41:05 +02:00
net_processing.cpp Merge bitcoin/bitcoin#21992: p2p: Remove -feefilter option 2021-05-25 08:42:30 +02:00
net_processing.h [net processing] Add internal _RelayTransactions() 2021-05-04 09:31:03 +01:00
net_types.h
netaddress.cpp net: Return IPv6 scope id in CNetAddr::ToStringIP() 2021-05-18 21:01:32 +02:00
netaddress.h
netbase.cpp
netbase.h
netmessagemaker.h
noui.cpp
noui.h
outputtype.cpp
outputtype.h
pow.cpp
pow.h
prevector.h
protocol.cpp refactor: Replace memset calls with array initialization 2021-05-13 12:42:21 +01:00
protocol.h refactor: Replace memset calls with array initialization 2021-05-13 12:42:21 +01:00
psbt.cpp
psbt.h
pubkey.cpp Merge bitcoin/bitcoin#21745: refactor: Add missing includes in pubkey.cpp/pubkey.h 2021-05-10 14:35:31 +02:00
pubkey.h Merge bitcoin/bitcoin#21745: refactor: Add missing includes in pubkey.cpp/pubkey.h 2021-05-10 14:35:31 +02:00
random.cpp refactor: Replace &foo[0] with foo.data() 2021-05-04 06:55:31 +02:00
random.h
randomenv.cpp
randomenv.h
rest.cpp Merge #21391: [Bundle 5/n] Prune g_chainman usage in RPC modules 2021-04-17 17:37:37 +02:00
reverse_iterator.h
scheduler.cpp test: Fix off-by-one in mockscheduler test RPC 2021-05-14 12:49:16 +02:00
scheduler.h
serialize.h Remove support for double serialization 2021-05-24 16:15:05 -07:00
shutdown.cpp
shutdown.h
signet.cpp Merge #21330: Deal with missing data in signature hashes more consistently 2021-04-13 10:24:31 +08:00
signet.h
span.h
streams.h streams: Accept URef obj for VectorReader unserialize 2021-05-05 20:19:03 +02:00
sync.cpp
sync.h
threadinterrupt.cpp
threadinterrupt.h
threadsafety.h
timedata.cpp
timedata.h
tinyformat.h
torcontrol.cpp scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
torcontrol.h
txdb.cpp scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
txdb.h
txmempool.cpp [coins/mempool] extend CCoinsViewMemPool to track temporary coins 2021-05-20 21:34:31 +01:00
txmempool.h Merge bitcoin/bitcoin#20833: rpc/validation: enable packages through testmempoolaccept 2021-05-27 22:40:24 +02:00
txorphanage.cpp
txorphanage.h
txrequest.cpp
txrequest.h
uint256.cpp
uint256.h
undo.h
validation.cpp Merge bitcoin/bitcoin#20833: rpc/validation: enable packages through testmempoolaccept 2021-05-27 22:40:24 +02:00
validation.h Merge bitcoin/bitcoin#20833: rpc/validation: enable packages through testmempoolaccept 2021-05-27 22:40:24 +02:00
validationinterface.cpp
validationinterface.h
version.h
versionbits.cpp
versionbits.h
versionbitsinfo.cpp
versionbitsinfo.h
walletinitinterface.h
warnings.cpp
warnings.h