public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] Blockchain alternative storage
@ 2013-06-06  0:53 Marko Otbalkana
  2013-06-06  1:17 ` Patrick Strateman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Marko Otbalkana @ 2013-06-06  0:53 UTC (permalink / raw)
  To: bitcoin-development

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

Could anyone point me to work/project(s) related to storing the block chain
in a database, like PostgreSQL, MySQL? How about any tools that can read
the block chain from the Satoshi client and convert it into different
formats?

Thanks,
-Marko

[-- Attachment #2: Type: text/html, Size: 301 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] Blockchain alternative storage
  2013-06-06  0:53 [Bitcoin-development] Blockchain alternative storage Marko Otbalkana
@ 2013-06-06  1:17 ` Patrick Strateman
  2013-06-06  1:49 ` Petr Praus
  2013-06-06  8:20 ` Jouke Hofman
  2 siblings, 0 replies; 4+ messages in thread
From: Patrick Strateman @ 2013-06-06  1:17 UTC (permalink / raw)
  To: bitcoin-development

[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]

If you're only interested in storing the best chain then a fairly simple
schema is possible.

CREATE TABLE blocks (
    hash bytea NOT NULL PRIMARY KEY,
    index integer NOT NULL UNIQUE,
    CONSTRAINT block_hash_size_check CHECK ((octet_length(hash) = (256 /
8)))
);

CREATE TABLE transaction_inputs (
    output_transaction_id bytea NOT NULL,
    output_index integer NOT NULL,
    block_index integer NOT NULL,
    CONSTRAINT transaction_id_size_check CHECK
((octet_length(output_transaction_id) = (256 / 8))),
    PRIMARY KEY (output_transaction_id, output_index)
);

CREATE INDEX transaction_inputs_block_index_idx ON transaction_inputs
USING btree (block_index)

CREATE TABLE transaction_outputs (
    transaction_id bytea NOT NULL,
    index integer NOT NULL,
    amount numeric(16,8) NOT NULL,
    type character varying NOT NULL,
    addresses character varying[],
    block_index integer NOT NULL,
    spent boolean DEFAULT false NOT NULL,
    CONSTRAINT transaction_id_size_check CHECK
((octet_length(transaction_id) = (256 / 8))),
    PRIMARY KEY (transaction_id, index)
);

CREATE INDEX transaction_outputs_addresses_idx ON transaction_outputs
USING gin (addresses);
CREATE INDEX transaction_outputs_block_index_idx ON transaction_outputs
USING btree (block_index);

On 06/05/2013 05:53 PM, Marko Otbalkana wrote:
> Could anyone point me to work/project(s) related to storing the block
> chain in a database, like PostgreSQL, MySQL? How about any tools that
> can read the block chain from the Satoshi client and convert it into
> different formats?
>
> Thanks,
> -Marko
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
>
>
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development


[-- Attachment #2: Type: text/html, Size: 3785 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] Blockchain alternative storage
  2013-06-06  0:53 [Bitcoin-development] Blockchain alternative storage Marko Otbalkana
  2013-06-06  1:17 ` Patrick Strateman
@ 2013-06-06  1:49 ` Petr Praus
  2013-06-06  8:20 ` Jouke Hofman
  2 siblings, 0 replies; 4+ messages in thread
From: Petr Praus @ 2013-06-06  1:49 UTC (permalink / raw)
  To: Marko Otbalkana; +Cc: Bitcoin Dev

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

BitcoinJ is storing parsed blocks (not the whole chunks of bytes) in H2, an
embedded SQL database for Java.


On 5 June 2013 19:53, Marko Otbalkana <marko.otbalkana@gmail.com> wrote:

> Could anyone point me to work/project(s) related to storing the block
> chain in a database, like PostgreSQL, MySQL? How about any tools that can
> read the block chain from the Satoshi client and convert it into different
> formats?
>
> Thanks,
> -Marko
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
>

[-- Attachment #2: Type: text/html, Size: 1623 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bitcoin-development] Blockchain alternative storage
  2013-06-06  0:53 [Bitcoin-development] Blockchain alternative storage Marko Otbalkana
  2013-06-06  1:17 ` Patrick Strateman
  2013-06-06  1:49 ` Petr Praus
@ 2013-06-06  8:20 ` Jouke Hofman
  2 siblings, 0 replies; 4+ messages in thread
From: Jouke Hofman @ 2013-06-06  8:20 UTC (permalink / raw)
  To: bitcoin-development

Abe is able to do what you want.

https://github.com/jtobey/bitcoin-abe
https://bitcointalk.org/index.php?topic=22785.0

With kind regards,

Jouke Hofman
Bitonic.nl



On 06/06/2013 02:53 AM, Marko Otbalkana wrote:
> Could anyone point me to work/project(s) related to storing the block
> chain in a database, like PostgreSQL, MySQL? How about any tools that
> can read the block chain from the Satoshi client and convert it into
> different formats?
> 
> Thanks,
> -Marko
> 
> 
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> 
> 
> 
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
> 




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-06  8:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-06  0:53 [Bitcoin-development] Blockchain alternative storage Marko Otbalkana
2013-06-06  1:17 ` Patrick Strateman
2013-06-06  1:49 ` Petr Praus
2013-06-06  8:20 ` Jouke Hofman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox