rpc: Uncouple non-wallet rpcs from maxTxFee global #15620

pull MarcoFalke wants to merge 3 commits into bitcoin:master from MarcoFalke:1903-rpcNoMaxTxFee changing 3 files +34 −13
  1. MarcoFalke commented at 6:03 pm on March 18, 2019: member

    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 #15355
    • [RFC] Long term plan for wallet command-line args #13044
  2. rpc: Use IsValidNumArgs over hardcoded size checks fa965e03c7
  3. rpc: Uncouple rpcs from maxTxFee global fa96d76421
  4. MarcoFalke added the label RPC/REST/ZMQ on Mar 18, 2019
  5. jnewbery commented at 6:54 pm on March 18, 2019: member
    Concept ACK!
  6. MarcoFalke removed the label RPC/REST/ZMQ on Mar 18, 2019
  7. DrahtBot added the label RPC/REST/ZMQ on Mar 19, 2019
  8. doc: Add release notes for 15620 fa1ad200d3
  9. ryanofsky approved
  10. ryanofsky commented at 3:36 pm on March 20, 2019: member
    utACK fa96d7642178b5472b7aa76de9c8b86e7b9cde54. 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.
  11. fanquake added the label Needs release note on Mar 20, 2019
  12. jamesob commented at 4:02 pm on March 20, 2019: member

    utACK https://github.com/bitcoin/bitcoin/pull/15620/commits/fa96d7642178b5472b7aa76de9c8b86e7b9cde54. Verified this replaces the only usages of maxTxFee global in rpc code.

    0$ git grep maxTxFee | grep rpc
    1
    2src/rpc/rawtransaction.cpp:    const CAmount highfee{allowhighfees ? 0 : ::maxTxFee};
    3src/rpc/rawtransaction.cpp:    CAmount max_raw_tx_fee = ::maxTxFee;
    
  13. promag commented at 4:38 pm on March 20, 2019: member
  14. ryanofsky commented at 4:47 pm on March 20, 2019: member
    Bumpfee is a wallet function, so it’s reasonable if it continues to use maxtxfee if maxtxfee becomes a wallet option.
  15. in src/rpc/rawtransaction.cpp:42 in fa96d76421 outdated
    38@@ -39,6 +39,7 @@
    39 
    40 #include <univalue.h>
    41 
    42+constexpr static CAmount DEFAULT_MAX_RAW_TX_FEE{COIN / 10};
    


    promag commented at 5:03 pm on March 20, 2019:
    There is already DEFAULT_TRANSACTION_MAXFEE in validation.h, isn’t a new constant confusing?

    jnewbery commented at 8:02 pm on March 20, 2019:

    Suggest a comment here. Something like:

    0/** High fee for sendrawtransaction and testmempoolaccept. 
    1 * By default, transaction with a fee higher than this will be rejected by
    2 * sendrawtransaction and testmempoolaccept. This can be overriden with the
    3 * maxfeerate argument.
    4 * */
    

    MarcoFalke commented at 8:17 pm on March 20, 2019:
    I think the release notes and rpc documentation are pretty clear on this. Lets not bloat developers with redundant or excessive documentation

    jnewbery commented at 8:23 pm on March 20, 2019:
    Release notes and RPC documentation have nothing to do with code constants. @promag has already said that this constant name is confusing.

    MarcoFalke commented at 8:59 pm on March 20, 2019:

    promag was worried that there are two constants where one would theoretically be sufficient

    Happy to change the name if there is a better one, though.


    MarcoFalke commented at 9:07 pm on March 20, 2019:
    Anyway, changed my mind

    promag commented at 2:59 am on March 24, 2019:
    nit, anonymous namespace instead?
  16. promag commented at 5:03 pm on March 20, 2019: member

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

    Agree with adding release notes.

  17. MarcoFalke renamed this:
    rpc: Uncouple rpcs from maxTxFee global
    rpc: Uncouple non-wallt rpcs from maxTxFee global
    on Mar 20, 2019
  18. MarcoFalke renamed this:
    rpc: Uncouple non-wallt rpcs from maxTxFee global
    rpc: Uncouple non-wallet rpcs from maxTxFee global
    on Mar 20, 2019
  19. MarcoFalke removed the label Needs release note on Mar 20, 2019
  20. MarcoFalke commented at 5:08 pm on March 20, 2019: member
    Renamed title and added release notes as requested by @promag
  21. in doc/release-notes-15620.md:4 in faadaae479 outdated
    0@@ -0,0 +1,11 @@
    1+Updated RPCs
    2+------------
    3+
    4+* The `sendrawtransaction` and `testmempoolaccept` previouly accepted an
    


    ryanofsky commented at 7:33 pm on March 20, 2019:

    In commit “doc: Add release notes for 15620” (faadaae4795038d77936f36483f1410cd92b3238)

    s/previouly accepted/RPC methods previously accepted/


    ryanofsky commented at 7:36 pm on March 20, 2019:

    In commit “doc: Add release notes for 15620” (faadaae):

    This is a nice, detailed description, but I think it would be nice to have a sentence at the beginning summarizing the whole paragraph, like “The -maxtxfee setting no longer has any effect on non-wallet RPCs. […]”


    MarcoFalke commented at 8:01 pm on March 20, 2019:
    Done
  22. ryanofsky approved
  23. ryanofsky commented at 7:37 pm on March 20, 2019: member
    utACK faadaae4795038d77936f36483f1410cd92b3238, only change is release notes
  24. MarcoFalke force-pushed on Mar 20, 2019
  25. MarcoFalke force-pushed on Mar 20, 2019
  26. jnewbery commented at 8:07 pm on March 20, 2019: member

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

    One comment inline, otherwise utACK fa4230b8a708ad9b848c97a5142da804afc43a4b.

  27. MarcoFalke force-pushed on Mar 20, 2019
  28. MarcoFalke commented at 9:07 pm on March 20, 2019: member
    Changed my mind as requested by @jnewbery
  29. jnewbery commented at 10:15 pm on March 20, 2019: member
    utACK fa1ad200d378fc3a4dc4c54214965d3c852db7d7
  30. promag commented at 3:00 am on March 24, 2019: member

    The above reference was a mistake.

    utACK fa1ad20.

  31. sipa commented at 11:40 pm on March 25, 2019: member
    Concept ACK
  32. jnewbery commented at 4:34 pm on March 26, 2019: member
    utACK fa1ad200d378fc3a4dc4c54214965d3c852db7d7
  33. MarcoFalke referenced this in commit 656a15e539 on Mar 27, 2019
  34. MarcoFalke merged this on Mar 27, 2019
  35. MarcoFalke closed this on Mar 27, 2019

  36. MarcoFalke deleted the branch on Mar 27, 2019
  37. MarcoFalke referenced this in commit 3356799ee3 on Apr 27, 2019
  38. vansergen referenced this in commit 761f0d9633 on Mar 26, 2020
  39. deadalnix referenced this in commit 6c784a6125 on May 27, 2020
  40. vijaydasmp referenced this in commit e9cbf74c5e on Oct 30, 2021
  41. vijaydasmp referenced this in commit 3a9c0dc4f0 on Oct 30, 2021
  42. vijaydasmp referenced this in commit d1e396828e on Oct 30, 2021
  43. vijaydasmp referenced this in commit a4a882873f on Nov 2, 2021
  44. vijaydasmp referenced this in commit f0cf08dc7c on Nov 7, 2021
  45. vijaydasmp referenced this in commit e39241e7b2 on Nov 7, 2021
  46. vijaydasmp referenced this in commit f4c049f2f9 on Nov 7, 2021
  47. kittywhiskers referenced this in commit 5ac548f127 on Dec 3, 2021
  48. kittywhiskers referenced this in commit a48a7d8b3c on Dec 4, 2021
  49. kittywhiskers referenced this in commit d61f3da5d1 on Dec 6, 2021
  50. kittywhiskers referenced this in commit 5d293646b4 on Dec 8, 2021
  51. kittywhiskers referenced this in commit 87915f4e68 on Dec 8, 2021
  52. kittywhiskers referenced this in commit 894dc02b14 on Dec 8, 2021
  53. kittywhiskers referenced this in commit 15d363a4b7 on Dec 11, 2021
  54. kittywhiskers referenced this in commit ab34959eb0 on Dec 12, 2021
  55. kittywhiskers referenced this in commit 399d8b3ddc on Dec 12, 2021
  56. kittywhiskers referenced this in commit f00d5d3b37 on Dec 12, 2021
  57. kittywhiskers referenced this in commit eecc714414 on Dec 12, 2021
  58. kittywhiskers referenced this in commit 254f45a4f7 on Dec 12, 2021
  59. kittywhiskers referenced this in commit 3284d82296 on Dec 12, 2021
  60. DrahtBot locked this on Dec 16, 2021

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: 2024-11-17 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me