-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 7257e50 into merged_master (Bitcoin PR bitcoin/bitcoin#20833)
- Loading branch information
Showing
16 changed files
with
843 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Updated RPCs | ||
------------ | ||
|
||
- The `testmempoolaccept` RPC now accepts multiple transactions (still experimental at the moment, | ||
API may be unstable). This is intended for testing transaction packages with dependency | ||
relationships; it is not recommended for batch-validating independent transactions. In addition to | ||
mempool policy, package policies apply: the list cannot contain more than 25 transactions or have a | ||
total size exceeding 101K virtual bytes, and cannot conflict with (spend the same inputs as) each other or | ||
the mempool, even if it would be a valid BIP125 replace-by-fee. There are some known limitations to | ||
the accuracy of the test accept: it's possible for `testmempoolaccept` to return "allowed"=True for a | ||
group of transactions, but "too-long-mempool-chain" if they are actually submitted. (#20833) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) 2021 The Bitcoin Core developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#ifndef BITCOIN_POLICY_PACKAGES_H | ||
#define BITCOIN_POLICY_PACKAGES_H | ||
|
||
#include <consensus/validation.h> | ||
#include <primitives/transaction.h> | ||
|
||
#include <vector> | ||
|
||
/** Default maximum number of transactions in a package. */ | ||
static constexpr uint32_t MAX_PACKAGE_COUNT{25}; | ||
/** Default maximum total virtual size of transactions in a package in KvB. */ | ||
static constexpr uint32_t MAX_PACKAGE_SIZE{101}; | ||
|
||
/** A "reason" why a package was invalid. It may be that one or more of the included | ||
* transactions is invalid or the package itself violates our rules. | ||
* We don't distinguish between consensus and policy violations right now. | ||
*/ | ||
enum class PackageValidationResult { | ||
PCKG_RESULT_UNSET = 0, //!< Initial value. The package has not yet been rejected. | ||
PCKG_POLICY, //!< The package itself is invalid (e.g. too many transactions). | ||
PCKG_TX, //!< At least one tx is invalid. | ||
}; | ||
|
||
/** A package is an ordered list of transactions. The transactions cannot conflict with (spend the | ||
* same inputs as) one another. */ | ||
using Package = std::vector<CTransactionRef>; | ||
|
||
class PackageValidationState : public ValidationState<PackageValidationResult> {}; | ||
|
||
#endif // BITCOIN_POLICY_PACKAGES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.