[API] Document and test per-transaction fee admission - #338
Draft
rohenaz wants to merge 2 commits into
Draft
Conversation
👋 Thanks, @rohenaz!This pull request comes from a fork. For security, our CI runs in a restricted mode.
Thanks for contributing to bsv-blockchain/arcade! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
Adds a linked parent/child regression fixture showing that
/txsrejects 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.miningFeeneed 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.StatusFees.git diff --checkpassed.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.