算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
bitcoin-package-relay【设计与创意】Package relay and the mempool policy Bitcoin Core actually ships: opportunistic 1p1c relay, package validation, cluster limits, submitpackage RPC, package CPFP, sibling eviction with TRUC v3 (BIP431), P2A anchors (BIP433) and ephemeral dust. Critical for Lightning fee bumping and any multi-tx workflow. USE WHEN: implementing CPFP, designing fee-bump …
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Package = a set of related transactions (typically parent + child) that mempool evaluates atomically. Historically the mempool processed one tx at a time, which broke CPFP when a parent was below mempool min fee rate.
BIP331 "Ancestor Package Relay" is still Status: Draft and has never
been deployed. Its sendpackages / pkgtxns P2P messages do not exist
in Bitcoin Core. What Core ships is a narrower, opportunistic
1-parent-1-child (1p1c) scheme carried over the existing transaction
relay protocol, plus local package submission via RPC:
| Release | What landed |
|---|---|
| 26.0 (December 2023) | submitpackage RPC - local submission only, no P2P package relay |
| 28.0 (October 2024) | Opportunistic 1p1c relay over the existing tx relay protocol; TRUC v3 (BIP431) standard; Pay-to-Anchor (BIP433) standard output type; limited package RBF |
| 29.0 (April 2025) | Ephemeral dust: one dust output allowed if the tx is zero fee and the dust is spent alongside it |
| 30.0 (October 2025) | 1p1c handles a child that already has unconfirmed parents in the mempool; submitpackage no longer requires every unconfirmed parent to be present |
| 31.0 (April 2026) | Cluster mempool; the 1p1c parent may be below -minrelaytxfee, even 0 fee, for non-TRUC packages too |
Core 28.0's release notes warn that the P2P feature is limited (a child with multiple unconfirmed parents was not supported then) and "not yet reliable under adversarial conditions".
BIP431 (TRUC) and BIP433 (P2A) are likewise Draft - but unlike BIP331 the policy they describe did ship as standard in Core 28.0.
Latest release line as of September 2026: Bitcoin Core 31.1 (July 2026).
Pre-package relay:
Post-package relay:
submitpackage.(fee_P + fee_C) / (vsize_P + vsize_C).bitcoin-cli submitpackage '["<rawtx_parent_hex>", "<rawtx_child_hex>"]'
Returns per-tx result: accepted / rejected with reason. Atomic: if
any tx in package fails, none are accepted. This is a local submission
path; it does not make the package propagate any better than opportunistic
1p1c relay does.
doc/policy/packages.md, as of Bitcoin Core 31.1, July 2026).Since the cluster mempool rewrite in Core 31.0 (April 2026), the mempool no longer enforces ancestor or descendant count/size limits. They are replaced by cluster limits, where a cluster is a connected component of the mempool's parent/child graph:
History - up to and including Core 30.x the limits were 25 unconfirmed
ancestors, 25 unconfirmed descendants and 101 kvB of ancestor or
descendant size. Code and docs written against that model still assume
-limitancestorcount / -limitdescendantcount semantics.
Either way these are policy limits (mempool admission only), not consensus.
Core 31.0 also removed the CPFP carve-out; TRUC plus sibling eviction is the intended replacement for the use cases that relied on it.
TRUC v3 imposes stricter rules to prevent pinning:
Combined with P2A anchors and ephemeral dust (below), this creates a non-pinnable fee-bumping primitive specifically for Lightning commitment txs.
Standard output type since Core 28.0 (October 2024); specified as BIP433 (Status: Draft, Informational, author Gregory Sanders).
scriptPubKey = OP_1 <0x4e73> # witness v1, 2-byte program
addresses = bc1pfeessrawgf (mainnet)
tb1pfees9rn5nz (public testnets)
bcrt1pfeesnyr2tx (regtest)
dust limit = 240 sat
Ephemeral dust (Core 29.0, April 2025) is a separate mechanism often conflated with it: a transaction may carry a single dust output provided the transaction pays zero fee, and any spend of that transaction's unconfirmed outputs must also spend the dust. The two are usually used together - the older name "ephemeral anchor" is the union of P2A and ephemeral dust - but neither implies the other, and keyed anchors plus ephemeral dust remains an accepted pattern.
Lightning: BOLT changes merged 2026-05-04 (lightning/bolts #1228) add
zero_fee_commitments, where a v3 commitment carries a single shared
P2A shared_anchor output instead of the two keyed 330-sat
option_anchors outputs.
Pre-TRUC (before Core 28.0, October 2024):
option_anchors outputs at 330 sats.Post-TRUC:
Core 31.0 (April 2026) replaced the BIP125 rule set with the feerate
diagram rule: a replacement is accepted only if the resulting mempool's
feerate diagram is strictly better than before. For a singleton (a tx
alone in its cluster) it is sufficient to pay both a higher fee and a
higher feerate than the original. The absolute-fee and
incremental-relay-feerate requirements (old BIP125 rules 3 and 4) still
apply; BIP125 rules 1 (opt-in signalling) and 2 (no new unconfirmed
inputs) are gone (doc/policy/mempool-replacements.md, as of Bitcoin
Core 31.1, July 2026). Full RBF has been the default since 28.0, so
nothing has to signal.
Package replacement is still limited (doc/policy/packages.md, as of
31.1):
History - 28.0 (October 2024) through 30.x required every conflicting cluster to be of size ≤ 2 rather than counting clusters, and nodes before 31.0 evaluated replacements under BIP125. Partial replacement (some package txs replace old ones while others are new) remains the awkward case.
sendrawtransaction on the parent only when the parent is
below mempool min → parent rejected, child has no parent in mempool,
use submitpackage instead.submitpackage means the package will
propagate. Only the 1p1c shape relays opportunistically; there is no
BIP331 package-relay protocol on the network.