Skip to content

[API] Document and test per-transaction fee admission - #338

Draft
rohenaz wants to merge 2 commits into
bsv-blockchain:mainfrom
rohenaz:codex/package-fee-regression
Draft

[API] Document and test per-transaction fee admission#338
rohenaz wants to merge 2 commits into
bsv-blockchain:mainfrom
rohenaz:codex/package-fee-regression

Conversation

@rohenaz

@rohenaz rohenaz commented Sep 4, 2026

Copy link
Copy Markdown

What Changed

Adds a linked parent/child regression fixture showing that /txs rejects an under-floor parent even when its child pays enough for their combined raw transaction size. The child-first EF batch returns the parent's fee error and publishes nothing for propagation. A validator test independently proves that the parent passes non-fee checks and the child passes its own fee check.

Documents the current per-transaction fee contract, the distinction between admission and mining, and the prerequisites for future package-aware funding. Includes pinned legacy Bitcoin SV and Teranode source references.

Why It Was Necessary

Wallets discovering policy.miningFee need to know whether a child can cover an ancestor's fee deficit. The rate alone does not advertise that capability. Arcade currently checks each transaction separately, and its pinned Teranode version rejects under-floor transactions before block assembly. Legacy Bitcoin SV has a different secondary-mempool CPFP path.

This draft establishes the acceptance gap before changing wallet fee calculations or relay validation. It does not implement CPFP, relax fee validation, or claim to fix wallet overpayment. Functional Teranode support requires package-aware admission; an Arcade-only fee-check bypass is insufficient.

Testing Performed

  • CGO_ENABLED=1 go test ./validator ./services/api_server — passed.
  • Verified the parent has complete source data, passes script/structure checks with fees skipped, and fails normal validation specifically with StatusFees.
  • Verified combined fee coverage uses raw transaction size, while the API transports EF source data.
  • Verified child-first batch rejection identifies the parent and publishes zero propagation messages.
  • Independent focused review found no blockers; git diff --check passed.

No node was started and no transaction was broadcast. Node behavior was traced in source; mining eligibility has not been demonstrated against a deployment. Documentation records that limitation and the required acceptance tests.

Impact / Risk

Tests and documentation only; no production behavior or advertised policy changes. No dependency changes. The existing per-transaction fee checks remain in force. Package-aware admission and end-to-end mining tests remain follow-up work.

@github-actions github-actions Bot added fork-pr PR originated from a forked repository requires-manual-review PR or issue requires manual review by a maintainer or security team labels Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

👋 Thanks, @rohenaz!

This pull request comes from a fork. For security, our CI runs in a restricted mode.
A maintainer will triage this shortly and run any additional checks as needed.

  • 🏷️ Labeled: fork-pr, requires-manual-review
  • 👀 We'll review and follow up here if anything else is needed.

Thanks for contributing to bsv-blockchain/arcade! 🚀

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

Labels

fork-pr PR originated from a forked repository requires-manual-review PR or issue requires manual review by a maintainer or security team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants