Post
Topic
Board Development & Technical Discussion
Re: World's fastest and simplest block parser for those who (only) need all HASH160
by
ETFbitcoin
on 08/09/2023, 10:43:40 UTC
--snip--
1. One source of false positives I can think of would be if the pattern [ s ] appears elsewhere, such as in pushed arbitrary data (OP_RETURN). From a purely statistical perspective, the chance is virtually 0. Unless some people and/or miners use such for something (maybe Layer 2 stuff, or simply to f* around). I hypothesize false positives on the actual mainnet blockchain are exceptionally rare. Still, I haven't taken the time to quantify the exact number (and I would be surprised if it wasn't very, very close to or exactly 0).

That's what i expected. And few extra HASH160 shouldn't have noticeable performance impact brute-force tool.

2. The blk files simply the blocks as they come, the tx data bundled into ~130 MB "units" for convenience/standard, and saved as raw bytecode to be space-efficient (using all 256 bits (0x00-0xFF) instead of limiting itself to the number of an alphabet (hexadecimal is only 16 "letters", duh!). That's why they look funny, and maybe get you to think "this gotta be some weird code", if you open them as they are without first converting to something human-readable.

Yeah. I'd just use something more friendly such as Bitcoin Core RPC if i need to access block data. Besides, IIRC there's no guarantee Bitcoin Core store it on sequential order (e.g. block height 1, block height 2, ...).

--snip--

On top of using AI generated text[1], the code doesn't even work.

Code:
>>> from bitcoinlib.blocks import get_block
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'get_block' from 'bitcoinlib.blocks' (/home/user/.local/lib/python3.9/site-packages/bitcoinlib/blocks.py)

[1] https://bitcointalk.org/index.php?topic=5456516.msg62813494#msg62813494