0

Currently I have been faced with a problem from the update of Bitcoin Core. As you may know, in the recent update, Bitcoin Core deprecated the concept of account belonging to each node. Hence, I cannot set the parameter of 'from account' or 'from address' for the coin flow tracking any longer, when I use the Bitcoin Core API methods (i.e. sendmany, sendfrom, sendtoaddress) to control Bitcoin cryptocurrency assets. The problem stems from here. I have been implementing a service as a sort of Bitcoin escrow system, operating an individual Bitcoin Core node within it. Each user of my service takes each address, and the user addresses belong to each individual account, and the accounts belong to the Bitcoin Core node of my service. But, as the account got deprecated in the recent update, now I may not specify a certain user address under my service node and manage the asset therein. The problem is, for instance, when I call sendmany method to send BTC 1 out of my service node, the asset distributed in the user addresses of my service would be randomly reducedand the total reduction volume should be BTC 1. In other words, I cannot extract the BTC 1 certainly from the targeted user address whose owner should have used our service to pay for something worth BTC 1, and the burden of BTC outflow shall be shared for all. Furthermore, as the sendfrom method has been also deprecated, I cannot specify a user of my service to manage his or her BTC asset stored in the given wallet address. The solution I'm considering now─and temporarily using─is, setting a database system to manage the inflow and outflow of the node and the user asset. i.e., I can specify and manage each user and his or her asset in the wallet address only via the database (e.g. mySQL), and when another participant out of my service finds our small service network, it would only be identified as a single node, controlling an asset package stored in one storage. I mean, my service node shall be a minimized Bitcoin bank for the service. However, I want to ask your help, for me to find another way to identify each user and manage the asset in terms of each address. I don't want to let my little database be the only dominator to manage the user information, as the implementation of such database might result in a serious security problem. I want to identify each user, the address, and the existing asset therein only via Bitcoin Core protocol and the API defined in RPC.

Please give me some advice if you have any.

Sincerely,

3

The problem is, for instance, when I call sendmany method to send BTC 1 out of my service node, the asset distributed in the user addresses of my service would be randomly reducedand the total reduction volume should be BTC 1. In other words, I cannot extract the BTC 1 certainly from the targeted user address whose owner should have used our service to pay for something worth BTC 1, and the burden of BTC outflow shall be shared for all.

It never did this in the first place. The "from account" never did what you described; it did not select coins from addresses belonging to that account. Rather what it did was it would select coins from the entire wallet (so "from" all accounts) and the resulting transaction would say that it was reducing the "from account"'s balance. At no point in time did the "from account" parameter effect what coins were being selected.

If you truly want user address separation, you can use the multiwallet feature where each user has their own wallet file with its own keypool, private keys, transactions, etc.

  • did you find a solution besides multiwallet? After updating to v0.18.0 we are encountering several issues regarding address balances after a send tx... receiving is no problem as v18.0 allows sendtoaddress. – Stefan N. Jul 25 at 14:05
  • Bitcoin Core never supported "address balances", so whatever you're trying, it's probably not that. – Pieter Wuille Jul 26 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.