Bitcoin Forum
December 06, 2016, 12:13:34 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: sharing block chain  (Read 2292 times)
Steve
Hero Member
*****
Offline Offline

Activity: 868



View Profile WWW
May 07, 2012, 04: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).

(gasteve on IRC) Does your website accept cash? https://bitpay.com
1481026414
Hero Member
*
Offline Offline

Posts: 1481026414

View Profile Personal Message (Offline)

Ignore
1481026414
Reply with quote  #2

1481026414
Report to moderator
1481026414
Hero Member
*
Offline Offline

Posts: 1481026414

View Profile Personal Message (Offline)

Ignore
1481026414
Reply with quote  #2

1481026414
Report to moderator
1481026414
Hero Member
*
Offline Offline

Posts: 1481026414

View Profile Personal Message (Offline)

Ignore
1481026414
Reply with quote  #2

1481026414
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481026414
Hero Member
*
Offline Offline

Posts: 1481026414

View Profile Personal Message (Offline)

Ignore
1481026414
Reply with quote  #2

1481026414
Report to moderator
1481026414
Hero Member
*
Offline Offline

Posts: 1481026414

View Profile Personal Message (Offline)

Ignore
1481026414
Reply with quote  #2

1481026414
Report to moderator
deepceleron
Legendary
*
Offline Offline

Activity: 1470



View Profile WWW
May 07, 2012, 05: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.

MoonShadow
Legendary
*
Offline Offline

Activity: 1666



View Profile
May 07, 2012, 05: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.

"The powers of financial capitalism had another far-reaching aim, nothing less than to create a world system of financial control in private hands able to dominate the political system of each country and the economy of the world as a whole. This system was to be controlled in a feudalist fashion by the central banks of the world acting in concert, by secret agreements arrived at in frequent meetings and conferences. The apex of the systems was to be the Bank for International Settlements in Basel, Switzerland, a private bank owned and controlled by the world's central banks which were themselves private corporations. Each central bank...sought to dominate its government by its ability to control Treasury loans, to manipulate foreign exchanges, to influence the level of economic activity in the country, and to influence cooperative politicians by subsequent economic rewards in the business world."

- Carroll Quigley, CFR member, mentor to Bill Clinton, from 'Tragedy And Hope'
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428


Core Armory Developer


View Profile WWW
May 07, 2012, 08: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

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
lazyranma
Newbie
*
Offline Offline

Activity: 14


View Profile
May 08, 2012, 07: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.
Steve
Hero Member
*****
Offline Offline

Activity: 868



View Profile WWW
May 09, 2012, 04: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.

(gasteve on IRC) Does your website accept cash? https://bitpay.com
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!