Skip to content

Conversation

jnewbery
Copy link
Contributor

@jnewbery jnewbery commented Aug 11, 2017

Deprecates estimatefee in v0.16, for final removal in v0.17.

This commit introduces a phased removal of RPC methods. RPC method is
disabled by default in version x, but can be enabled by using the
-deprecatedrpc=<methodname> argument. RPC method is removed entirely in version
(x+1).

This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

This is a more generic version of the approach I tried to use in #10841, which too late to make it into v0.15.

@jnewbery jnewbery force-pushed the deprecate_estimatefee branch from 052a98c to d301afe Compare August 11, 2017 17:48
@jnewbery
Copy link
Contributor Author

This could be made even more generic by adding additional deprecated field to the CRPCTable. That way the IsDeprecatedRPCEnabled() call could be added to the dispatcher instead of the individual RPC functions, and the help text could show methods as DEPRECATED. I didn't think that was worth doing for just this one RPC method.

@morcos
Copy link
Contributor

morcos commented Aug 11, 2017

Concept ACK

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.

Mixed feelings about adding a option to enable individual methods. Why not one option to enable all existing deprecated methods?

In any case, I would split the code in 2 commits: 1st add support for the new argument; 2nd make estimatefee deprecated. In the 2nd commit there should be a functional test for the new RPC error.

src/init.cpp Outdated
@@ -441,6 +441,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-checkmempool=<n>", strprintf("Run checks every <n> transactions (default: %u)", defaultChainParams->DefaultConsistencyChecks()));
strUsage += HelpMessageOpt("-checkpoints", strprintf("Disable expensive verification for known chain history (default: %u)", DEFAULT_CHECKPOINTS_ENABLED));
strUsage += HelpMessageOpt("-disablesafemode", strprintf("Disable safemode, override a real safe mode event (default: %u)", DEFAULT_DISABLE_SAFEMODE));
strUsage += HelpMessageOpt("-enablerpcmethod", "Enables a deprecated RPC method");
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing validation for this argument?

Copy link
Contributor

@promag promag Aug 11, 2017

Choose a reason for hiding this comment

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

Argument should mention it is a deprecated method? Like -enabledeprecated=...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think enablerpcmethod is already clear, especially since this is a hidden option and the help text explains that it's used for enabling a deprecated method.

I don't think there's validation for any of our arguments.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes there is, don't recall exactly which.

Copy link

@dsirotkin256 dsirotkin256 Aug 12, 2017

Choose a reason for hiding this comment

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

Would be nice to have a list of deprecated RPC methods with enabled flag

Copy link
Contributor

Choose a reason for hiding this comment

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

With validation you force to clean outdated enablerpcmethod from config file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think validating arguments is the norm. If I'm wrong, please point out where in the code this happens.

I'd definitely concept ACK a PR for better validating of command line arguments in general (for example, warning if a user tries setting an argument that doesn't exist, to catch mis-spellings).

This particular argument enablerpcmethod seems to be one where validation is least useful. Users will find out instantly if they didn't enable the RPC method. Outdated enablerpcmethod arguments are a no-op so are harmless.

Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -790,6 +790,12 @@ UniValue estimatefee(const JSONRPCRequest& request)
+ HelpExampleCli("estimatefee", "6")
);

if (!IsDeprecatedRPCEnabled(std::string("estimatefee"))){
Copy link
Contributor

@promag promag Aug 11, 2017

Choose a reason for hiding this comment

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

Should be before help? Why show the help if it's disabled? Why the explicit std::string()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I initially had this before the help if statement, but the way that help is implemented in server.cpp means that calling help without any arguments calls into every RPC method. Adding the if (!IsDeprecatedRPCEnabled statement before the help if statement breaks that.

You're right that no explicit std::string() is required. Removing.

@@ -387,6 +387,16 @@ void JSONRPCRequest::parse(const UniValue& valRequest)
throw JSONRPCError(RPC_INVALID_REQUEST, "Params must be an array or object");
}

bool IsDeprecatedRPCEnabled(std::string rpc_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

const std::string& method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

{
const std::vector<std::string> enabled_rpcs = gArgs.GetArgs("-enablerpcmethod");

if (find(enabled_rpcs.begin(), enabled_rpcs.end(), rpc_name) != enabled_rpcs.end()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to if:

return find(enabled_rpcs.begin(), enabled_rpcs.end(), rpc_name) != enabled_rpcs.end();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, fixed

@fanquake fanquake modified the milestone: 0.16.0 Aug 12, 2017
@jnewbery jnewbery force-pushed the deprecate_estimatefee branch from d301afe to 9a1c908 Compare August 12, 2017 17:39
@jnewbery
Copy link
Contributor Author

Thanks for the thoughtful review @promag!

Mixed feelings about adding a option to enable individual methods. Why not one option to enable all existing deprecated methods?

The point of this is that it forces action on the user if they want to continue using a deprecated method. In version x they need to explicitly update their config to include -enablerpcmethod=<method>, so they have fair warning of 1 release to update their client software before upgrading to version x+1. If there was a generic enabledeprecatedmethods that they could set and forget, then they might not realise that one of the methods they're using is deprecated, upgrade to version x+1 and find that they have no way to use the method.

In any case, I would split the code in 2 commits: 1st add support for the new argument; 2nd make estimatefee deprecated. In the 2nd commit there should be a functional test for the new RPC error.

Seemed to me like this is a small enough change to not need multiple commits. But I'm happy to split if you think it'll help future reviewers.

Agree that there should be a new functional test.

@jnewbery
Copy link
Contributor Author

Thanks to @mess110 for contributing a functional test to cover the new command line option.

@jnewbery
Copy link
Contributor Author

rebased

@jnewbery jnewbery force-pushed the deprecate_estimatefee branch from 744b99b to dc163bc Compare September 14, 2017 13:54
@jnewbery
Copy link
Contributor Author

rebased and fixed conflict

@TheBlueMatt
Copy link
Contributor

utACK dc163bc

1 similar comment
@jonasschnelli
Copy link
Contributor

utACK dc163bc

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.

utACK.

@@ -789,6 +789,12 @@ UniValue estimatefee(const JSONRPCRequest& request)
+ HelpExampleCli("estimatefee", "6")
);

if (!IsDeprecatedRPCEnabled("estimatefee")){
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing space before {.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@maflcko
Copy link
Member

maflcko commented Sep 17, 2017

utACK dc163bc

Copy link
Member

@instagibbs instagibbs left a comment

Choose a reason for hiding this comment

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

utACK

@@ -0,0 +1,23 @@
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
Copy link
Member

Choose a reason for hiding this comment

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

micronit: 2017

Copy link
Member

Choose a reason for hiding this comment

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

Will be fixed by the "bump copyright headers" script ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was pushing anyone so I fixed this

@jnewbery jnewbery force-pushed the deprecate_estimatefee branch from dc163bc to 4876eea Compare September 18, 2017 20:13
@jnewbery
Copy link
Contributor Author

Updated:

  • fixed nits
  • fixed help text

Old HEAD for this branch is here: https://github.com/jnewbery/bitcoin/releases/tag/pr11031.1

@meshcollider
Copy link
Contributor

meshcollider commented Sep 21, 2017

utACK 4efc831 modulo the rename of the parameter being discussed on IRC

Copy link
Member

@luke-jr luke-jr left a comment

Choose a reason for hiding this comment

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

utACK

@jnewbery jnewbery force-pushed the deprecate_estimatefee branch from 4efc831 to 822ada4 Compare September 21, 2017 19:39
@maflcko
Copy link
Member

maflcko commented Sep 27, 2017

re-utACK 048e0c3 (verified that only the option name changed)

Going to merge this, since some other pulls build on top of this.

@laanwj
Copy link
Member

laanwj commented Sep 27, 2017 via email

@maflcko maflcko merged commit 048e0c3 into bitcoin:master Sep 27, 2017
maflcko pushed a commit that referenced this pull request Sep 27, 2017
048e0c3 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel)
d4cdbd6 [rpc] Deprecate estimatefee RPC (John Newbery)

Pull request description:

  Deprecates estimatefee in v0.16, for final removal in v0.17.

  This commit introduces a phased removal of RPC methods. RPC method is
  disabled by default in version x, but can be enabled by using the
  `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version
  (x+1).

  This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

  This is a more generic version of the approach I tried to use in #10841, which too late to make it into v0.15.

Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
@jnewbery jnewbery deleted the deprecate_estimatefee branch September 27, 2017 13:53
@jtimon
Copy link
Contributor

jtimon commented Sep 27, 2017

posthumous utACK

laanwj added a commit that referenced this pull request Feb 8, 2018
db1cbcc [RPC] Remove deprecated addmultisigaddress return format (John Newbery)
cb28a0b [RPC] Remove deprecated createmultisig object (John Newbery)
ed45c82 [tests] Remove test for deprecated createmultsig option (John Newbery)
d066a1c [rpc] Remove deprecated getmininginfo RPC option (John Newbery)
c6f09c2 [rpc] remove deprecated estimatefee RPC (John Newbery)
a8e437a [tests] Remove estimatefee from rpc_deprecated.py test (John Newbery)
a5623b1 [tests] Remove tests for deprecated estimatefee RPC (John Newbery)
d119f2e [tests] Fix style warnings in feature_fee_estimation.py (John Newbery)

Pull request description:

  There were some RPC/RPC options deprecated in v0.16. Those can now be removed from master since v0.16 has been branched.

  - `estimatefee` RPC has been removed. The `feature_fee_estimation.py` test has been updated to remove the RPC, but doesn't yet have good coverage of the replacement RPC `estimatesmartfee`. Improving the test coverage should be done in a new PR. (#11031)
  - the `errors` field returned by `getmininginfo` has been deprecated and replaced by a `warning` field. (#10858)
  - providing addresses as inputs to `createmultisig` has been deprecated. Users should use `addmultisigaddress` instead (#11415)
  - The return format from `addmultisigaddress` has changed (#11415)

  `getwitnessaddress` was also deprecated in v0.16 and can be removed, but many tests are using that RPC, so it's a larger job to remove. It should be removed in a separate PR (possibly after #11739 and #11398 have been merged and the segwit test code tidied up)

Tree-SHA512: 8ffaa5f6094131339b9e9e468e8b141de4b144697d2271efa2992b80b12eb97849ade3da8df5c1c9400ed4c04e6a029926550a3e5846d2029b644f9e84ac7124
@jnewbery jnewbery mentioned this pull request Oct 3, 2018
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 22, 2019
048e0c3 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel)
d4cdbd6 [rpc] Deprecate estimatefee RPC (John Newbery)

Pull request description:

  Deprecates estimatefee in v0.16, for final removal in v0.17.

  This commit introduces a phased removal of RPC methods. RPC method is
  disabled by default in version x, but can be enabled by using the
  `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version
  (x+1).

  This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

  This is a more generic version of the approach I tried to use in bitcoin#10841, which too late to make it into v0.15.

Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 2, 2020
048e0c3 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel)
d4cdbd6 [rpc] Deprecate estimatefee RPC (John Newbery)

Pull request description:

  Deprecates estimatefee in v0.16, for final removal in v0.17.

  This commit introduces a phased removal of RPC methods. RPC method is
  disabled by default in version x, but can be enabled by using the
  `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version
  (x+1).

  This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

  This is a more generic version of the approach I tried to use in bitcoin#10841, which too late to make it into v0.15.

Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 4, 2020
048e0c3 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel)
d4cdbd6 [rpc] Deprecate estimatefee RPC (John Newbery)

Pull request description:

  Deprecates estimatefee in v0.16, for final removal in v0.17.

  This commit introduces a phased removal of RPC methods. RPC method is
  disabled by default in version x, but can be enabled by using the
  `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version
  (x+1).

  This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

  This is a more generic version of the approach I tried to use in bitcoin#10841, which too late to make it into v0.15.

Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 12, 2020
048e0c3 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel)
d4cdbd6 [rpc] Deprecate estimatefee RPC (John Newbery)

Pull request description:

  Deprecates estimatefee in v0.16, for final removal in v0.17.

  This commit introduces a phased removal of RPC methods. RPC method is
  disabled by default in version x, but can be enabled by using the
  `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version
  (x+1).

  This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

  This is a more generic version of the approach I tried to use in bitcoin#10841, which too late to make it into v0.15.

Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 12, 2020
048e0c3 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel)
d4cdbd6 [rpc] Deprecate estimatefee RPC (John Newbery)

Pull request description:

  Deprecates estimatefee in v0.16, for final removal in v0.17.

  This commit introduces a phased removal of RPC methods. RPC method is
  disabled by default in version x, but can be enabled by using the
  `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version
  (x+1).

  This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

  This is a more generic version of the approach I tried to use in bitcoin#10841, which too late to make it into v0.15.

Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 12, 2020
048e0c3 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel)
d4cdbd6 [rpc] Deprecate estimatefee RPC (John Newbery)

Pull request description:

  Deprecates estimatefee in v0.16, for final removal in v0.17.

  This commit introduces a phased removal of RPC methods. RPC method is
  disabled by default in version x, but can be enabled by using the
  `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version
  (x+1).

  This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

  This is a more generic version of the approach I tried to use in bitcoin#10841, which too late to make it into v0.15.

Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 12, 2020
048e0c3 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel)
d4cdbd6 [rpc] Deprecate estimatefee RPC (John Newbery)

Pull request description:

  Deprecates estimatefee in v0.16, for final removal in v0.17.

  This commit introduces a phased removal of RPC methods. RPC method is
  disabled by default in version x, but can be enabled by using the
  `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version
  (x+1).

  This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

  This is a more generic version of the approach I tried to use in bitcoin#10841, which too late to make it into v0.15.

Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 12, 2020
048e0c3 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel)
d4cdbd6 [rpc] Deprecate estimatefee RPC (John Newbery)

Pull request description:

  Deprecates estimatefee in v0.16, for final removal in v0.17.

  This commit introduces a phased removal of RPC methods. RPC method is
  disabled by default in version x, but can be enabled by using the
  `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version
  (x+1).

  This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

  This is a more generic version of the approach I tried to use in bitcoin#10841, which too late to make it into v0.15.

Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 9, 2020
db1cbcc [RPC] Remove deprecated addmultisigaddress return format (John Newbery)
cb28a0b [RPC] Remove deprecated createmultisig object (John Newbery)
ed45c82 [tests] Remove test for deprecated createmultsig option (John Newbery)
d066a1c [rpc] Remove deprecated getmininginfo RPC option (John Newbery)
c6f09c2 [rpc] remove deprecated estimatefee RPC (John Newbery)
a8e437a [tests] Remove estimatefee from rpc_deprecated.py test (John Newbery)
a5623b1 [tests] Remove tests for deprecated estimatefee RPC (John Newbery)
d119f2e [tests] Fix style warnings in feature_fee_estimation.py (John Newbery)

Pull request description:

  There were some RPC/RPC options deprecated in v0.16. Those can now be removed from master since v0.16 has been branched.

  - `estimatefee` RPC has been removed. The `feature_fee_estimation.py` test has been updated to remove the RPC, but doesn't yet have good coverage of the replacement RPC `estimatesmartfee`. Improving the test coverage should be done in a new PR. (bitcoin#11031)
  - the `errors` field returned by `getmininginfo` has been deprecated and replaced by a `warning` field. (bitcoin#10858)
  - providing addresses as inputs to `createmultisig` has been deprecated. Users should use `addmultisigaddress` instead (bitcoin#11415)
  - The return format from `addmultisigaddress` has changed (bitcoin#11415)

  `getwitnessaddress` was also deprecated in v0.16 and can be removed, but many tests are using that RPC, so it's a larger job to remove. It should be removed in a separate PR (possibly after bitcoin#11739 and bitcoin#11398 have been merged and the segwit test code tidied up)

Tree-SHA512: 8ffaa5f6094131339b9e9e468e8b141de4b144697d2271efa2992b80b12eb97849ade3da8df5c1c9400ed4c04e6a029926550a3e5846d2029b644f9e84ac7124
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 9, 2020
db1cbcc [RPC] Remove deprecated addmultisigaddress return format (John Newbery)
cb28a0b [RPC] Remove deprecated createmultisig object (John Newbery)
ed45c82 [tests] Remove test for deprecated createmultsig option (John Newbery)
d066a1c [rpc] Remove deprecated getmininginfo RPC option (John Newbery)
c6f09c2 [rpc] remove deprecated estimatefee RPC (John Newbery)
a8e437a [tests] Remove estimatefee from rpc_deprecated.py test (John Newbery)
a5623b1 [tests] Remove tests for deprecated estimatefee RPC (John Newbery)
d119f2e [tests] Fix style warnings in feature_fee_estimation.py (John Newbery)

Pull request description:

  There were some RPC/RPC options deprecated in v0.16. Those can now be removed from master since v0.16 has been branched.

  - `estimatefee` RPC has been removed. The `feature_fee_estimation.py` test has been updated to remove the RPC, but doesn't yet have good coverage of the replacement RPC `estimatesmartfee`. Improving the test coverage should be done in a new PR. (bitcoin#11031)
  - the `errors` field returned by `getmininginfo` has been deprecated and replaced by a `warning` field. (bitcoin#10858)
  - providing addresses as inputs to `createmultisig` has been deprecated. Users should use `addmultisigaddress` instead (bitcoin#11415)
  - The return format from `addmultisigaddress` has changed (bitcoin#11415)

  `getwitnessaddress` was also deprecated in v0.16 and can be removed, but many tests are using that RPC, so it's a larger job to remove. It should be removed in a separate PR (possibly after bitcoin#11739 and bitcoin#11398 have been merged and the segwit test code tidied up)

Tree-SHA512: 8ffaa5f6094131339b9e9e468e8b141de4b144697d2271efa2992b80b12eb97849ade3da8df5c1c9400ed4c04e6a029926550a3e5846d2029b644f9e84ac7124
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 10, 2020
db1cbcc [RPC] Remove deprecated addmultisigaddress return format (John Newbery)
cb28a0b [RPC] Remove deprecated createmultisig object (John Newbery)
ed45c82 [tests] Remove test for deprecated createmultsig option (John Newbery)
d066a1c [rpc] Remove deprecated getmininginfo RPC option (John Newbery)
c6f09c2 [rpc] remove deprecated estimatefee RPC (John Newbery)
a8e437a [tests] Remove estimatefee from rpc_deprecated.py test (John Newbery)
a5623b1 [tests] Remove tests for deprecated estimatefee RPC (John Newbery)
d119f2e [tests] Fix style warnings in feature_fee_estimation.py (John Newbery)

Pull request description:

  There were some RPC/RPC options deprecated in v0.16. Those can now be removed from master since v0.16 has been branched.

  - `estimatefee` RPC has been removed. The `feature_fee_estimation.py` test has been updated to remove the RPC, but doesn't yet have good coverage of the replacement RPC `estimatesmartfee`. Improving the test coverage should be done in a new PR. (bitcoin#11031)
  - the `errors` field returned by `getmininginfo` has been deprecated and replaced by a `warning` field. (bitcoin#10858)
  - providing addresses as inputs to `createmultisig` has been deprecated. Users should use `addmultisigaddress` instead (bitcoin#11415)
  - The return format from `addmultisigaddress` has changed (bitcoin#11415)

  `getwitnessaddress` was also deprecated in v0.16 and can be removed, but many tests are using that RPC, so it's a larger job to remove. It should be removed in a separate PR (possibly after bitcoin#11739 and bitcoin#11398 have been merged and the segwit test code tidied up)

Tree-SHA512: 8ffaa5f6094131339b9e9e468e8b141de4b144697d2271efa2992b80b12eb97849ade3da8df5c1c9400ed4c04e6a029926550a3e5846d2029b644f9e84ac7124
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 10, 2020
db1cbcc [RPC] Remove deprecated addmultisigaddress return format (John Newbery)
cb28a0b [RPC] Remove deprecated createmultisig object (John Newbery)
ed45c82 [tests] Remove test for deprecated createmultsig option (John Newbery)
d066a1c [rpc] Remove deprecated getmininginfo RPC option (John Newbery)
c6f09c2 [rpc] remove deprecated estimatefee RPC (John Newbery)
a8e437a [tests] Remove estimatefee from rpc_deprecated.py test (John Newbery)
a5623b1 [tests] Remove tests for deprecated estimatefee RPC (John Newbery)
d119f2e [tests] Fix style warnings in feature_fee_estimation.py (John Newbery)

Pull request description:

  There were some RPC/RPC options deprecated in v0.16. Those can now be removed from master since v0.16 has been branched.

  - `estimatefee` RPC has been removed. The `feature_fee_estimation.py` test has been updated to remove the RPC, but doesn't yet have good coverage of the replacement RPC `estimatesmartfee`. Improving the test coverage should be done in a new PR. (bitcoin#11031)
  - the `errors` field returned by `getmininginfo` has been deprecated and replaced by a `warning` field. (bitcoin#10858)
  - providing addresses as inputs to `createmultisig` has been deprecated. Users should use `addmultisigaddress` instead (bitcoin#11415)
  - The return format from `addmultisigaddress` has changed (bitcoin#11415)

  `getwitnessaddress` was also deprecated in v0.16 and can be removed, but many tests are using that RPC, so it's a larger job to remove. It should be removed in a separate PR (possibly after bitcoin#11739 and bitcoin#11398 have been merged and the segwit test code tidied up)

Tree-SHA512: 8ffaa5f6094131339b9e9e468e8b141de4b144697d2271efa2992b80b12eb97849ade3da8df5c1c9400ed4c04e6a029926550a3e5846d2029b644f9e84ac7124
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 11, 2020
db1cbcc [RPC] Remove deprecated addmultisigaddress return format (John Newbery)
cb28a0b [RPC] Remove deprecated createmultisig object (John Newbery)
ed45c82 [tests] Remove test for deprecated createmultsig option (John Newbery)
d066a1c [rpc] Remove deprecated getmininginfo RPC option (John Newbery)
c6f09c2 [rpc] remove deprecated estimatefee RPC (John Newbery)
a8e437a [tests] Remove estimatefee from rpc_deprecated.py test (John Newbery)
a5623b1 [tests] Remove tests for deprecated estimatefee RPC (John Newbery)
d119f2e [tests] Fix style warnings in feature_fee_estimation.py (John Newbery)

Pull request description:

  There were some RPC/RPC options deprecated in v0.16. Those can now be removed from master since v0.16 has been branched.

  - `estimatefee` RPC has been removed. The `feature_fee_estimation.py` test has been updated to remove the RPC, but doesn't yet have good coverage of the replacement RPC `estimatesmartfee`. Improving the test coverage should be done in a new PR. (bitcoin#11031)
  - the `errors` field returned by `getmininginfo` has been deprecated and replaced by a `warning` field. (bitcoin#10858)
  - providing addresses as inputs to `createmultisig` has been deprecated. Users should use `addmultisigaddress` instead (bitcoin#11415)
  - The return format from `addmultisigaddress` has changed (bitcoin#11415)

  `getwitnessaddress` was also deprecated in v0.16 and can be removed, but many tests are using that RPC, so it's a larger job to remove. It should be removed in a separate PR (possibly after bitcoin#11739 and bitcoin#11398 have been merged and the segwit test code tidied up)

Tree-SHA512: 8ffaa5f6094131339b9e9e468e8b141de4b144697d2271efa2992b80b12eb97849ade3da8df5c1c9400ed4c04e6a029926550a3e5846d2029b644f9e84ac7124
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 11, 2020
db1cbcc [RPC] Remove deprecated addmultisigaddress return format (John Newbery)
cb28a0b [RPC] Remove deprecated createmultisig object (John Newbery)
ed45c82 [tests] Remove test for deprecated createmultsig option (John Newbery)
d066a1c [rpc] Remove deprecated getmininginfo RPC option (John Newbery)
c6f09c2 [rpc] remove deprecated estimatefee RPC (John Newbery)
a8e437a [tests] Remove estimatefee from rpc_deprecated.py test (John Newbery)
a5623b1 [tests] Remove tests for deprecated estimatefee RPC (John Newbery)
d119f2e [tests] Fix style warnings in feature_fee_estimation.py (John Newbery)

Pull request description:

  There were some RPC/RPC options deprecated in v0.16. Those can now be removed from master since v0.16 has been branched.

  - `estimatefee` RPC has been removed. The `feature_fee_estimation.py` test has been updated to remove the RPC, but doesn't yet have good coverage of the replacement RPC `estimatesmartfee`. Improving the test coverage should be done in a new PR. (bitcoin#11031)
  - the `errors` field returned by `getmininginfo` has been deprecated and replaced by a `warning` field. (bitcoin#10858)
  - providing addresses as inputs to `createmultisig` has been deprecated. Users should use `addmultisigaddress` instead (bitcoin#11415)
  - The return format from `addmultisigaddress` has changed (bitcoin#11415)

  `getwitnessaddress` was also deprecated in v0.16 and can be removed, but many tests are using that RPC, so it's a larger job to remove. It should be removed in a separate PR (possibly after bitcoin#11739 and bitcoin#11398 have been merged and the segwit test code tidied up)

Tree-SHA512: 8ffaa5f6094131339b9e9e468e8b141de4b144697d2271efa2992b80b12eb97849ade3da8df5c1c9400ed4c04e6a029926550a3e5846d2029b644f9e84ac7124
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Jun 26, 2021
048e0c3 [rpc] [tests] Add deprecated RPC test (Cristian Mircea Messel)
d4cdbd6 [rpc] Deprecate estimatefee RPC (John Newbery)

Pull request description:

  Deprecates estimatefee in v0.16, for final removal in v0.17.

  This commit introduces a phased removal of RPC methods. RPC method is
  disabled by default in version x, but can be enabled by using the
  `-deprecatedrpc=<methodname>` argument. RPC method is removed entirely in version
  (x+1).

  This gives users fair warning that an RPC is to be removed, and time to change client software if necessary. Deprecation warnings in RPC return values or release notes are easily ignored.

  This is a more generic version of the approach I tried to use in bitcoin#10841, which too late to make it into v0.15.

Tree-SHA512: 9695a600e84b812974387333e4a6805d18972da30befb754e9e4da77cd9815d00c5cc2ee0b0350bdbbdb5fdc6ba47789f8b2c6f5b15c8cd5a1deefcc4832da30
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 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.