<oembed><type>rich</type><version>1.0</version><author_name>npub1a3zpmn53lhv8jv7vjg3daletu2e6e9ce88737ga2r7dkr7yc7dss7r6s85</author_name><author_url>https://nostr.ae/npub1a3zpmn53lhv8jv7vjg3daletu2e6e9ce88737ga2r7dkr7yc7dss7r6s85</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2015-10-30&#xA;📝 Original message:Storage of UTXO data looks like an implementation detail and thus one&#xA;would have thought that the choice of database would not increase the&#xA;odds of consensus protocol failure.&#xA;&#xA;Btcd, a full node implementation written in Go, already provides a&#xA;database interface which supports different backends:&#xA;&#xA;https://github.com/btcsuite/btcd/tree/master/database&#xA;&#xA;Given that UTXO storage is considered critical, it seems reasonable to&#xA;let a node operator decide for themselves if they want data stored in&#xA;LevelDB (which is not fully ACID compliant) or a database like Sqlite,&#xA;Oracle, DB2 etc.&#xA;&#xA;If the storage requirements for UTXO data are fairly simple, consisting&#xA;mainly of puts and gets, there is a decent argument that using a&#xA;dedicated key-value store provides superior performance over a&#xA;traditional SQL database.&#xA;&#xA;However, from a practical perspective, given that nodes operate on a&#xA;range of different hardware and even a little Raspberry Pi can run a&#xA;full node and keep up with the network, why not let those users with the&#xA;resources to operate big iron databases do so?  It would be a good&#xA;feature to have.&#xA;&#xA;&#xA;On 10/29/2015 01:03 AM, Luke Dashjr via bitcoin-dev wrote:&#xA;&gt; I predict this would be a disaster. UTXO storage is CONSENSUS-CRITICAL code.&#xA;&gt; Any divergence in implementation behaviour, including bugs AND bugfixes, may &#xA;&gt; cause consensus failure. For this to have a reasonable *hope* of working, we &#xA;&gt; need to choose one storage engine, and *will* need to maintain consensus-&#xA;&gt; compatibility of it ourselves (since nobody else cares).&#xA;&gt; &#xA;&gt; Fixing LevelDB frankly seems like an easier task than switching to anything &#xA;&gt; SQL-based, which would require a *lot* more *difficult-to-get-consensus-&#xA;&gt; compatible* code that we are all (or at least mostly) very unfamiliar with.&#xA;&gt; &#xA;&gt; Research is fine, but let&#39;s be realistic about deployment.&#xA;&gt; &#xA;&gt; Luke&#xA;&gt; _______________________________________________&#xA;&gt; bitcoin-dev mailing list&#xA;&gt; bitcoin-dev at lists.linuxfoundation.org&#xA;&gt; https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev&#xA;&gt;</html></oembed>