简体   繁体   中英

Adding a manually generated private key on bitcoin node

We are hosting a bitcoin node to handle deposits on our website. Now, we generate new addresses on the node via RPC call. The problem is that the client is afraid of losing the private keys in case of server failure for example.

So what I purposed is that we can have a master key and an increment counter to generate any number of private keys from that. With this, we just have to back up the master key and we can re-generate all the private keys again in case we lose data on the server.

The issue here is that the bitcoin node will only notify us about new transactions when the address is generated on the node itself and we cannot modify the way the node generates new addresses.

I have 2 questions:

  1. Am I on the right path?
  2. How can I add the manually generated private keys on the node so that the node will notify me when a new transaction is received on those keys?

Thank you.

bitcoind's wallet already does the "generate keys from a single seed" thing for you. So you could simply make multiple backups of the wallet (see the "backupwallet" RPC method).

However, bitcoins should really not be stored on a website, and if you are handling withdrawls, you really need a much more secure setup in general or you will be robbed.

If you are only taking payments/deposits and not doing withdrawls, it is still inadvisable to allow your website to access the private keys. Instead, maintain a wallet offline, and use the "importaddress" RPC method to maintain a watch-only copy of your "wallet" on the webserver. Be sure before you ship products, that you verify payments with a full node independent of the webserver as well.

Note that no matter where you store your wallet, you should make at least several backups initially, and don't forget to also backup any metadata you need to properly deliver your products/services and minimise your tax liabilities.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM