-
Notifications
You must be signed in to change notification settings - Fork 37.7k
policy: bump TX_MAX_STANDARD_VERSION to 3 #29496
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
What is your thinking on #29454 ? I would still favor to make the 1000 vb limit dynamic and applying on the whole package, not only the child. If you prefer to have the discussion on the v3 BIP PR let me know. |
Same as said that for sibling evictions - I’ll go to hack a tx-relay jamming / pinning toolkit, that way we’ll have more information on the robustness of those current proposed anti-pinning mitigations. I still maintain there are very incomplete for time-sensitive transaction flows, especially in face of “loophole” and NTA pinnings. I’m incredibly worried for the security of the Lightning Network if we don’t deploy additional anti-pinning mitigations on top of those ones over the future years - We have not seen yet script kiddies attacking the network. Under today inertia, we’ll probably converge towards a centralized network of ~50 LSPs relying on traditional social trust rather than relying on trust-minimized confirmation of pre-signed transactions. This is very problematic if they wish to accept channel traffic from low-resources spokes LN nodes, especially in geographical areas where social trust mechanism cannot be afforded by end-users. On #29454, I still prefer to keep experimenting on “transaction-issuer selected policy limits” which might encompass more stringent tx-relay jamming on a minor fork of Bitcoin Core. Coming up with a sound technical proposal in matters of tx-relay policy likely demands few rounds of iterations and realistically we already have a severe shortage of qualified review bandwidth in those areas. The initial reason closing of #29448 was my own realization that the introduction of differentiated tx-relay policy among the tx-relay network of nodes will probably generate with time tiers of transaction economic traffic priority (I really cannot see how it worsens memory / CPU DoS robustness per se ?). I don’t think this is a phenomena we can do a lot as a full-node implementation, as we’re seeing with the appearance of transaction accelerators by mining pools. There is transaction issuer demand for such services apparently. Yet we should be careful of doing works in parallel to maintain bip152 block propagation and as such long-term decentralization of the base-layer network. I’m not opposing the deployment of |
Rebased |
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.
Concept ACK and code changes look simple enough. Given that the proposed rules for V3 transactions entail a voluntary topology restriction by the sender on their own transactions, it seems reasonable to me to merge this into the master branch soon
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.
Concept ACK 7b18f0e
85def66
to
e41dae3
Compare
Added constant for #29873 (comment) |
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.
Still looks good to me
crACK e41dae3
Rebased for #30072 |
@@ -1017,7 +1017,7 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws) | |||
.descendant_count = maybe_rbf_limits.descendant_count + 1, | |||
.descendant_size_vbytes = maybe_rbf_limits.descendant_size_vbytes + EXTRA_DESCENDANT_TX_SIZE_LIMIT, | |||
}; | |||
if (ws.m_vsize > EXTRA_DESCENDANT_TX_SIZE_LIMIT || ws.m_ptx->nVersion == 3) { |
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.
few remaining spots that I can see:
src/test/fuzz/package_eval.cpp:176: tx_mut.nVersion = fuzzed_data_provider.ConsumeBool() ? 3 : CTransaction::CURRENT_VERSION;
src/test/fuzz/tx_pool.cpp:229: tx_mut.nVersion = fuzzed_data_provider.ConsumeBool() ? 3 : CTransaction::CURRENT_VERSION;
src/test/txvalidation_tests.cpp:289: mtx_many_sigops.nVersion = 3;
src/test/util/txmempool.cpp:121: if (tx_info.tx->nVersion == 3) {
src/test/util/txmempool.cpp:136: Assert(parents.begin()->get().GetSharedTx()->nVersion == 3);
src/test/util/txmempool.cpp:141: Assert(parent.get().GetSharedTx()->nVersion != 3);
can also use this constant
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.
thanks! fixed these now
Note that, as CURRENT_VERSION = 2, the wallet will not make transactions with nVersion=3 yet.
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 30a0113
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.
Concept ACK
@@ -15,8 +15,9 @@ | |||
#include <set> | |||
#include <string> | |||
|
|||
// This module enforces rules for transactions with nVersion=3 ("v3 transactions") which help make | |||
// This module enforces rules for BIP 431 TRUC transactions (with nVersion=3) which help make |
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.
nit, I think the mention of TRUC transactions suffices, from the BIP specification we know they have nVersion=3?
// This module enforces rules for BIP 431 TRUC transactions (with nVersion=3) which help make | |
// This module enforces rules for BIP 431 TRUC transactions which help make |
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.
The file name could also be renamed to refer to TRUC transactions instead of v3_policy.
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.
done in #30272
@@ -146,14 +146,14 @@ std::optional<std::string> PackageV3Checks(const CTransactionRef& ptx, int64_t v | |||
} else { | |||
// Non-v3 transactions cannot have v3 parents. |
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 replace all v3 mentions with TRUC for clarity and uniformity.
The BIP specification refers to this policy rules as TRUC Transactions.
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.
Sure, can be in another PR
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.
done in #30272
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.
ACK 30a0113
@@ -15,8 +15,9 @@ | |||
#include <set> | |||
#include <string> | |||
|
|||
// This module enforces rules for transactions with nVersion=3 ("v3 transactions") which help make | |||
// This module enforces rules for BIP 431 TRUC transactions (with nVersion=3) which help make |
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.
The file name could also be renamed to refer to TRUC transactions instead of v3_policy.
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.
ACK 30a0113 🛰️
utACK 30a0113 |
ACK 30a0113 |
926b8e3 [doc] add release note for TRUC (glozow) 19a9b90 use version=3 instead of v3 in debug strings (glozow) 881fac8 scripted-diff: change names from V3 to TRUC (glozow) a573dd2 [doc] replace mentions of v3 with TRUC (glozow) 089b575 rename mempool_accept_v3.py to mempool_truc.py (glozow) f543852 rename policy/v3_policy.* to policy/truc_policy.* (glozow) Pull request description: Adds a release note for TRUC policy which will be live in v28.0. For clarity, replaces mentions of "v3" with "TRUC" in most places. Suggested in - #29496 (comment) - #29496 (comment) I changed error strings from "v3-violation" to "TRUC-violation" but left v3 in the debug strings because I think it might be clearer for somebody who is debugging. Similarly, I left some variables unchanged because I think they're more descriptive this way, e.g. `tx_v3_from_v2_and_v3`. I'm happy to debate places that should or shouldn't be documented differently in this PR, whatever is clearest to everyone. ACKs for top commit: instagibbs: reACK 926b8e3 achow101: ACK 926b8e3 ismaelsadeeq: Code review ACK 926b8e3 Tree-SHA512: 16c88add0a29dc6d1236c4d45f34a17b850f6727b231953cbd52eb9f7268d1d802563eadfc8b7928c94ed3d7a615275dd103e57e81439ebf3ba2b12efa1e42af
Make
nVersion=3
(which is currently nonstandard on mainnet) standard.Note that we will treat these transactions as Topologically Restricted Until Confirmation (TRUC). Spec is in BIP 431 and implementation is in #28948, #29306, and #29873
See #27463 for overall project tracking, and #29319 for information about relevance to cluster mempool.