bitcoin-package-relay
BIP331 package relay + accompanying mempool policy: package validation, ancestor/descendant limits, submitpackage RPC, package CPFP, sibling eviction with TRUC v3 (BIP431), ephemeral anchors. Critical for Lightning fee bumping and any multi-tx workflow. USE WHEN: implementing CPFP, designing fee-bump strategies, debugging "why won't my child confirm", reasoning about Lightning anchor pinning.
What this skill does
# Package Relay (BIP331) Package = a set of related transactions (typically parent + child) that mempool evaluates **atomically**. Until BIP331, mempool processed one tx at a time, which broke CPFP when a parent was below mempool min fee rate. ## Activation - BIP331 mempool policy in Bitcoin Core 28.0 (Sept 2024). - Companion: TRUC v3 transactions (BIP431) for stricter Lightning-class packages. ## Why packages Pre-package relay: - Parent tx P with fee rate X submitted; if X < mempool min, P is rejected. - Child C spending P's output, even at high fee rate, **cannot rescue P** because mempool evaluates C alone, can't find its parent. Post-package relay: - Submit P + C atomically via `submitpackage`. - Mempool computes the package effective fee rate `(fee_P + fee_C) / (vsize_P + vsize_C)`. - If above mempool min, both accepted. ## submitpackage RPC ```bash 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. ## Package validation rules (selected) 1. All txs share at least one ancestor or descendant relationship within the package. 2. Total package size ≤ default ancestor/descendant size limits unless TRUC v3 (which has its own ≤10 kvB limit per tx). 3. No tx in package conflicts with another (no shared inputs). 4. Package effective fee rate ≥ mempool min fee. 5. Package CPFP allowed: a high-fee child can carry a low-fee parent. ## Ancestor/descendant limits (default) - 25 unconfirmed ancestors. - 25 unconfirmed descendants. - 101 kvB total ancestor or descendant size. These are **policy** limits (mempool admission only), not consensus. ## TRUC v3 (BIP431) interaction TRUC v3 imposes stricter rules to prevent pinning: - ≤ 1 unconfirmed ancestor (which must also be v3). - ≤ 1 unconfirmed descendant. - ≤ 10 kvB tx size. - Sibling eviction: a v3 child can replace a sibling without paying for the sibling's bandwidth (mitigates pinning). Combined with **ephemeral anchors** (value=0 anchor outputs that must be spent in the same package), this creates a non-pinnable fee-bumping primitive specifically for Lightning commitment txs. ## Practical Lightning use case Pre-BIP331/431: - Lightning commitment with anchor output (BOLT-3 update) at 330 sats. - Channel partner publishes commitment + bumps via anchor with high fee. - **Pinning attack**: attacker spends anchor with low-fee descendant before honest CPFP can land → your honest tx waits indefinitely. - **Replacement cycling**: attacker cycles their descendant rapidly, exploiting BIP125 rule 5 to stall your honest tx past CLTV. Post-BIP331/431: - Use v3 transactions for commitment. - Ephemeral anchor (value=0) can only be spent in same package. - v3 ≤1 descendant limit blocks pinning stacking. - Sibling eviction lets you cleanly replace bad descendants. ## RBF interaction Package replacement: a package can replace a previously submitted package if it satisfies BIP125 rules at the package level (total fee ≥ replaced + incremental, etc.). Implementation has nuances around **partial replacement** (some package txs replace some old, others add); current Core treats this carefully. ## Common bugs - Calling `sendrawtransaction` on the parent only when the parent is below mempool min → parent rejected, child has no parent in mempool, use `submitpackage` instead. - Building a v3 child for a v0/v1 parent → policy violation. - Forgetting to spend ephemeral anchor in the same package → package rejected (anchor output is unspendable except in package context). ## See also - [transactions/quick-ref/v3-truc.md](../transactions/quick-ref/v3-truc.md) - [transactions/quick-ref/rbf-cpfp.md](../transactions/quick-ref/rbf-cpfp.md) - [../../lightning/replacement-cycling/SKILL.md](../../lightning/replacement-cycling/SKILL.md) - [../../lightning/pinning-attacks/SKILL.md](../../lightning/pinning-attacks/SKILL.md)
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.