Bitcoin Forum
April 25, 2024, 06:16:25 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Convert blockchain to XML?  (Read 860 times)
Taras (OP)
Legendary
*
Offline Offline

Activity: 1386
Merit: 1053


Please do not PM me loan requests!


View Profile WWW
October 08, 2013, 05:17:45 PM
 #1

If there's a way to do it (not manually of course) my life would be as many times easier as there are bitcoins belonging to Hal Finney.
It would be in this format:
Code:
<CHAIN>
<BLOCK>
<HEIGHT>1</HEIGHT>
<MINER>SATOSHI NAKAMOTO</MINER>
<HASH>00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048</HASH>
<MERKLE>0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098</MERKLE>
<PREV>000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f</PREV>
<NEXT>000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd</NEXT>
<NONCE>2573394689</NONCE>
<BYTES>209</BYTES>
<V>1</V>
<TXS>0001</TXS>
<BTC>00050</BTC>
<DIFF>00000000001</DIFF>
<REWARD>50.00000000</REWARD>
<TIMESTAMP>01-09-09 0254:25</TIMESTAMP>
<RECIEVED>01-09-09 0254:25</RECIEVED>
<SINCE>463160</SINCE>
</BLOCK>
<BLOCK>
<HEIGHT>2</HEIGHT>
<MINER>MINER UNKNOWN</MINER>
<HASH>000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd</HASH>
<MERKLE>9b0fc92260312ce44e74ef369f5c66bbb85848f2eddd5a7a1cde251e54ccfdd5</MERKLE>
<PREV>00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048</PREV>
<NEXT>000000082b5015589a3fdf2d4baff403e6f0be035a5d9742c1cae6295464449</NEXT>
<NONCE>1639830024</NONCE>
<BYTES>209</BYTES>
<V>1</V>
<TXS>0001</TXS>
<BTC>00050</BTC>
<DIFF>00000000001</DIFF>
<REWARD>50.00000000</REWARD>
<TIMESTAMP>01-09-09 0255:44</TIMESTAMP>
<RECIEVED>01-09-09 0255:44</RECIEVED>
<SINCE>000075</SINCE>
</BLOCK>
</CHAIN>
SINCE being the number of seconds elapsed between that block and the previous block,
and MINER being left as MINER UNKNOWN until modified manually.
I have noooo idea how to take the chain and reformat it like this, but it is going towards a really awesome project which looks like this.

Ignore the rows filled with x's. It will soon be the number of confirmations!
Anyways, if anyone would spill some experience on this, I would be forever grateful.
1714025785
Hero Member
*
Offline Offline

Posts: 1714025785

View Profile Personal Message (Offline)

Ignore
1714025785
Reply with quote  #2

1714025785
Report to moderator
1714025785
Hero Member
*
Offline Offline

Posts: 1714025785

View Profile Personal Message (Offline)

Ignore
1714025785
Reply with quote  #2

1714025785
Report to moderator
1714025785
Hero Member
*
Offline Offline

Posts: 1714025785

View Profile Personal Message (Offline)

Ignore
1714025785
Reply with quote  #2

1714025785
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
tspacepilot
Legendary
*
Offline Offline

Activity: 1456
Merit: 1076


I may write code in exchange for bitcoins.


View Profile
October 09, 2013, 06:17:58 AM
 #2

If there's a way to do it (not manually of course) my life would be as many times easier as there are bitcoins belonging to Hal Finney.
It would be in this format:
Code:
<CHAIN>
<BLOCK>
<HEIGHT>1</HEIGHT>
<MINER>SATOSHI NAKAMOTO</MINER>
<HASH>00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048</HASH>
<MERKLE>0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098</MERKLE>
<PREV>000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f</PREV>
<NEXT>000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd</NEXT>
<NONCE>2573394689</NONCE>
<BYTES>209</BYTES>
<V>1</V>
<TXS>0001</TXS>
<BTC>00050</BTC>
<DIFF>00000000001</DIFF>
<REWARD>50.00000000</REWARD>
<TIMESTAMP>01-09-09 0254:25</TIMESTAMP>
<RECIEVED>01-09-09 0254:25</RECIEVED>
<SINCE>463160</SINCE>
</BLOCK>
<BLOCK>
<HEIGHT>2</HEIGHT>
<MINER>MINER UNKNOWN</MINER>
<HASH>000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd</HASH>
<MERKLE>9b0fc92260312ce44e74ef369f5c66bbb85848f2eddd5a7a1cde251e54ccfdd5</MERKLE>
<PREV>00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048</PREV>
<NEXT>000000082b5015589a3fdf2d4baff403e6f0be035a5d9742c1cae6295464449</NEXT>
<NONCE>1639830024</NONCE>
<BYTES>209</BYTES>
<V>1</V>
<TXS>0001</TXS>
<BTC>00050</BTC>
<DIFF>00000000001</DIFF>
<REWARD>50.00000000</REWARD>
<TIMESTAMP>01-09-09 0255:44</TIMESTAMP>
<RECIEVED>01-09-09 0255:44</RECIEVED>
<SINCE>000075</SINCE>
</BLOCK>
</CHAIN>
SINCE being the number of seconds elapsed between that block and the previous block,
and MINER being left as MINER UNKNOWN until modified manually.
I have noooo idea how to take the chain and reformat it like this, but it is going towards a really awesome project which looks like this.

Ignore the rows filled with x's. It will soon be the number of confirmations!
Anyways, if anyone would spill some experience on this, I would be forever grateful.

Are you asking for someone to reformat the blockchain in xml as you have above?  Or to take your xml blockchain and style it as you have presented below?  I'd probably use python or perl for the former, and XSLT for the latter.  PM me if you want to offer some bitcoins for this work.
super3
Legendary
*
Offline Offline

Activity: 1094
Merit: 1006


View Profile WWW
October 09, 2013, 03:56:58 PM
 #3

This can be done. This file will be unwieldy to work with and amount to a 100GB+ file(s). Note that it will probably take a few days to parse through as well. Python + XML libs + a few "cloud" servers would get the job done though.

Bitcoin Dev / Storj - Decentralized Cloud Storage. Winner of Texas Bitcoin Conference Hackathon 2014. / Peercoin Web Lead / Primecoin Web Lead / Armory Guide Author / "Am I the only one that trusts Dogecoin more than the Federal Reserve?"
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!