Modify testmempoolaccept to handle client’s max_raw_tx_fee check failure
#21074
issue
ariard
openend this issue on
February 3, 2021
-
ariard commented at 11:05 am on February 3, 2021: memberSee #21062 (review)
-
ariard added the label Feature on Feb 3, 2021
-
MarcoFalke commented at 12:46 pm on February 3, 2021: member
testmempoolaccept handles this case since it was written. See also the test
-
MarcoFalke commented at 1:06 pm on February 3, 2021: memberNote the reason has been changed from
absurdly-high-feetomax-fee-exceeded -
ariard commented at 1:29 pm on February 3, 2021: member
@MarcoFalke As of ea96e17,
testmempoolaccept’s “allowed” field is documented “If the mempool allows this tx to be inserted”. Your transaction might be mempool valid but doesn’t pass the client belt-and-suspender, a different type of check so we should returnallowed=truein that case.This is ambiguous and IMHO we should have a different result field to dissociate cleanly. And also nicely return fees to offending caller and such allow correction ?
-
MarcoFalke commented at 4:03 pm on February 3, 2021: member
As of ea96e17, testmempoolaccept’s “allowed” field is documented “If the mempool allows this tx to be inserted”.
That is the case since the call was added in commit b55555da3e25a47f1e7fced7f09d4f0bf8198624.
we should return allowed=true in that case.
That’d be a breaking change, so I’d rather not do that.
This is ambiguous
This is documented, so shouldn’t be ambiguous:
02. maxfeerate (numeric or string, optional, default=0.10) Reject transactions whose fee rate is higher than the specified value, expressed in BTC/kBMaybe you are asking for the reject reason to be better documented in that case? Simply checking the reject reason should be sufficient in this case to dissociate cleanly.
-
glozow commented at 9:04 pm on February 3, 2021: member
Conceptually, I agree that the information given isn’t as precise as it could be. If we could start from scratch, I would do it differently. The idea for #19339 not changing
allowedfrom False to True was, as @MarcoFalke said, because that’d actually be a breaking change, so it just changes the reject reason instead. I don’t think users would be surprised by the behavior given current documentation.Moving forward, if I were to propose something, I’d maybe have
allowedrepresent “everything ok,” and then for “allowed=False” add aproblem-typefield forCONSENSUS,MEMPOOL_POLICY,USER_CONFIG, orUNFINISHED_VALIDATION. Just throwing the idea out there. -
fanquake deleted a comment on Apr 10, 2021
-
laanwj closed this on May 27, 2021
-
DrahtBot locked this on Aug 18, 2022
Labels
Feature
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-10-30 12:13 UTC
More mirrored repositories can be found on mirror.b10c.me