Modify `testmempoolaccept` to handle client's `max_raw_tx_fee` check failure #21074

issue ariard opened this issue on February 3, 2021
  1. ariard commented at 11:05 AM on February 3, 2021: member
  2. ariard added the label Feature on Feb 3, 2021
  3. ariard cross-referenced this on Feb 3, 2021 from issue refactor: return MempoolAcceptResult from ATMP by glozow
  4. MarcoFalke commented at 12:46 PM on February 3, 2021: member
  5. MarcoFalke commented at 1:06 PM on February 3, 2021: member

    Note the reason has been changed from absurdly-high-fee to max-fee-exceeded

  6. 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 return allowed=true in 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 ?

  7. 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:

    2. maxfeerate      (numeric or string, optional, default=0.10) Reject transactions whose fee rate is higher than the specified value, expressed in BTC/kB
    

    Maybe 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.

  8. 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 allowed from 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 allowed represent "everything ok," and then for "allowed=False" add a problem-type field for CONSENSUS, MEMPOOL_POLICY, USER_CONFIG, or UNFINISHED_VALIDATION. Just throwing the idea out there.

  9. ariard cross-referenced this on Feb 12, 2021 from issue validation/coins: limit MemPoolAccept access to coins cache + make it responsible for uncaching by glozow
  10. bitcoin deleted a comment on Apr 10, 2021
  11. glozow cross-referenced this on Apr 23, 2021 from issue rpc/validation: enable packages through testmempoolaccept by glozow
  12. laanwj closed this on May 27, 2021

  13. bitcoin locked this on Aug 18, 2022

github-metadata-mirror

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: 2026-05-19 06:53 UTC