Bitcoin accounts deprecated?

in #bitcoin7 years ago

Bitcoin Accounts.png

Bitcoin Core API consist of functions allowing for interaction with Bitcoin node. These functions are used by many applications, platforms, exchanges which on daily basis interact with Bitcoin network.

The technology develops and changes in architecture are inevitable. In order to be up to date with the newest version, regular updates are required. Sometimes the update is just matter of choice (but if not done in the longer perspective leads to technical debt), but sometimes it's necessity - the proof of that is update of Bitcoin Core node to version 0.16.3 which was must-have because of security reasons (https://bitcoincore.org/en/2018/09/18/release-0.16.3).

The current Bitcoin Core API consist of few 'accounts' functions, which are marked as deprecated since some time. Let's analyze what can happen when this part of API will be finally removed/changed and what negative effects this can have.

Concept of Bitcoin accounts

The truth is that there is not anything like accounts in Bitcoin technical terminology. Bitcoin as a blockchain is simply just a chain of elements encrypted in the way that ensures the validity of the blockchain. These elements are blocks, transactions, unspent transactions and more, which from the nature of Bitcoin architecture are not assigned to anything like account. Bitcoin relies on the keys and it is important that conceptually keys are not related with anything like account (where the account concept exists for example in Ethereum).

Accounts in Bitcoin Core API

Even if Bitcoin itself doesn't consist of accounts concept, it can be found in the Bitcoin Core API docs (https://bitcoin.org/en/developer-reference). Example:

DeepinScreenshot_select-area_20181113131137.png

This API allows to create accounts associated with the Bitcoin address (public and private keys). Other functions allow sending transaction, checking balance or list received transactions associated with the account. In fact it's the abstraction provided by the API to simplify the interaction and development of applications using Bitcoin.

The functionality is not related with Bitcoin protocol however from development perspective is very useful part of the API. Every application which manages users and Bitcoin addresses (like cryptocurrency exchanges) have to deal with generation of new addresses, checking balances, sending transactions and many more. In fact many applications use this abstraction to simplify development and interaction with Bitcoin.

Nevertheless all the accounts related functions in API are deprecated. It means that these functions can still be used, however it's not recommended. These functions in future can be removed or changed - after all it will be incompatible changes.

DeepinScreenshot_select-area_20181113134516.png

What's interesting the discussion about the accounting system started already some time ago. I found given thread of Bitcoin developers in Github from 2014, talking about changing /complete removal of all acounts features (https://github.com/bitcoin/bitcoin/issues/3816). One of the conclusions of these discussion is that any application should not rely on the accounting system but should implement it by it's own. This is quite strange and misleading statement, because why it should be avoided if it's in the official Bitcoin node API? There is really big probability that if it's part of the official API - it's already used by many applications.

What will happen after incompatible accounts change?

The accounts system is the facade, API provided by the Bitcoin Core. If it would be removed - all accounts related function would be lost, what means that every application which was using it would have to implement it in own way. At the moment developers are discouraged to use accounts functions because all of the result provided by this part of API can be achieved using other functions, however it is more complicated.

How long accounts API will be yet accessible? How it will work after the change? Will it be ever changed? Well it's guessing, however it is probably smart not to use any acounts related functions since the future of it is rather dark.

What to do?

As said before - use API functions which are closer to the Bitcoin architecture. After all accounts are nothing more than description of Bitcoin keys. The accounts layer should be implemented on the top of Bitcoin Core API - becoming independent of the core changes. Checking balances, sending transactions - all of these can be achieved using functions related to transactions, utxo's which are (and on 99.99% will be yet for a long time) the part of Bitcoin technology.

Sort:  

Congratulations @mobycrypt! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!