Post
Topic
Board Development & Technical Discussion
Merits 4 from 4 users
Re: World's fastest and simplest block parser for those who (only) need all HASH160
by
ETFbitcoin
on 06/09/2023, 11:55:37 UTC
⭐ Merited by vjudeu (1) ,BTCW (1) ,vapourminer (1) ,JayJuanGee (1)
Assuming you're in the terminal and the ~/blocks folder, just:

Code:
cat blk00000.dat| xxd -p | grep -oE '1976a914[0-9a-f]{40}88ac' | sed 's/1976a914//;s/88ac//' | sort -u > P2PKH-unique00000.txt

It shouldn't take longer than 1-2 seconds per .dat file, even on an old budget computer.

I tried the command and the result seems to be correct from quick check. It's also fast, although i use SSD and my computer isn't very old either. And since i'm not familiar with blk file structure, do you think there's possibility of false positive?

Yeah, about the title. I think this is the world's fastest and simplest solution; I will, of course, change it when/if proven wrong.

Although i bet some low level programmer would take your statement as challenge to build something faster Tongue.