-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backport: merge bitcoin#19940, #19498, #19339, #19753, #20581, #20834, #21062, #21783, #21121, #22084, partial bitcoin#19668, #20833 (mempool backports) #5834
Conversation
b7c5c98
to
7fc608f
Compare
c7894f6
to
110e975
Compare
src/rpc/rawtransaction.cpp
Outdated
@@ -1072,6 +1072,11 @@ static UniValue testmempoolaccept(const JSONRPCRequest& request) | |||
{ | |||
{RPCResult::Type::STR_HEX, "txid", "The transaction hash in hex"}, | |||
{RPCResult::Type::BOOL, "allowed", "If the mempool allows this tx to be inserted"}, | |||
{RPCResult::Type::NUM, "vsize", "Virtual transaction size as defined in BIP 141"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we just drop vsize
from output because that's equal to regular size of tx in 100% cases?
That has meaning only for case of segregated tx when 'real' and 'virtual' size of tx are different
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've dropped the "as defined in BIP 141" portion of the description but have retained vsize
as getrawmempool
already prints out vsize
and a bunch of functional tests already refer to it like mempool_updatefromblock
and mining_prioritisetransaction
.
It's practically just an alias to size
at this point but as long as somewhere something tries to fetch vsize
, it's better there than not. Though on the other hand some RPCs might have already purged vsize
since I don't see them outside of the examples I've mentioned so maybe there's merit to removing them.
Regardless, it'd have to be done in a distinct commit since we'd have to regularize other vsize
usage.
This pull request has conflicts, please rebase. |
src/test/miner_tests.cpp
Outdated
@@ -35,7 +35,8 @@ struct MinerTestingSetup : public TestingSetup { | |||
void TestPackageSelection(const CChainParams& chainparams, const CScript& scriptPubKey, const std::vector<CTransactionRef>& txFirst) EXCLUSIVE_LOCKS_REQUIRED(::cs_main, m_node.mempool->cs); | |||
bool TestSequenceLocks(const CTransaction& tx, int flags) EXCLUSIVE_LOCKS_REQUIRED(::cs_main, m_node.mempool->cs) | |||
{ | |||
return CheckSequenceLocks(::ChainstateActive(), *m_node.mempool, tx, flags); | |||
CCoinsViewMemPool viewMempool(&m_node.chainman->ActiveChainstate().CoinsTip(), *m_node.mempool); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
20833 - missing changes in src/test/fuzz/tx_pool.cpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bitcoin#20833 has been listed as a partial and the commit description explicitly states the exclusion of c9e1a26, which would be completed in dash#5835 after the PR that introduces tx_pool
(bitcoin#21142, backported as 6823ba3) has been backported. The completed bitcoin#20833 can be seen in 12c534e as part of dash#5835.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, utACK
@@ -306,6 +306,25 @@ bool CCoinJoinBaseSession::IsValidInOuts(const CTxMemPool& mempool, const std::v | |||
return true; | |||
} | |||
|
|||
// Responsibility for checking fee sanity is moved from the mempool to the client (BroadcastTransaction) | |||
// but CoinJoin still requires ATMP with fee sanity checks so we need to implement them separately |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we can't drop it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CoinJoin code expects that ATMP will check fee sanity because unlike every other non-RPC/non-GUI AcceptToMemoryPool
call which uses an nAbsurdFee
value of 0
(to skip absurd fee checking), CoinJoin code in a few places uses DEFAULT_MAX_RAW_TX_FEE
(not to be confused with DEFAULT_MAX_RAW_TX_FEE_RATE
, which has the same value, except as CFeeRate
as opposed to CAmount
) as nAbsurdFee
, triggering the fee check.
Perhaps it could be refactored to be removed entirely but that's outside the scope of the PR and the backport attempts to preserve functionality as-is on the CoinJoin front.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK for merging via merge commit
Co-authored-by: Konstantin Akimov <[email protected]>
Co-authored-by: UdjinM6 <[email protected]>
…ut" parameters: pass by ref to const instead of ref to non-const continuation from 40c2700 in dash#4919
…o make mempool transaction
inapplicable: - 5cac95c (we don't have RBF)
db21c86
to
a7ebe53
Compare
…hify help text, undashify code comments (#5852) ## Issue being fixed or feature implemented This pull request is a follow-up to [some](#5834 (comment)) [feedback](#5834 (comment)) received on [dash#5834](#5834) as the patterns highlighted were present in different parts of the codebase and hence not corrected within the PR itself but addressed separately. This is that separate PR 🙂 (with some additional cleanup of my own) ## What was done? * This pull request will remain a draft until [dash#5834](#5834) as it will introduce more changes that will need to be corrected in this PR. * Code introduced that is unique to Dash Core (CoinJoin, InstantSend, etc.) has been excluded from un-Dashification as the purpose of it is to reduce backport conflicts, which don't apply in those cases. * `CWallet::CreateTransaction` and the `CreateTransactionTest` fixture have been excluded as the former originates from [dash#3668](#3668) and the latter from [dash#3667](#3667) and are distinct enough to be unique to Dash Core. * There are certain Dashifications and SegWit-removals that prove frustrating as it would break compatibility with programs that rely on the naming of certain keys * `getrawmempool`, `getmempoolancestors`, `getmempooldescendants` and `getmempoolentry` return `vsize` which is currently an alias of `size`. I have been advised to retain `vsize` in lieu of potential future developments. (this was originally remedied in 219a1d0 but has since been dropped) * `getaddressmempool`, `getaddressutxos` and `getaddressdeltas` all return a value with the key `satoshis`. This is frustrating to rename to `duffs` for compatibility reasons. * `decodepsbt` returns (if applicable) `non_witness_utxo` which is frustrating to rename simply to `utxo` for the same reason. * `analyzepsbt` returns (if applicable) `estimated_vsize` which frustrating to rename to `estimated_size` for the same reason. ## How Has This Been Tested? ## Breaking Changes None ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
Additional Information