Post
Topic
Board Development & Technical Discussion
Merits 3 from 3 users
Re: Blockchain Backup Project: Torrent for Bitcoin Core!
by
n0nce
on 08/01/2024, 09:54:16 UTC
⭐ Merited by tromp (1) ,ABCbits (1) ,vapourminer (1)
But whenever this node needs a block with a certain hash, it can just see if such a block is present in the torrent and use that instead of asking its peers for it.
I don't get this part of your statement. OP seems to backup Bitcoin Core files where one .blk file which contains data from multiple blocks.
That's the normal way Bitcoin Core stores blocks. You can read more about it here:

The blk.dat files in ~/.bitcoin/blocks/ contain raw block data received by a bitcoin core node.

These blk.dat files basically store “the blockchain”.

[...]

The data in blk.dat files is stored in binary, and each new block gets appended to the end of the file.

[...]

The maximum blk.dat file size is 128MiB (134,217,728 bytes)

What tromp means is that if you dump a load of .blk files onto your disk and start up Bitcoin Core, it will ask peers for block headers through the regular Bitcoin protocol (thus not relying solely on the torrent being 'legitimate') and then looks through those files to see if already has the needed blocks for those headers, before asking for them through the Bitcoin network.