Blockchain alternative storage
4 messages, 6 Jun 2013. Started by Marko Otbalkana.
Marko Otbalkana, Patrick Strateman, Petr Praus, Jouke Hofman
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
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:
Quoted text (21 lines)
> 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
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:
Quoted text (21 lines)
> 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 > >
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:
Quoted text (23 lines)
> 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 >