Skip to content

Conversation

glozow
Copy link
Member

@glozow glozow commented Oct 8, 2020

Pretty trivial... addresses some tiny comments from #19339. Also fixes a docs typo from #19940 and adds a release note about the error message change for testmempoolaccept.

@DrahtBot DrahtBot added the Docs label Oct 8, 2020
@glozow
Copy link
Member Author

glozow commented Oct 9, 2020

@MarcoFalke @instagibbs :)

@maflcko maflcko added this to the 0.21.0 milestone Oct 9, 2020
@maflcko
Copy link
Member

maflcko commented Oct 9, 2020

Note that sendrawtransaction changed the return code and error string

if the transaction passes validation. (#19940)

- The `testmempoolaccept` RPC returns `max-fee-exceeded` rather than `absurdly-high-fee`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the criteria to throw this reject reason appears to be the exceeding of a feerate, would it not be more informative to make the reject-reason max-feerate-exceeded instead of max-fee-exceeded? I realize that this would have been a better feedback for #19339, but I only see it now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing :) my "inspiration" was TransactionError::MAX_FEE_EXCEEDED, hopefully not too big of a deal

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit of a pet-peeve of mine that fees and feerates are often mixed up in Bitcoin, but the ship has probably sailed for this change? 🤔
I'll have to be faster next time. ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xekyo You're absolutely right that they're often mixed up, but in this context it is actually referring to an absolute fee (by default 0.1 BTC...) rather than a feerate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thanks for the clarification. I'm a bit confused by this description then:

The sendrawtransaction error code for exceeding maxfeerate has been changed from -26 to -25. The error string has been changed from "absurdly-high-fee" to "Fee exceeds maximum configured by user (e.g. -maxtxfee, maxfeerate)." The testmempoolaccept RPC returns max-fee-exceeded rather than absurdly-high-fee as the reject-reason. (#19339)

It sounds to me that exceeding maxfeerate causes the reject-reason max-fee-exceeded. If they are referring to two separate error resolutions, it wasn't apparent to me. I'm not overtly invested, though, if that looks fine to more experienced contributors.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh perhaps it is me who is confusing things.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The maxfeerate passed into testmempoolaccept is a feerate and the wallet -maxtxfee option is a fee amount. I'm not really sure why this is the case 😅

@glozow
Copy link
Member Author

glozow commented Oct 9, 2020

Sorry @MarcoFalke I confused myself 😅 , added notes for the changed error codes and strings.

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@maflcko
Copy link
Member

maflcko commented Oct 9, 2020

cr re-ACK 88197b0


- To make wallet and rawtransaction RPCs more consistent, the error message for
exceeding maximum feerate has been changed to "Fee exceeds maximum configured by user
(e.g. -maxtxfee, maxfeerate)." (#19339)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvement! 👍

Copy link
Contributor

@RiccardoMasutti RiccardoMasutti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

Copy link
Member

@achow101 achow101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 88197b0

@@ -347,6 +347,16 @@ RPC
- Fee estimation failed
- Transaction has too long of a mempool chain

- The `sendrawtransaction` error code for exceeding `maxfeerate` has been changed from
`-26` to `-25`. The error string has been changed from "absurdly-high-fee" to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should also list the name for these error codes as the number itself is a harder to undertsand.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can adjust this in the wiki closer to release.

@fanquake fanquake merged commit e21b824 into bitcoin:master Oct 14, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Oct 15, 2020
88197b0 [doc] release notes for max fee checking (gzhao408)
c201d73 style and nits for fee-checking in BroadcastTransaction (gzhao408)

Pull request description:

  Pretty trivial... addresses some tiny comments from bitcoin#19339. Also fixes a docs typo from bitcoin#19940 and adds a release note about the error message change for testmempoolaccept.

ACKs for top commit:
  achow101:
    ACK 88197b0
  MarcoFalke:
    cr re-ACK 88197b0

Tree-SHA512: fff16d731426b9b4db5222df02633983402f4c7241551eec98bb1554145dbdc132f40ed8ca4abd5edcebe1f4d1e879fb6d11bd91730604f6552c10cdf65706a1
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Nov 16, 2021
Summary:
Check absurd fee in BroadcastTransaction and RPC,
return TransactionError::MAX_FEE_EXCEEDED instead
of TxValidationResult::TX_NOT_STANDARD because this
is client preference, not a node-wide policy.

This is a backport of [[bitcoin/bitcoin#19339 | core#19339]] [1/3] and [[bitcoin/bitcoin#20109 | core#20109]]
bitcoin/bitcoin@8f1290c

Depends on D10463 and D10474

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10464
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants