Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(finally) remove getinfo #10838

Merged
merged 1 commit into from Sep 6, 2017

Conversation

TheBlueMatt
Copy link
Contributor

I see no reason not to have done this in 0.13, let alone for 0.15.

@achow101
Copy link
Member

NACK for 0.15

Although getinfo has been known among Bitcoin Core developers as being deprecated for a long time, it was only documented and marked as deprecated in 0.14. Furthermore, a large number of projects which use the RPC commands rely on getinfo to make sure that the RPC server is available. Thus removing getinfo now would break a lot of things. I think that before we remove getinfo, we need to inform projects that use getinfo that it will be removed and that they need to change to using a different RPC command.

@TheBlueMatt
Copy link
Contributor Author

Really? Didn't realize we only marked it deprecated in 0.14. Ugh, OK :(.

@jnewbery
Copy link
Contributor

This should be rebased on #10841 and merged to master as soon as v0.15 has been cut.

@TheBlueMatt TheBlueMatt reopened this Jul 16, 2017
@TheBlueMatt TheBlueMatt force-pushed the 2017-07-seriously-fuck-getinfo branch from d9bf973 to 59b22ac Compare July 16, 2017 23:30
@TheBlueMatt
Copy link
Contributor Author

OK, rebased on #10841, this should be un-tagged 15 and tagged 16.

@fanquake fanquake modified the milestones: 0.16.0, 0.15.0 Jul 17, 2017
@laanwj
Copy link
Member

laanwj commented Jul 17, 2017

This is way too late for 0.15, it's never a good idea to remove functionality last minute.

@sipa
Copy link
Member

sipa commented Jul 17, 2017

I think it was reopened intended for 0.16

@jnewbery
Copy link
Contributor

#10841 was rejected in favour of #10857, which has now been merged. This should be rebased on master.

@TheBlueMatt TheBlueMatt force-pushed the 2017-07-seriously-fuck-getinfo branch from 59b22ac to 360978c Compare July 24, 2017 15:48
@TheBlueMatt TheBlueMatt changed the title (finally) remove the longest-ever-deprecated RPC call getinfo (finally) remove getinfo Jul 24, 2017
@TheBlueMatt
Copy link
Contributor Author

Rebased on master.

@TheBlueMatt TheBlueMatt force-pushed the 2017-07-seriously-fuck-getinfo branch from 360978c to 3833524 Compare July 25, 2017 18:17
@laanwj
Copy link
Member

laanwj commented Aug 28, 2017

0.15 has been split off, I suppose we can merge this now.
Needs rebase again though.

@TheBlueMatt
Copy link
Contributor Author

Rebased.

@TheBlueMatt TheBlueMatt force-pushed the 2017-07-seriously-fuck-getinfo branch from 3833524 to 98acdc6 Compare August 30, 2017 13:14
@maflcko
Copy link
Member

maflcko commented Aug 30, 2017

Needs silent merge conflict resolved. Also needs mention in the release notes.

The following patch should do:

diff --git a/doc/release-notes.md b/doc/release-notes.md
index aa1d1bea1..197a3aadc 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -56,6 +56,14 @@ frequently tested on them.
 Notable changes
 ===============
 
+RPC changes
+-----------
+
+* The deprecated RPC `getinfo` was removed. It is recommended that the more specific RPCs are used:
+   - `getblockchaininfo`
+   - `getnetworkinfo`
+   - `getwalletinfo`
+
 Credits
 =======
 
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 73ad3bdec..51abe2b25 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -87,7 +87,7 @@ enum class FeeEstimateMode;
 /** (client) version numbers for particular wallet features */
 enum WalletFeature
 {
-    FEATURE_BASE = 10500, // the earliest version new wallets supports (only useful for getinfo's clientversion output)
+    FEATURE_BASE = 10500, // the earliest version new wallets supports (only useful for getwalletinfo's clientversion output)
 
     FEATURE_WALLETCRYPT = 40000, // wallet encryption
     FEATURE_COMPRPUBKEY = 60000, // compressed public keys
diff --git a/test/functional/bitcoin_cli.py b/test/functional/bitcoin_cli.py
index 103320209..ccae7c9a6 100755
--- a/test/functional/bitcoin_cli.py
+++ b/test/functional/bitcoin_cli.py
@@ -16,11 +16,11 @@ class TestBitcoinCli(BitcoinTestFramework):
     def run_test(self):
         """Main test logic"""
 
-        self.log.info("Compare responses from getinfo RPC and `bitcoin-cli getinfo`")
-        cli_get_info = self.nodes[0].cli.getinfo()
-        rpc_get_info = self.nodes[0].getinfo()
+        self.log.info("Compare responses from getwalletinfo RPC and `bitcoin-cli getwalletinfo`")
+        cli_get_wallet_info = self.nodes[0].cli.getwalletinfo()
+        rpc_get_wallet_info = self.nodes[0].getwalletinfo()
 
-        assert_equal(cli_get_info, rpc_get_info)
+        assert_equal(cli_get_wallet_info, rpc_get_wallet_info)
 
 if __name__ == '__main__':
     TestBitcoinCli().main()

@TheBlueMatt
Copy link
Contributor Author

Fixed.

@jnewbery
Copy link
Contributor

jnewbery commented Sep 5, 2017

Needs rebase. A couple comments:

  • why not test all get*info RPC methods in the bitcoin_cli.py test?
  • Need to remove reference to getinfo in the developer notes.

Feel free to take and squash fixup commit here: jnewbery@10da6df

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.

reACK f54f200. I propose to merge this after rebase. No need to have this sitting around and get moldy.

self.log.info("Compare responses from getinfo RPC and `bitcoin-cli getinfo`")
cli_get_info = self.nodes[0].cli.getinfo()
rpc_get_info = self.nodes[0].getinfo()
self.log.info("Compare responses from gewallettinfo RPC and `bitcoin-cli getwalletinfo`")
Copy link
Member

Choose a reason for hiding this comment

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

nit: Wallet with one t.

@TheBlueMatt
Copy link
Contributor Author

Heh, oops, missed that. Fixed now.

@laanwj
Copy link
Member

laanwj commented Sep 6, 2017

Heh, oops, missed that. Fixed now.

@TheBlueMatt you still didn't get the developer-notes change from jnewbery@10da6df

@laanwj laanwj self-assigned this Sep 6, 2017
@TheBlueMatt
Copy link
Contributor Author

Grrr, fixed now.

@promag
Copy link
Member

promag commented Sep 6, 2017

Sorry, missing patch from @MarcoFalke?

@maflcko
Copy link
Member

maflcko commented Sep 6, 2017

(finally) re-utACK aece8a4.

@promag No one writes release notes anyway. I stopped caring.

@laanwj
Copy link
Member

laanwj commented Sep 6, 2017

@promag No one writes release notes anyway. I stopped caring.

Well as you wrote them already it'd make sense to include them.

But yes, people are really lazy with regard to writing release notes. Maybe the reminder issue was a bad idea as it encourages people to delay writing them :)

@laanwj laanwj merged commit aece8a4 into bitcoin:master Sep 6, 2017
laanwj added a commit that referenced this pull request Sep 6, 2017
aece8a4 (finally) remove getinfo in favor of more module-specific infos (Matt Corallo)

Pull request description:

  I see no reason not to have done this in 0.13, let alone for 0.15.

Tree-SHA512: ed3e36f99e9cb90304089e5957ddfbf74141e3e77d850e498e9e45dd8bc1deb9fe36b3fec4c43243023268670a45808de3c23d660df76fa27db6688814c464a5
@jnewbery
Copy link
Contributor

jnewbery commented Sep 6, 2017

Grrr, fixed now.

Huh? Now you've removed the changes to bitcoin_cli.py to test all get*info RPCs. Was that intentional?

@TheBlueMatt
Copy link
Contributor Author

No? The merged commit (aece8a4) has getwalletinfo and getblockchaininfo in it?

@jnewbery
Copy link
Contributor

jnewbery commented Sep 7, 2017

My suggestion in #10838 (comment) was to improve coverage by testing all get*info RPCs and also update the developer notes. I included a link to a commit that improved test coverage and made the test code more compact and readable.

No big deal. It was a suggestion, but this PR is fine as is. Post-commit ACK.

@maflcko
Copy link
Member

maflcko commented Sep 7, 2017

@jnewbery If it is worth it, just submit a pull for it.

@jnewbery
Copy link
Contributor

jnewbery commented Sep 7, 2017

@MarcoFalke it's not worth a PR

@TheBlueMatt
Copy link
Contributor Author

@jnewbery ah, ok, someone linked toa different version of that that only tested 2 of the get*infos and I took that one instead, sorry I missed the full version.

@promag
Copy link
Member

promag commented Sep 8, 2017

Well as you wrote them already it'd make sense to include them.

But yes, people are really lazy with regard to writing release notes. Maybe the reminder issue was a bad idea as it encourages people to delay writing them :)

IMO release notes should be on the same level as source code. If a patch raises releases notes then those belong to that patch and should be reviewed, fixed, etc..

@maflcko
Copy link
Member

maflcko commented Sep 10, 2017

If a patch raises releases notes then those belong to that patch and should be reviewed, fixed, etc..

Agree. I've been mentioning that in pulls and tagged some with the 'Needs release notes' badge. Usually it has been left ignored.

PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 23, 2019
aece8a4 (finally) remove getinfo in favor of more module-specific infos (Matt Corallo)

Pull request description:

  I see no reason not to have done this in 0.13, let alone for 0.15.

Tree-SHA512: ed3e36f99e9cb90304089e5957ddfbf74141e3e77d850e498e9e45dd8bc1deb9fe36b3fec4c43243023268670a45808de3c23d660df76fa27db6688814c464a5
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 24, 2019
aece8a4 (finally) remove getinfo in favor of more module-specific infos (Matt Corallo)

Pull request description:

  I see no reason not to have done this in 0.13, let alone for 0.15.

Tree-SHA512: ed3e36f99e9cb90304089e5957ddfbf74141e3e77d850e498e9e45dd8bc1deb9fe36b3fec4c43243023268670a45808de3c23d660df76fa27db6688814c464a5
codablock added a commit to codablock/dash that referenced this pull request Sep 24, 2019
This allows further backports while postponing removal of "getinfo"
barrystyle pushed a commit to PACGlobalOfficial/PAC that referenced this pull request Jan 22, 2020
This allows further backports while postponing removal of "getinfo"
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Feb 13, 2020
aece8a4 (finally) remove getinfo in favor of more module-specific infos (Matt Corallo)

Pull request description:

  I see no reason not to have done this in 0.13, let alone for 0.15.

Tree-SHA512: ed3e36f99e9cb90304089e5957ddfbf74141e3e77d850e498e9e45dd8bc1deb9fe36b3fec4c43243023268670a45808de3c23d660df76fa27db6688814c464a5
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Feb 27, 2020
aece8a4 (finally) remove getinfo in favor of more module-specific infos (Matt Corallo)

Pull request description:

  I see no reason not to have done this in 0.13, let alone for 0.15.

Tree-SHA512: ed3e36f99e9cb90304089e5957ddfbf74141e3e77d850e498e9e45dd8bc1deb9fe36b3fec4c43243023268670a45808de3c23d660df76fa27db6688814c464a5
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Feb 27, 2020
aece8a4 (finally) remove getinfo in favor of more module-specific infos (Matt Corallo)

Pull request description:

  I see no reason not to have done this in 0.13, let alone for 0.15.

Tree-SHA512: ed3e36f99e9cb90304089e5957ddfbf74141e3e77d850e498e9e45dd8bc1deb9fe36b3fec4c43243023268670a45808de3c23d660df76fa27db6688814c464a5
@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.

None yet

10 participants