LearnBitcoin

Bitcoin Dev Archive 2012

separate out blockchain db and wallet to two dirs?

7 messages, 14 Sep 2012. Started by Scott Howard.

grarpamp (3), Scott Howard, Peter Vessenes, Wladimir J. van der Laan, Jeff Garzik

Permalink Original thread on gnusha.org

Scott Howard permalink original

This idea is from a Debian user [1].

What do you think of moving the > 2 GB db to $HOME/.cache/bitcoin and leaving the wallet and other config files in $HOME/.bitcoin? This is so backups can skip the .cache directory and the proposal follows the freedesktop.org XDG Base Directory Specification [2]. Personal info/settings stays in .bitcoin/ and everything that can be rebuilt goes to .cache/bitcoin/ I know users can do a work around and set it up themselves with symlinks, but interested in what you guys think.

Cheers, Scott (Debian Developer but new to bitcoin)

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660286
[2] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
grarpamp in reply to Scott Howard permalink original

I mentioned this somewhere a while ago. It is enough of a sysadmin problem to warrant a feature ticket. Open one on github for it. XDGBDS is not canon. So don't hardcode said paths. All paths should be specifiable in bitcoin the config file, whose location should itself be specifiable on the command line.

Peter Vessenes in reply to grarpamp permalink original

I like this idea, although I would say the blockchain should go in /var/lib/bitcoin by default, right? I'm just a longtime LInux guy, not a formal sysadmin, though.

Peter

On Fri, Sep 14, 2012 at 11:15 AM, grarpamp <grarpamp@gmail•com> wrote:

Quoted text (19 lines)
> I mentioned this somewhere a while ago.
> It is enough of a sysadmin problem to warrant a feature ticket.
> Open one on github for it.
> XDGBDS is not canon. So don't hardcode said paths.
> All paths should be specifiable in bitcoin the config file, whose
> location should itself be specifiable on the command line.
>
>
> ------------------------------------------------------------------------------
> Got visibility?
> Most devs has no idea what their production app looks like.
> Find out how fast your code is with AppDynamics Lite.
> http://ad.doubleclick.net/clk;262219671;13503038;y?
> http://info.appdynamics.com/FreeJavaPerformanceDownload.html
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists•sourceforge•net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
grarpamp in reply to Peter Vessenes permalink original
Quoted text (2 lines)
> I like this idea, although I would say the blockchain should go in /var/lib/bitcoin
> by default, right? I'm just a longtime LInux guy, not a formal sysadmin, though.

Further, bitcoin doesn't allow easy separation of the files without detachdb (off by default), nor does it supply a user agnostic system daemon to do the block processing separately from user wallet ops. So I would suggest until then it remain split up somewhere under .bitcoin rather than in /var or anywhere else.

grarpamp in reply to Peter Vessenes permalink original

Linux typically uses the FHS, which various distros often bastardize: http://www.linuxfoundation.org/collaborate/workgroups/lsb/fhs BSD typically uses the traditional hierarchy, for which admins often add /home and /opt: http://svnweb.freebsd.org/base/head/share/man/man7/hier.7?revision=HEAD&view=markup

You'd have to read them both and decide which camp you're in. https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

Since bitcoin isn't really an X app at it's core, XDG doesn't really apply. http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

Further, bitcoin doesn't allow easy separation of the files without detachdb (off by default), nor does it supply a user agnostic system daemon to do the block processing separately from user wallet ops. So I would suggest until then it remain split up somewhere under .bitcoin rather than in /var or anywhere else.

And when you figure out where I should place my messages in full the first time, please let me know because I obviously need help.

Wladimir J. van der Laan in reply to Scott Howard permalink original

On Fri, Sep 14, 2012 at 3:57 AM, Scott Howard <showard314@gmail•com> wrote:

Quoted text (10 lines)
> This idea is from a Debian user [1].
>
> What do you think of moving the > 2 GB db to $HOME/.cache/bitcoin and
> leaving the wallet and other config files in $HOME/.bitcoin? This is
> so backups can skip the .cache directory and the proposal follows the
> freedesktop.org XDG Base Directory Specification [2]. Personal
> info/settings stays in .bitcoin/ and everything that can be rebuilt
> goes to .cache/bitcoin/ I know users can do a work around and set it
> up themselves with symlinks, but interested in what you guys think.
>

This is currently not feasible due to BerkelyDB limitations. All the databases are within one 'environment', which is necessarily one directory (it can probably be hacked around, but obviously we're really careful).

When LevelDB for the block chain and the custom format for the wallets is introduces, various new configurations will be possible: Multiple wallets, wallet in block chain in separate dirs, etc.

Wladimir

Jeff Garzik in reply to Wladimir J. van der Laan permalink original

On Fri, Sep 14, 2012 at 1:27 AM, Wladimir <laanwj@gmail•com> wrote:

Quoted text (7 lines)
> This is currently not feasible due to BerkelyDB limitations. All the
> databases are within one 'environment', which is necessarily one directory
> (it can probably be hacked around, but obviously we're really careful).
>
> When LevelDB for the block chain and the custom format for the wallets is
> introduces, various new configurations will be possible: Multiple wallets,
> wallet in block chain in separate dirs, etc.

Indeed. See many threads on the forum discussing this... a frequently requested feature.

As Wladimir says, it's a database constraint at the moment.