0

Note this is not duplicate of Is there a way to change the wallet.dat location without changing the entire data directory?

I want to change wallet.dat file location. From the above link it seems to be impossible. But is there any way i can update wallet file location in bitcoin source code https://github.com/bitcoin/bitcoin and run make command to make it executable. Here is the reason why i want to do this: https://serverfault.com/questions/888293/share-a-file-between-aws-servers

I want to share a common wallet.dat file between two server.

8
  • 2
    You should not share a wallet.dat file between two servers. It may not even work and may result in wallet corruption and loss of funds. If you are planning on having the two instances open the same wallet file, that is not allowed. BDB (the database system used by Bitcoin Core) does not allow a database to be opened by multiple software simultaneously. If you are somehow able to do so, you can corrupt your wallet.
    – Andrew Chow
    Dec 15, 2017 at 14:20
  • 1
    Furthermore, even if the wallet file is not accessed simultaneously, the two nodes will have different sync states which will result in the software being confused and potentially have to rescan every time you start up one of the nodes. It may also have other issues.
    – Andrew Chow
    Dec 15, 2017 at 14:20
  • @AndrewChow Thanks for your comment. What about if i run bitcoin core in server 1 and access server 1's bitcore core in server 2 to run get balance and sendToAddress method. will this create any consistency issue. I am using amazon load balancer under this i have these two server. If user make request simultaneously will there is any chance of consistency issue. Is there is any synchronization mechanism implemented in bitcore core to handle situation like this.
    – Ajit Soman
    Dec 15, 2017 at 17:22
  • 1
    Yes, that is correct.
    – Andrew Chow
    Dec 15, 2017 at 19:11
  • 1
    It should be able to handle all of that in a thread safe manner as Bitcoind has locking mechanisms to ensure consistency with concurrent operations. However note that with that many RPC calls, bitcoind may not respond to all of them in a timely manner (some may timeout because locks are held by an operation elsewhere).
    – Andrew Chow
    Dec 16, 2017 at 5:37

1 Answer 1

1

Just wait for the next Bitcoin Core release. They've already implemented -walletdir: https://github.com/bitcoin/bitcoin/commit/0530ba0eae147563921b162ed05347234d8b53c0

https://github.com/bitcoin/bitcoin/pull/11466

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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