Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: annie9771 on July 30, 2018, 03:19:04 PM



Title: Which bitcoin core version is best for Merchant website
Post by: annie9771 on July 30, 2018, 03:19:04 PM
Task : to accept and sent payments in bitcoin
Issue : i am using bitcoin-core version 0.16.2 , but i can see many functions are not working e.g

./src/bitcoin-cli  getaccountaddress "annie"
error code: -32
error message:getaccountaddress is deprecated and will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts.


so that's mean everytime on new version we have to change our code ? how to deal with this , please help me


Title: Re: Which bitcoin core version is best for Merchant website
Post by: MadGamer on July 30, 2018, 03:53:05 PM
Start bitcoind with -deprecatedrpc=accounts as they said, that should work.

and to answer your question, no. You won't necessarily need to change your code after each release.


Title: Re: Which bitcoin core version is best for Merchant website
Post by: achow101 on July 30, 2018, 03:55:48 PM
First of all, you are not using Bitcoin Core 0.16.2 because that error is not in Bitcoin Core 0.16.2. It is in the current master branch which is the development branch. That error (along with many other changes), will be in 0.17.

Secondly, you should read the error message. It is telling you that the RPC will be removed in 0.18 and it tells you how to enable it in the version that you are using. That means that, going forward, you should not be using that RPC. This does not mean that every time you upgrade Bitcoin Core that you have to change your code. However, if you are using things that are being deprecated, then yes, you will. That is what deprecation means.

You should not be using the accounts system because it is being removed. That is explicitly being told to you in that error message. You should use something else that is not deprecated.


Title: Re: Which bitcoin core version is best for Merchant website
Post by: annie9771 on July 30, 2018, 04:04:23 PM
i installed bitcoin yesterday,
Start bitcoind with -deprecatedrpc=accounts as they said, that should work.

and to answer your question, no. You won't necessarily need to change your code after each release.
-deprecatedrpc=accounts  can i use this in configuration file ?


Title: Re: Which bitcoin core version is best for Merchant website
Post by: HeRetiK on July 31, 2018, 09:35:05 AM
i installed bitcoin yesterday,
Start bitcoind with -deprecatedrpc=accounts as they said, that should work.

and to answer your question, no. You won't necessarily need to change your code after each release.
-deprecatedrpc=accounts  can i use this in configuration file ?

You can, but you shouldn't. Especially when starting a new project.

Using deprecated functionality is how you build up technical debt and incur problems further down the road (ie. you won't be able to update Bitcoin Core without breaking existing functionality unless you rewrite parts of your app).

I found a post by achow101 on StackExchange that could point you in the right direction:
https://bitcoin.stackexchange.com/questions/70583/question-on-getaccountaddress-getnewaddress-getaddressesbyaccount#70595


Title: Re: Which bitcoin core version is best for Merchant website
Post by: gmaxwell on August 01, 2018, 02:06:59 AM
It is almost completely certain that the accounts functionality does not do what you want and never has, in any case.

Accounts were created to be the backend of a long defunct webwallet service (that lost or ran off with everyone's funds), people often think they do things that they don't, such as act as multiwallet does (or even other things that don't make much sense in Bitcoin like "from addresses").


Title: Re: Which bitcoin core version is best for Merchant website
Post by: MadGamer on August 05, 2018, 07:51:04 AM
It is almost completely certain that the accounts functionality does not do what you want and never has, in any case.

Accounts were created to be the backend of a long defunct webwallet service (that lost or ran off with everyone's funds), people often think they do things that they don't, such as act as multiwallet does (or even other things that don't make much sense in Bitcoin like "from addresses").


In that case, what does this update mean for online wallets? they'll have to shutdown unless they don't upgrade their bitcoind?


Title: Re: Which bitcoin core version is best for Merchant website
Post by: achow101 on August 05, 2018, 04:29:53 PM
In that case, what does this update mean for online wallets? they'll have to shutdown unless they don't upgrade their bitcoind?
No major online wallet uses Bitcoin Core's account system. In fact, no major service uses Bitcoin Core for their wallet. So no, they won't shutdown because they have their own systems for handling wallets and user accounts. Bitcoin Core is typically used solely for block and transaction validation as an edge node in all major services.


Title: Re: Which bitcoin core version is best for Merchant website
Post by: annie9771 on August 06, 2018, 06:20:24 AM
In that case, what does this update mean for online wallets? they'll have to shutdown unless they don't upgrade their bitcoind?
No major online wallet uses Bitcoin Core's account system. In fact, no major service uses Bitcoin Core for their wallet. So no, they won't shutdown because they have their own systems for handling wallets and user accounts. Bitcoin Core is typically used solely for block and transaction validation as an edge node in all major services.

Agreed after reading on google , now i have decided that i will generate offline wallets for users , then i will sign transactions offline and broadcast , any best library for this ?