Bitcoin Forum
May 09, 2024, 04:46:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [wanted] blk001.dat -> 247898.csv (blockchain parsing)  (Read 1437 times)
threeip (OP)
Full Member
***
Offline Offline

Activity: 154
Merit: 100



View Profile WWW
July 25, 2013, 10:59:19 PM
 #1

I'm trying to shift data from blockchain .dat files into .csv files for each block 'number'.
Each output .csv needs to have txid, from, from_amount, to, to_amount, with matching addresses; ie a row for each 'relationship' in the transaction.

Code:
input1         output1
input2   ->     output2
input3         output3

becomes

Code:
input1,output1
input1,output2
input1,output3
input2,output1
...
etc


I messed around with subvertix and libbitcoin for a while but couldn't make it work. Has anyone made anything like this or could offer tips for tips?  Smiley

ส็็็็็็็็็็็็็็็็็็็็็็็็็ GPG:2AFD99BB ಠ_ಠ mon
1715273175
Hero Member
*
Offline Offline

Posts: 1715273175

View Profile Personal Message (Offline)

Ignore
1715273175
Reply with quote  #2

1715273175
Report to moderator
1715273175
Hero Member
*
Offline Offline

Posts: 1715273175

View Profile Personal Message (Offline)

Ignore
1715273175
Reply with quote  #2

1715273175
Report to moderator
1715273175
Hero Member
*
Offline Offline

Posts: 1715273175

View Profile Personal Message (Offline)

Ignore
1715273175
Reply with quote  #2

1715273175
Report to moderator
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715273175
Hero Member
*
Offline Offline

Posts: 1715273175

View Profile Personal Message (Offline)

Ignore
1715273175
Reply with quote  #2

1715273175
Report to moderator
1715273175
Hero Member
*
Offline Offline

Posts: 1715273175

View Profile Personal Message (Offline)

Ignore
1715273175
Reply with quote  #2

1715273175
Report to moderator
bitspill
Legendary
*
Offline Offline

Activity: 2058
Merit: 1015



View Profile
July 26, 2013, 09:58:04 AM
 #2

As a sample transaction you would want http://blockchain.info/tx/168755e1b3183434c46355a44b2e0acf39b21ccdd05c65f4cafc479158d6365c to end up in the .csv as follows?

Code:
txid,from,from_amount,to,to_amount

168755e1b3183434c46355a44b2e0acf39b21ccdd05c65f4cafc479158d6365c,1HaGsG2Fn6qWjpgSHCsbBVAL9jeBMbszGo,0.02,1Mk473HjqCLEbZnNLegS3z361jkzwttf7z,0.01

168755e1b3183434c46355a44b2e0acf39b21ccdd05c65f4cafc479158d6365c,1HaGsG2Fn6qWjpgSHCsbBVAL9jeBMbszGo,0.02,1KAsTH4s6iRqFVcVZ5WGtoiX1oLwmGaUhm,0.01

168755e1b3183434c46355a44b2e0acf39b21ccdd05c65f4cafc479158d6365c,1HaGsG2Fn6qWjpgSHCsbBVAL9jeBMbszGo,0.0001,1Mk473HjqCLEbZnNLegS3z361jkzwttf7z,0.01

168755e1b3183434c46355a44b2e0acf39b21ccdd05c65f4cafc479158d6365c,1HaGsG2Fn6qWjpgSHCsbBVAL9jeBMbszGo,0.0001,1KAsTH4s6iRqFVcVZ5WGtoiX1oLwmGaUhm,0.01

{ BitSpill }
threeip (OP)
Full Member
***
Offline Offline

Activity: 154
Merit: 100



View Profile WWW
July 26, 2013, 08:59:32 PM
 #3

Essentially that's it, yes!

ส็็็็็็็็็็็็็็็็็็็็็็็็็ GPG:2AFD99BB ಠ_ಠ mon
bitspill
Legendary
*
Offline Offline

Activity: 2058
Merit: 1015



View Profile
July 27, 2013, 08:16:48 AM
 #4

Ok, I'll work at it for a bit and see if I get something together.

{ BitSpill }
bitspill
Legendary
*
Offline Offline

Activity: 2058
Merit: 1015



View Profile
July 28, 2013, 06:08:43 AM
 #5

Well, I think I got something going... Will post archive files in chunks of 20k blocks.
The parsed files ended at block 147,056 though because the parser crashed  Cool

Code:
000000.7z (2.0 MB)
https://mega.co.nz/#!bdJVSRRA!c_T5rGzZABdXusFaObiF9ix-MWhz92ycSHjfFCzDBGo

020000.7z (2.0 MB)
https://mega.co.nz/#!yFAj1bTB!KEbFcHzqODU34y6dnhjSti8HUzERSQGFc_GwVPbFsl0

040000.7z (2.5 MB)
https://mega.co.nz/#!WBRjQaxL!BbxM1nVq0Q37qC47p9IGGA5iImErxJVPptQpua3C8lg

060000.7z (4.1 MB)
https://mega.co.nz/#!LUZ2VT5a!RYEaxD5SIlLkLilYoFazx3b1GyI05Pnv6HG5RIVtPWQ

Slowly uploading the others...

{ BitSpill }
bitspill
Legendary
*
Offline Offline

Activity: 2058
Merit: 1015



View Profile
July 28, 2013, 06:22:08 AM
 #6

Code:
100000.7z (17.8 MB)
https://mega.co.nz/#!OFYGkJ5S!KjdDSG0wjbWfT4iaiOaP6VjO2kR1Zrou36dUJ9Cn-EU

A note I just remembered... The amount values are in satoshis not BTC in these files

{ BitSpill }
bitspill
Legendary
*
Offline Offline

Activity: 2058
Merit: 1015



View Profile
July 28, 2013, 12:37:46 PM
 #7

Code:
120000.7z (83.8 MB)
https://mega.co.nz/#!KVo1BCqB!JLqylTu8PT3-0KZoSuIWPnPxiXcqVjSF_SEFZFQFFH4

140000.7z (39.0 MB)
https://mega.co.nz/#!OZYzGLqZ!LdcYKAHR6050owHW1pmZ_EvIH6ASk4KcfUQ6bK_DRHY

That's all of them.
If there is something that seems funny about any of those files I can try adjusting the program and re-running.

{ BitSpill }
threeip (OP)
Full Member
***
Offline Offline

Activity: 154
Merit: 100



View Profile WWW
July 28, 2013, 07:57:50 PM
 #8

Nice work! PM me a link to some code if you like, and post an address here for a tip Wink

ส็็็็็็็็็็็็็็็็็็็็็็็็็ GPG:2AFD99BB ಠ_ಠ mon
bitspill
Legendary
*
Offline Offline

Activity: 2058
Merit: 1015



View Profile
July 28, 2013, 08:05:09 PM
 #9

Nice work! PM me a link to some code if you like, and post an address here for a tip Wink
I'll upload a copy of the code after work tonight, it is C#

{ BitSpill }
bitspill
Legendary
*
Offline Offline

Activity: 2058
Merit: 1015



View Profile
July 29, 2013, 04:38:46 AM
 #10

Code:
Bitcoin-Tool-master.7z (533 KB)
https://mega.co.nz/#!zYpnjJoY!cY0TszfdmmARRoY24VDb6EtSz6J7Ej9hZ6XUqavjofg


I was working with the C# Bitcoin Tool by mb300sd: https://bitcointalk.org/index.php?topic=148163.0
The program was added as a new "App" DatToCSV.cs

Address: 16DK3irVBR1Y1dejuWjbSwQmUptHWNieUr

{ BitSpill }
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!