Hey everyone, I just set up Bitcoin Core today, but I also did it about a week ago and downloaded some blk*.dat files for practice.
The blk*.dat files from last week seem fine to me. For instance, the hex data in blk00000.dat starts with f9beb4d9 1d010000 01000000 and that f9beb4d9 tag appears at the start of each block in the .dat file.
But when I check the blk00000.dat file I downloaded today (I’ve tried this on two different computers), I’m seeing a weird series of bytes at the start of the file that doesn't begin with f9beb4d9 or anything similar... and those magic bytes don’t show up anywhere in the file. Could it be an encoding issue? I’m kind of stumped. I haven’t changed anything on my end, just installed the same software twice. I was expecting the blk00000.dat files to be the same.
Thanks for any input! reg k
P.S. The blk00000.dat I downloaded today starts with this binary sequence, which is totally unfamiliar to me:
02 5C 0E E9 C2 DF AD 9E FA E2 BA 30 DF DE AD 9E FB E2 BA 30 DF DE AD 9E FB E2 BA 30 DF DE AD 9E FB E2 BA 30 E4 7D 40 63 81 99 A8 82 A5 19 81 A0 9C 94 35 51 A0 16 B6 5D 73 68 EB 02 E5 41 15 34 B0 FC E4 7A F6 75 F2 D7 04 1D BA 2D C2 72 86 E2 FA E3 BA 30 DF DF AD ... etc
strange format in blk00000.dat
4 replies 149 views
IIRC there are at least 2 different reasons of this behavior.
1. Bitcoin Core obfuscate the data using XOR operation, with randomly generated key.
2. Bitcoin Core doesn't guarantee block is written into storage drive in deterministic/sequential order.
hi ok, but the files (the whole blockchain) downloaded last week (all blk*.dat) with same core sw are all prefectly 'readable' without undoing the xor ... In the sense that they start with the magic bytes / version etc Why would that be the case .. ?
I know that he actual blocks are not perfectly in sequential order in the blk*.dat files but thats no issue.
I see inded an xor.dat file..
thx reg k
It could happen due to one of these reasons,
1. Using Bitcoin Core with version below v28.0.
2. Start download blockchain with Bitcoin Core with version below v28.0.
3. Use Bitcoin Core v28.0 or newer, but manually add blocksxor=0 on your Bitcoin Core configuration before starting download blockchain.
More information, https://learnmeabitcoin.com/technical/block/blkdat/, XOR section.
Ok, found it! .. today i used core 28.1 which gives xor'ed dat files (default in 'local' directory on windows) ... also 28.0 will give you xor'ed dat files...
and i think last week i used 27.2 (defaults to 'roaming' directory on windows)..
As we speak i re-installed core 27.2 and the blk*.dat files are not xor'ed on disk but directly useable..
Thks ! reg koen
thx, just found out the same ! reg k (gues used 27.2 last week .. cant really remember ..
Related topics
- Bitcoin Core displaying coins (UTXOs) in a new tab 13
- Are you in favor of BIP-110? Let's get a Bitcoin poll going. 0
- Erlay seems to have some issues here’s a better proposal for a bitcoin protocol without invites 3
- New Optional Hourglass Implementation is Live 3
- Ways to earn some sats by contributing to bitcoin core development 5
- Exploring the Potential and Challenges of a Kardashev-Scale Bitcoin Network 3