Bitcoin Forum
December 03, 2016, 01:53:06 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Script to search local blockchain  (Read 938 times)
predix
Newbie
*
Offline Offline

Activity: 11



View Profile
July 14, 2011, 09:20:22 PM
 #1

Block Explorer is awesome.  Search for any address or transaction id, not just your own.

All this data is already on my local computer, in the block chain.  Is there a Python or Perl script that would let me do this myself using my local copy of the block chain?

It's tough to make predictions, especially about the future. -- Yogi Berra.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480773186
Hero Member
*
Offline Offline

Posts: 1480773186

View Profile Personal Message (Offline)

Ignore
1480773186
Reply with quote  #2

1480773186
Report to moderator
Bert
Full Member
***
Offline Offline

Activity: 126



View Profile
July 14, 2011, 09:42:49 PM
 #2

Have you seen this post ?
The option, I think, is now called getblocknumber. And getblockcount if you want to see the highest block number.

You could dump all blocks into flat files and search for the string you are interested in.

Tip jar: 1BW6kXgUjGrFTqEpyP8LpVEPQDLTkbATZ6
bitlotto
Hero Member
*****
Offline Offline

Activity: 672


BitLotto - best odds + best payouts + cheat-proof


View Profile WWW
July 14, 2011, 10:28:29 PM
 #3

A python program to explore the blockchain is at:
https://forum.bitcoin.org/index.php?topic=26484
Gavin's bitcointools has some feature too for exploring the blockchain.

*Next Draw Feb 1*  BitLotto: monthly raffle (0.25 BTC per ticket) Completely transparent and impossible to manipulate who wins. TOR
TOR2WEB
Donations to: 1JQdiQsjhV2uJ4Y8HFtdqteJsZhv835a8J are appreciated.
predix
Newbie
*
Offline Offline

Activity: 11



View Profile
July 14, 2011, 10:42:20 PM
 #4

Thanks Bert, I hadn't seen that post.  I knew blockexplorer used jgarzik's patch, but I was hoping to avoid (1) patching bitcoind, (2) dumping transactions for each block to text, (3) searching the text dump or put it into a database, (4) repeating these steps for each new block.

The Python script bitlotto pointed out may be just the ticket, thanks!  Though reading the source there's some interesting stuff about 'self-modifying code'.  Cool and scary.


It's tough to make predictions, especially about the future. -- Yogi Berra.
bitlotto
Hero Member
*****
Offline Offline

Activity: 672


BitLotto - best odds + best payouts + cheat-proof


View Profile WWW
July 14, 2011, 10:53:30 PM
 #5

Thanks Bert, I hadn't seen that post.  I knew blockexplorer used jgarzik's patch, but I was hoping to avoid (1) patching bitcoind, (2) dumping transactions for each block to text, (3) searching the text dump or put it into a database, (4) repeating these steps for each new block.

The Python script bitlotto pointed out may be just the ticket, thanks!  Though reading the source there's some interesting stuff about 'self-modifying code'.  Cool and scary.


Ya, I haven't run it or fully looked at the code. I saw that part too! It does look like it could have lot's of potential though!

*Next Draw Feb 1*  BitLotto: monthly raffle (0.25 BTC per ticket) Completely transparent and impossible to manipulate who wins. TOR
TOR2WEB
Donations to: 1JQdiQsjhV2uJ4Y8HFtdqteJsZhv835a8J are appreciated.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!