Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Mar 18, 2019

This makes the rpcs a bit more stateless by falling back to their own default max fee instead of the global maxTxFee.

A follow up pull request will move -maxtxfee to the wallet.

See also related discussions:

@jnewbery
Copy link
Contributor

Concept ACK!

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

utACK fa96d76. This looks great and is nicely done. But it definitely should have release notes noting change in behavior for sendrawtransaction and testmempoolaccept RPCs, which now ignore the -maxtxfee setting.

@jamesob
Copy link
Contributor

jamesob commented Mar 20, 2019

utACK fa96d76. Verified this replaces the only usages of maxTxFee global in rpc code.

$ git grep maxTxFee | grep rpc

src/rpc/rawtransaction.cpp:    const CAmount highfee{allowhighfees ? 0 : ::maxTxFee};
src/rpc/rawtransaction.cpp:    CAmount max_raw_tx_fee = ::maxTxFee;

@promag
Copy link
Contributor

promag commented Mar 20, 2019

How about bumpfee?

// Check that in all cases the new fee doesn't violate maxTxFee
if (new_fee > maxTxFee) {
errors.push_back(strprintf("Specified or calculated fee %s is too high (cannot be higher than maxTxFee %s)",
FormatMoney(new_fee), FormatMoney(maxTxFee)));
return Result::WALLET_ERROR;
}

😮 space in L162

@ryanofsky
Copy link
Contributor

Bumpfee is a wallet function, so it's reasonable if it continues to use maxtxfee if maxtxfee becomes a wallet option.

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

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

Misinterpreted the goal sorry, IMO could have the title Uncouple non-wallet rpcs from maxTxFee global.

Agree with adding release notes.

@maflcko maflcko changed the title rpc: Uncouple rpcs from maxTxFee global rpc: Uncouple non-wallt rpcs from maxTxFee global Mar 20, 2019
@maflcko maflcko changed the title rpc: Uncouple non-wallt rpcs from maxTxFee global rpc: Uncouple non-wallet rpcs from maxTxFee global Mar 20, 2019
@maflcko
Copy link
Member Author

maflcko commented Mar 20, 2019

Renamed title and added release notes as requested by @promag

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

utACK faadaae4795038d77936f36483f1410cd92b3238, only change is release notes

@maflcko maflcko force-pushed the 1903-rpcNoMaxTxFee branch 2 times, most recently from fa55499 to fa4230b Compare March 20, 2019 20:00
Copy link
Contributor

@jnewbery jnewbery left a comment

Choose a reason for hiding this comment

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

Oops. I'd already written a branch for this too.

One comment inline, otherwise utACK fa4230b8a708ad9b848c97a5142da804afc43a4b.

@maflcko maflcko force-pushed the 1903-rpcNoMaxTxFee branch from fa4230b to fa1ad20 Compare March 20, 2019 21:06
@maflcko
Copy link
Member Author

maflcko commented Mar 20, 2019

Changed my mind as requested by @jnewbery

@jnewbery
Copy link
Contributor

utACK fa1ad20

@Empact
Copy link
Contributor

Empact commented Mar 21, 2019

utACK fa1ad20

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

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

The above reference was a mistake.

utACK fa1ad20.

@sipa
Copy link
Member

sipa commented Mar 25, 2019

Concept ACK

@jnewbery
Copy link
Contributor

utACK fa1ad20

maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Mar 27, 2019
fa1ad20 doc: Add release notes for 15620 (MarcoFalke)
fa96d76 rpc: Uncouple rpcs from maxTxFee global (MarcoFalke)
fa965e0 rpc: Use IsValidNumArgs over hardcoded size checks (MarcoFalke)

Pull request description:

  This makes the rpcs a bit more stateless by falling back to their own default max fee instead of the global maxTxFee.

  A follow up pull request will move `-maxtxfee` to the wallet.

  See also related discussions:

  * `-maxtxfee` should not be used by both node and wallet bitcoin#15355
  *  [RFC] Long term plan for wallet command-line args bitcoin#13044

ACKs for commit fa1ad2:
  jnewbery:
    utACK fa1ad20
  Empact:
    utACK bitcoin@fa1ad20
  jnewbery:
    utACK fa1ad20
  promag:
    utACK fa1ad20.

Tree-SHA512: c9cf0b54cd30ff3ab0d090b072cc38fcbb2840bc6ad9a9711995333bc927d2500aece6b5a60e061666eca5ed72b70aa318d21e51eb15ee0106b41f5b6e4e1adf
@maflcko maflcko merged commit fa1ad20 into bitcoin:master Mar 27, 2019
@maflcko maflcko deleted the 1903-rpcNoMaxTxFee branch March 27, 2019 13:24
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Apr 27, 2019
5c759c7 [wallet] Move maxTxFee to wallet (John Newbery)

Pull request description:

  Closes bitcoin#15355

  Moves the `-maxtxfee` from the node to the wallet. See discussion in issue for details.

  This is a cleanup. There is no change in behaviour.

  Completes bitcoin#15620

ACKs for commit 5c759c:
  MarcoFalke:
    utACK 5c759c7
  ryanofsky:
    utACK 5c759c7. Changes since last review: updated commit message and an error message and method name.
  meshcollider:
    utACK bitcoin@5c759c7

Tree-SHA512: 2f9b2729da3940a5cda994d3f3bc11ee1a52fcc1c5e9842ea0ea63e4eb0300e8416853046776311298bc449ba07554aa46f0f245ce28598a5b0bd7347c12e752
vansergen added a commit to vansergen/rpc-bitcoin that referenced this pull request Mar 26, 2020
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request May 27, 2020
Summary:
 * rpc: Use IsValidNumArgs over hardcoded size checks

 * rpc: Uncouple rpcs from maxTxFee global

 * doc: Add release notes for 15620

This is a backport of Core [[bitcoin/bitcoin#15620 | PR15620]]

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D6266
kwvg added a commit to kwvg/dash that referenced this pull request Dec 12, 2021
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants