Repository navigation
policy: v31.1 overlay (3.9M WU, 1-sat dust, pinned datacarrier) - #4
cre8tor-devops wants to merge 1 commit into
Conversation
Raise standard tx/package/cluster limits together so the tree still compiles, pin OP_RETURN at 100k so datacarrier does not ride along, default -dustrelayfee to 0, and identify the client as /DOGMode/. Document the 40 MB -maxmempool floor and leave preferential peering for a follow-up. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Closing this in favor of #3. That PR already implements the three announced changes, has been independently built and tested, and has real review on the constants, dust semantics, peering, and the If maintainers want a follow-up after #3, the remaining product choices I would still argue for are:
Happy to review or patch those on top of #3 if wanted. Not going to compete with a tested three-commit series. |
|
Ran the test plan, since the description asks for it. macOS arm64, clang 21, Build: clean. No errors. The three manual checks all pass exactly as described:
Unit tests: 13 failures across 3 cases.
The giant-tx loop overshoots into consensus territory
The new loop grows the placeholder in steps of 500: size_t giant_n{2000};
while (GetTransactionWeight(*giant_ptx) <= MAX_STANDARD_TX_WEIGHT) {
giant_n += 500;
giant_ptx = create_placeholder_tx(giant_n, giant_n);
}Each
At these constants the loop can never produce a transaction that is over the policy ceiling but under the consensus one, so coinselector: scenario 3 was rewritten, scenario 1 still failsThe failure is at line 1340, in scenario 1, not the scenario 3 that was rewritten. It is the orphanage: not touched, and there is more to it than the test
The part I would not treat as mechanical is what the ceiling is doing there. // Ignore transactions above max standard size to avoid a send-big-orphans memory exhaustion attack.
TxOrphanage::Usage sz = GetTransactionWeight(*tx);
if (sz > MAX_STANDARD_TX_WEIGHT) { ... return false; }and the per-peer orphan memory reservation next to it is unchanged: static constexpr int64_t DEFAULT_RESERVED_ORPHAN_WEIGHT_PER_PEER{404'000};404,000 is not an arbitrary number: it is
Functional tests:
For what it is worth, the direction here reads better than #3 to me on all three of the open questions: pinning Measurements and harness: https://github.com/tialkan/bitcoin-dust-utxo-lab |
|
Correction to my comment above, on the orphan pool point. I measured it and I had it wrong. I argued that because The ratio is real. The consequence I drew from it is not. Largest orphan actually retained, sending a child whose parent was never submitted and counting
Identical on both, probe for probe. The effective ceiling stays at about 400,000 WU because the per-peer reservation binds first: So two things I said should be withdrawn. The orphan pool does not need a decision here, and What is left is minor and not a DoS matter: the The other four points in my earlier comment stand as measured. Harness for this one is |
Summary
This is a first real code PR against
31.1-dogmode, not an RFC. It implements the announced relay-policy overlay as a thin delta on Bitcoin Core v31.1 and records the side effects that a one-constant patch would have hidden.static_assertchain still holds.MAX_OP_RETURN_RELAYis no longerMAX_STANDARD_TX_WEIGHT / 4, so the weight change does not silently lift datacarrier to 975k.-dustrelayfee0 (1-sat floor). The flag still works;-dustrelayfee=0.00003000restores Core./DOGMode:31.1.0/,CLIENT_NAME"Bitcoin DOG Mode".-maxmempoolfloor is now 40 MB (Flatten()iscluster_vbytes * 40).-blocksonlyimplies 40 MB instead of 5. Tests that need a 5 MB mempool also pin-limitclustersize=101.Not in this PR: preferential peering. That needs a service-bit decision (#2) and should stay a separate commit.
Spec:
doc/policy/dogmode.md. Release notes:doc/release-notes-dogmode.md.This follows the measurements in #1 (thanks @tialkan). Where that RFC left behaviour questions open, this PR picks:
package-too-largevs countTest plan
cmake -B build && cmake --build build -j$(nproc)ctest --test-dir build -R 'transaction_tests|txpackage_tests|coinselector_tests|txvalidation_tests'build/test/functional/test_runner.py mempool_accept mempool_dust mempool_limit mempool_datacarrier rpc_packagesbitcoin-cli -regtest getnetworkinfoshows/DOGMode:bitcoind -maxmempool=4refuses to start with "at least 40 MB"bitcoind -dustrelayfee=0.00003000restores the 546-sat P2PKH floorI could not run the C++ suite in this environment (no cmake/boost). Reviewers with a v31.1 build env should treat the test plan as required, not optional.
Made with Cursor