public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Simon Liu <simon@bitcartel•com>
To: Luke Dashjr <luke@dashjr•org>, telemaco <telemaco@neomailbox•net>
Cc: bitcoin-dev@lists•linuxfoundation.org
Subject: Re: [bitcoin-dev] [patch] Switching Bitcoin Core to sqlite db
Date: Thu, 29 Oct 2015 20:04:19 -0700	[thread overview]
Message-ID: <5632DE33.7030600@bitcartel.com> (raw)
In-Reply-To: <201510290803.52734.luke@dashjr.org>

Storage of UTXO data looks like an implementation detail and thus one
would have thought that the choice of database would not increase the
odds of consensus protocol failure.

Btcd, a full node implementation written in Go, already provides a
database interface which supports different backends:

https://github.com/btcsuite/btcd/tree/master/database

Given that UTXO storage is considered critical, it seems reasonable to
let a node operator decide for themselves if they want data stored in
LevelDB (which is not fully ACID compliant) or a database like Sqlite,
Oracle, DB2 etc.

If the storage requirements for UTXO data are fairly simple, consisting
mainly of puts and gets, there is a decent argument that using a
dedicated key-value store provides superior performance over a
traditional SQL database.

However, from a practical perspective, given that nodes operate on a
range of different hardware and even a little Raspberry Pi can run a
full node and keep up with the network, why not let those users with the
resources to operate big iron databases do so?  It would be a good
feature to have.


On 10/29/2015 01:03 AM, Luke Dashjr via bitcoin-dev wrote:
> I predict this would be a disaster. UTXO storage is CONSENSUS-CRITICAL code.
> Any divergence in implementation behaviour, including bugs AND bugfixes, may 
> cause consensus failure. For this to have a reasonable *hope* of working, we 
> need to choose one storage engine, and *will* need to maintain consensus-
> compatibility of it ourselves (since nobody else cares).
> 
> Fixing LevelDB frankly seems like an easier task than switching to anything 
> SQL-based, which would require a *lot* more *difficult-to-get-consensus-
> compatible* code that we are all (or at least mostly) very unfamiliar with.
> 
> Research is fine, but let's be realistic about deployment.
> 
> Luke
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists•linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
> 


  reply	other threads:[~2015-10-30  3:04 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-29  6:57 telemaco
2015-10-29  8:03 ` Luke Dashjr
2015-10-30  3:04   ` Simon Liu [this message]
2015-10-30  3:35     ` Gregory Maxwell
2015-10-30  4:04       ` Peter R
2015-10-30  4:28         ` Gregory Maxwell
2015-11-15  1:02           ` Peter R
2015-11-15  1:08             ` Gregory Maxwell
2015-11-15  1:45               ` Peter R
2015-11-15  2:10                 ` Gregory Maxwell
2015-11-15  2:58                   ` Peter R
2015-11-15  3:30                     ` Gregory Maxwell
2015-11-15  4:10                       ` Peter R
2015-11-15 10:12                         ` Jorge Timón
2015-11-15 11:28                           ` Jorge Timón
2015-11-15 15:48                             ` Peter R
2015-11-15 17:06                           ` Peter R
2015-11-17 13:54                             ` Tamas Blummer
2015-11-17 15:24                               ` Tom Harding
2015-11-17 22:17                                 ` telemaco
2015-11-20 14:15                                   ` Jorge Timón
2015-11-16  1:52                     ` Rusty Russell
2015-11-15  3:04             ` Luke Dashjr
2015-11-15  3:17               ` Peter R
2015-10-29  8:17 ` Gregory Maxwell
  -- strict thread matches above, loose matches on Subject: below --
2015-10-22 21:26 Jeff Garzik
2015-10-22 21:54 ` Patrick Strateman
2015-10-22 21:56 ` Joseph Gleason ⑈
2015-10-23  6:53 ` Jonas Schnelli
2015-10-23  7:45 ` Lucas Betschart
2015-10-28 20:28   ` Sean Lynch
2015-10-28 21:11     ` Jeff Garzik
2015-10-23 10:30 ` Tom Zander
2015-10-26 18:06   ` Douglas Roark
2015-10-28 15:52     ` Tom Zander
2015-11-18  0:06     ` Jonathan Wilkins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5632DE33.7030600@bitcartel.com \
    --to=simon@bitcartel$(echo .)com \
    --cc=bitcoin-dev@lists$(echo .)linuxfoundation.org \
    --cc=luke@dashjr$(echo .)org \
    --cc=telemaco@neomailbox$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox