Author

Topic: sharing block chain (Read 2624 times)

hero member
Activity: 868
Merit: 1007
May 09, 2012, 12:24:23 AM
#6
On btrfs filesystem you can copy data directory with 'cp --reflink'. It will create shared copy-on-write snapshot of data, which can be safely used simultaneously by multiple clients. But new block will be stored separately by each client, so you need to overwrite other copies again with 'cp --reflink' from time to time.
Excellent…I hadn't heard of btrfs until now, but see that it offers similar capabilities to zfs.  I'll have to check it out.
newbie
Activity: 14
Merit: 0
May 08, 2012, 03:52:59 PM
#5
On btrfs filesystem you can copy data directory with 'cp --reflink'. It will create shared copy-on-write snapshot of data, which can be safely used simultaneously by multiple clients. But new block will be stored separately by each client, so you need to overwrite other copies again with 'cp --reflink' from time to time.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
May 07, 2012, 04:24:22 PM
#4
Is there any way with the current Bitcoin-Qt client to share the block chain with multiple wallets?  Ideally I'd like to be able to do that when the multiple wallets are running concurrently.  From looking at the directory structures, about the only way I can see is if you swap out wallet.dat with the desired wallet when you start it up.  I now have about 5 copies of the block chain on my computer…I'm looking for options to consolidate around a single copy of the block chain.

I'd love it if the wallet functions and the client functions could be separated into two different processes.  Another way of solving it would be to enhance the Bitcoin-Qt such that it could manage multiple wallets (even just a feature to open a different wallet.dat file from the file system).

This is one reason why alternative clients have come about ... Smiley
legendary
Activity: 1708
Merit: 1007
May 07, 2012, 01:47:12 PM
#3
The actual blockchain can be shared in a number of different ways, but the database cannot be shared among multiple instances of bitcoind.  On way to make this work on a unix machine is to create read-only symlinks for user level bitcoin daemons that have their own database inside their own shell account, but this would result in massive duplication of work.  Windoze can do it using similar methods over network drives.  I don't think that a multi-user version of bitcoind has been created, but if it has I would doubt that it was safe.
legendary
Activity: 1512
Merit: 1032
May 07, 2012, 01:38:21 PM
#2
Is there any way with the current Bitcoin-Qt client to share the block chain with multiple wallets?  Ideally I'd like to be able to do that when the multiple wallets are running concurrently.  From looking at the directory structures, about the only way I can see is if you swap out wallet.dat with the desired wallet when you start it up.  I now have about 5 copies of the block chain on my computer…I'm looking for options to consolidate around a single copy of the block chain.

I'd love it if the wallet functions and the client functions could be separated into two different processes.  Another way of solving it would be to enhance the Bitcoin-Qt such that it could manage multiple wallets (even just a feature to open a different wallet.dat file from the file system).

In multiple --datadirs you can make a symbolic link to a central blockchain dat and idx file, as long as you don't attempt to run multiple instances of Bitcoin. This may result in transactions being missed, but I believe that one of the recent features added to Bitcoin for wallets to store a "last block seen" pointer so it can rescan from that point if a fully updated blockchain is used will mitigate this (this feature is also useful when restoring wallet backups, etc).

Each copy of Bitcoin would try to open the blockchain file and write to it and update blocks; running multiple Bitcoins accessing the same database file at the same time is not going to work. It is possible to have multiple users access one Berkeley database, but Bitcoin is not going to be aware of other Bitcoin client's write activities, and for the scale of rewrite to support this you might as well just write a multiple-wallet-supporting Bitcoin.
hero member
Activity: 868
Merit: 1007
May 07, 2012, 12:33:53 PM
#1
Is there any way with the current Bitcoin-Qt client to share the block chain with multiple wallets?  Ideally I'd like to be able to do that when the multiple wallets are running concurrently.  From looking at the directory structures, about the only way I can see is if you swap out wallet.dat with the desired wallet when you start it up.  I now have about 5 copies of the block chain on my computer…I'm looking for options to consolidate around a single copy of the block chain.

I'd love it if the wallet functions and the client functions could be separated into two different processes.  Another way of solving it would be to enhance the Bitcoin-Qt such that it could manage multiple wallets (even just a feature to open a different wallet.dat file from the file system).
Jump to: