Skip to content
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

policy: bump TX_MAX_STANDARD_VERSION to 3 #29496

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

glozow
Copy link
Member

@glozow glozow commented Feb 27, 2024

Make nVersion=3 (which is currently nonstandard on mainnet) standard.

Note that we will treat these transactions as Topologically Restricted Until Confirmation (TRUC). See #28948, #29306, and bitcoin/bips#1541.

See #27463 for overall project tracking, and #29319 for information about relevance to cluster mempool.

@DrahtBot
Copy link
Contributor

DrahtBot commented Feb 27, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept ACK hernanmarino
Stale ACK murchandamus

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29325 (consensus: Store transaction nVersion as uint32_t by achow101)
  • #28132 (policy: Enable full-rbf by default by petertodd)

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.

@glozow glozow changed the title policy: make maximum standard transaction version 3 policy: bump TX_MAX_STANDARD_VERSION to 3 Feb 27, 2024
@glozow glozow mentioned this pull request Feb 28, 2024
56 tasks
@ariard
Copy link
Member

ariard commented Mar 4, 2024

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.
Doing with v3 itself would present a) a policy signaling mechanism saving and b) avoid some policy bargains like we had with mempoolfullrbf (between LN-vs-0-confs).

If you prefer to have the discussion on the v3 BIP PR let me know.

@ariard
Copy link
Member

ariard commented Mar 7, 2024

What is your thinking on #29454 ?

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 TX_MAX_STANDARD_VERSION=3 in Bitcoin Core v28.0.

@glozow
Copy link
Member Author

glozow commented Mar 13, 2024

Rebased

Copy link
Contributor

@murchandamus murchandamus left a 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

Copy link
Contributor

@hernanmarino hernanmarino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK 7b18f0e

@glozow
Copy link
Member Author

glozow commented May 23, 2024

Added constant for #29873 (comment)
Also added a test that wallet does not signal v3 as it uses the default CURRENT_VERSION (this is correct as it wouldn't be safe to make transactions v3 before any of the network has adopted this change). I believe the nVersion can be changed via CCoinControl::m_version, though I'm not sure if that is accessible so I didn't write a test for it.

Rebased on top of #29873 + master (conflict with #29086)

Copy link
Contributor

@murchandamus murchandamus left a 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

src/policy/v3_policy.h Outdated Show resolved Hide resolved
Comment on lines +124 to +128
# While v3 transactions are standard, the CURRENT_VERSION is 2.
# This test can be removed if CURRENT_VERSION is changed, and replaced with tests that the
# wallet handles v3 rules properly.
assert_equal(tx_current_version.nVersion, 2)
wallet_v3.unloadwallet()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to add this!

Note that, as CURRENT_VERSION = 2, the wallet will not make transactions
with nVersion=3 yet.
@glozow
Copy link
Member Author

glozow commented May 24, 2024

Rebased for #30072

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants