Be consistent in calling transactions “replaceable” for Opt-In RBF #10698

pull TheBlueMatt wants to merge 3 commits into bitcoin:master from TheBlueMatt:2017-06-replaceable-rpc-args changing 4 files +13 −11
  1. TheBlueMatt commented at 9:59 pm on June 28, 2017: member

    Thanks to @morcos and @luke-jr for pointing out that we were massively inconsistent between RPCs on IRC.

    Note that none of these have been in a release, except “replaceable”, which has been used in wallet tx descriptions in RPCs in 0.14.2, at least. Hence why I stuck with “replaceable” for all of them.

    Also adds the missing named-argument option for createrawtransaction.

  2. luke-jr changes_requested
  3. luke-jr commented at 10:05 pm on June 28, 2017: member

    NACK, this breaks API compatibility with Knots for no reason. replacable also gives a false sense of other transactions not being replacable (which they are).

    opt_into_rbf seems to be the sensible name, so use that and just provide backward compatibility aliases.

  4. TheBlueMatt commented at 10:11 pm on June 28, 2017: member

    We do not have a framework for backwards compatibility aliases (but if you want to add one, feel free, dont think its worth doing for Knots, but we may need it at some point).

    It is important to be consistent, and we use replaceable elsewhere in 0.14, so we should stick with that IMO, if folks want to paint the shed “opt_into_rbf”, I’d be ok with that too.

  5. TheBlueMatt commented at 10:11 pm on June 28, 2017: member
    This should likely be tagged 0.15.
  6. luke-jr commented at 10:19 pm on June 28, 2017: member
    Yes we do. See getblock’s “verbosity” aka “verbose” param.
  7. TheBlueMatt commented at 10:22 pm on June 28, 2017: member
    Ahh, didnt realize that, alright, well then its a super simple patch for Knots to carry to keep backwards compat with itself, no need to upstream it :).
  8. gmaxwell commented at 10:36 pm on June 28, 2017: contributor
    in terms of the “other things arn’t” – this is why the list transaction output calls it BIP125 replaceable.
  9. luke-jr commented at 10:41 pm on June 28, 2017: member
    @TheBlueMatt The default should be compatibility. There is no reason to be incompatible.
  10. TheBlueMatt force-pushed on Jun 28, 2017
  11. TheBlueMatt commented at 10:45 pm on June 28, 2017: member
    @gmaxwell Good point, updated the docs to point to BIP 125. @luke Indeed, compatibility is the default, but that does not override the legitimate reason that we should be consistent in our naming, and I’m really not at all convinced that compatibility with previous unreleased code is really much of a preference.
  12. luke-jr commented at 11:16 pm on June 28, 2017: member
    @TheBlueMatt Yes, we should be consistent, but compatibility doesn’t interfere in this at all. It’s not unreleased code; it’s been part of Knots for several releases now.
  13. jonasschnelli commented at 6:25 am on June 29, 2017: contributor

    I generally think this change makes sense… though I’m worried about the API break. Users/apps calling RPC with the then invalid optintorbf will not even get a notice that this has been deprecated/nuked, leading to the fact, that this could harm businesses. Same could be true for the startup argument.

    This is why I’m not sure if this is a “hard” improvement. Ideally, we deprecate the old parameter first while we introduce the new one… but this is maybe an overkill.

    Keeping it as it is right now seems for me the safest path (it’s just wording).

    If we go with this PR, then it would certainly require a release-notes part.

  14. in src/rpc/rawtransaction.cpp:322 in 8917ec6a30 outdated
    317@@ -318,7 +318,8 @@ UniValue createrawtransaction(const JSONRPCRequest& request)
    318             "      ,...\n"
    319             "    }\n"
    320             "3. locktime                  (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs\n"
    321-            "4. optintorbf                (boolean, optional, default=false) Allow this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.\n"
    322+            "4. replaceable               (boolean, optional, default=false) Marks this transaction as BIP125 replaceable.\n"
    323+            "                             Allowing this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible.\n"
    


    jnewbery commented at 11:14 am on June 29, 2017:
    I think Allow or Allows is better than Allowing.
  15. in src/wallet/rpcwallet.cpp:2659 in 8917ec6a30 outdated
    2654@@ -2655,7 +2655,8 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
    2655                             "                              Those recipients will receive less bitcoins than you enter in their corresponding amount field.\n"
    2656                             "                              If no outputs are specified here, the sender pays the fee.\n"
    2657                             "                                  [vout_index,...]\n"
    2658-                            "     \"optIntoRbf\"             (boolean, optional) Allow this transaction to be replaced by a transaction with higher fees\n"
    2659+                            "     \"replaceable\"            (boolean, optional) Marks this transaction as BIP125 replaceable.\n"
    2660+                            "                              Allowing this transaction to be replaced by a transaction with higher fees\n"
    


    jnewbery commented at 11:15 am on June 29, 2017:
    as above - prefer Allow over Allowing.
  16. jnewbery approved
  17. jnewbery commented at 11:17 am on June 29, 2017: member

    ACK.

    though I’m worried about the API break.

    This isn’t an API break. These arguments are not yet in a release. We should change them to be consistent before v0.15 is released.

    If we go with this PR, then it would certainly require a release-notes part.

    Yes - since these are new arguments.

  18. laanwj commented at 12:32 pm on June 29, 2017: member

    Concept ACK (we’ve discussed this on IRC)

    Note that none of these have been in a release, except “replaceable”, which has been used in wallet tx descriptions in RPCs in 0.14.2, at least. Hence why I stuck with “replaceable” for all of them.

    This means that we’re in time to fix this. Breaking compatiblity is a non-issue for things that haven’t been in a release. Everything in master should be considered unstable from an API point of view.

    it’s been part of Knots for several releases now.

    I’m sorry, but we really can’t take into account the release schedule of derived projects. By taking on patches that aren’t in a release yet, you risk later incompatibility.

  19. jonasschnelli commented at 12:50 pm on June 29, 2017: contributor

    This means that we’re in time to fix this. Breaking compatiblity is a non-issue for things that haven’t been in a release. Everything in master should be considered unstable from an API point of view.

    Ah. Yes. I though we have released the RBF opt-in argument in createrawtransaction and fundrawtransaction. But right, we haven’t so there is no API break. Sorry for the noise.

  20. luke-jr commented at 2:17 am on July 5, 2017: member

    I’m sorry, but we really can’t take into account the release schedule of derived projects. By taking on patches that aren’t in a release yet, you risk later incompatibility.

    If there was an argument for being incompatible, maybe, but when it is reasonable to be compatible, compatibility should be preferred. In this case, there is zero harm or overhead from being compatible, and opt_into_rbf is the clearer param name anyway.

    NACK without that.

  21. jnewbery commented at 10:30 am on July 5, 2017: member

    We do not have a framework for backwards compatibility aliases

    Yes we do. See getblock’s “verbosity” aka “verbose” param.

    I wasn’t aware of this, so I tried it out:

    0→ bitcoin-cli -named getblock blockhash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 verbose=true
    1error code: -1
    2error message:
    3JSON value is not a boolean as expected
    4
    5→ bitcoin-cli -named getblock blockhash=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206 verbosity=true
    6{
    7  "hash": "0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206",
    8...
    

    Seems like the implementation for getblock with verbose argument has been broken in bitcoin-cli since #8704. Should be an easy fix, but it’s a subtle bug and a good example of why being tricksy with aliases and arguments is probably a bad idea.

  22. morcos commented at 3:24 pm on July 5, 2017: member
    utACK
  23. Use "replaceable" instead of "optintorbf" in createrawtransaction.
    To be consistent with other places (and add the missing named
    args entry for it).
    928c6811f2
  24. Use "replaceable" instead of "optIntoRbf" in fundrawtransaction.
    To be consistent with other RPCs
    fb915d5b18
  25. Use "replaceable" instead of "rbfoptin" in bitcoin-tx.
    To be consistent with RPC naming
    73c942ecd3
  26. TheBlueMatt force-pushed on Jul 5, 2017
  27. TheBlueMatt commented at 10:11 pm on July 5, 2017: member
    Changed “Allowing"s to “Allows” as requested by @jnewbery.
  28. laanwj commented at 6:38 pm on July 6, 2017: member
    utACK 73c942e, this fixes one of the issues found by #10753.
  29. laanwj merged this on Jul 6, 2017
  30. laanwj closed this on Jul 6, 2017

  31. laanwj referenced this in commit 5af6572534 on Jul 6, 2017
  32. MarcoFalke referenced this in commit 4ae6d0fbef on Aug 24, 2017
  33. MarcoFalke referenced this in commit 7fcd61b261 on Sep 13, 2017
  34. PastaPastaPasta referenced this in commit f524b78783 on Sep 19, 2019
  35. PastaPastaPasta referenced this in commit 78c04e8126 on Sep 23, 2019
  36. PastaPastaPasta referenced this in commit 94b9944a06 on Sep 24, 2019
  37. PastaPastaPasta referenced this in commit 095eb5d1cf on Sep 24, 2019
  38. codablock referenced this in commit 1adc2001a8 on Sep 24, 2019
  39. PastaPastaPasta referenced this in commit 7085b31845 on Dec 21, 2019
  40. PastaPastaPasta referenced this in commit e411886030 on Jan 2, 2020
  41. PastaPastaPasta referenced this in commit a14339e4f4 on Jan 4, 2020
  42. PastaPastaPasta referenced this in commit eb4fece37d on Jan 4, 2020
  43. PastaPastaPasta referenced this in commit c442648c19 on Jan 10, 2020
  44. PastaPastaPasta referenced this in commit 55d0336348 on Jan 10, 2020
  45. PastaPastaPasta referenced this in commit 3ca3c65897 on Jan 10, 2020
  46. PastaPastaPasta referenced this in commit 872204e0a2 on Jan 12, 2020
  47. barrystyle referenced this in commit e8bcd62ce1 on Jan 22, 2020
  48. ckti referenced this in commit f18f4dc2bf on Mar 28, 2021
  49. DrahtBot locked this on Sep 8, 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-07-06 07:12 UTC

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