I scanned the Bitcoin blockchain for pictures; what I discovered will shock you. A lot has been stated on-line in regards to the arbitrary knowledge and content material that may be discovered on the Bitcoin blockchain. Not solely has this chance spawned a distinct segment artwork scene, nevertheless it has additionally led to a motion towards ‘non-monetary transactions’ on the Bitcoin community. Have been you to listen to from considered one of its proponents or detractors, you’d determine the blockchain is mainly a wall crammed with graffiti.
Effectively, I made a decision to place the query to the take a look at: are there truly pictures on the blockchain? And what does this truly imply for Bitcoiners merely making an attempt to run their very own full node and maximize their monetary sovereignty?
My methodology was easy: I used to be to purchase a recent exhausting drive to retailer the blockchain on, after which I used to be going to run basic picture restoration software program over the data- one thing used to rescue pictures from damaged exhausting drives, one thing designed to seek out uncooked picture knowledge.
I selected PhotoRec to do the picture restoration work, an open supply picture restoration program that’s been round for over 20 years. The software program is designed to seek out picture recordsdata in uncooked knowledge. This can be utilized to get well pictures and different file codecs from exhausting drives which have failed or been corrupted. It’s truly usually used to get well misplaced pockets.dat recordsdata from the early days of Bitcoin wallets, earlier than the proliferation of the seed phrase format.
Syncing The Full Bitcoin Node
For storage of the complete Bitcoin blockchain, I made a decision to purchase a 4-terabyte disk drive for a pair hundred {dollars}. I then put in the newest model of Bitcoin Core on it and began to sync the chain. The method, which includes downloading and verifying the accounting integrity of all transactions in Bitcoin historical past, took about 72 hours or three days, automated and operating within the background by the Bitcoin Core software program.
I did this with an in any other case highly effective gaming machine; the principle bottleneck when it comes to time was the disk drive, which is gradual to learn and write knowledge as wanted when syncing Bitcoin’s blockchain. The gradual a part of the method includes the unspent transaction output set, or UTXO. When a consumer syncs the blockchain, each unspent transaction worth (output) or constructive steadiness is organized into the UTXO set, and as these values are spent, they’re faraway from the set, whereas the brand new deal with to which these satoshi had been despatched is added.
On the disk drive, this UTXO indexing course of might have taken three weeks based on some estimates, so to hurry it up, my clanker (AI agent) instructed we index the information in RAM as an alternative, then transfer the information again to the 4-terabyte disk drive. Whereas the entire course of took three days, operating within the background, an SSD might have achieved the entire job in a couple of day. SSD drives are a lot sooner than disk drives; they’re extra fashionable, however they’re additionally simply 4 instances the value, or extra.
As soon as the blockchain was totally downloaded and validated, we moved the UTXO index from RAM again to the disk and booted the Bitcoin software program; the chain was totally synced and the pockets able to go. Now it was time for the subsequent step: recovering the pictures saved on the blockchain.
Picture Restoration on the Blockchain with PhotoRec
With the complete Bitcoin blockchain on my disk drive, I turned off Bitcoin Core and requested my clanker (Cursor AI agent) to run PhotoRec 7.2 on the drive. The default PhotoRec course of seems to be for jpg, png, gif, tif, bmp, ico, psd, and uncooked codecs. The method ran for over 11 hours on the blockchain knowledge and finally discovered … (drum roll) … nothing.
Over a terabyte of blockchain knowledge and half a day of scanning and no pictures turned up. The PhotoRec wiki web page offers a easy instance of how the software program works: “PhotoRec identifies a JPEG file when a block begins with: 0xff, 0xd8, 0xff, 0xe0, 0xff, 0xd8, 0xff, 0xe1, or 0xff, 0xd8, 0xff, 0xfe.” In different phrases, this system seems to be on the knowledge on the disk for bytes that sign that there’s a picture file.
This system is able to false positives; it saved 8 ICOs and 4 similar PNG recordsdata that don’t present any pictures when opened, as seen within the image under. So, successfully no significant pictures of any type had been discovered.
The place Did the Jpegs Go? XOR Magic Methods
How is that this attainable? For years, crypto individuals have been speaking about NFTs and how you can engrave picture knowledge on the Bitcoin blockchain. Hundreds of thousands of {dollars} have moved on this area of interest, and an entire tradition warfare is being fought on the matter as we communicate. Can there actually be no pictures on the chain?
Seems the dangers concerned with arbitrary knowledge have been mentioned and deliberate for in Bitcoin Core improvement circles for a very long time, as early as 2011. XOR, a easy knowledge obfuscation approach, is used to scramble all of the blockchain knowledge whereas it’s at relaxation on a tough drive.
You might need heard that the elemental language of computer systems is made up of 0’s and 1’s. Effectively, in a nutshell, XOR compares two digits or bits and returns 1 if the bits are totally different or 0 if the bits are the identical. Within the case of Bitcoin, XOR compares each little bit of the blockchain knowledge to a random key generated throughout preliminary set up, leading to knowledge at relaxation that different applications can discover no that means in. Nevertheless, when the Bitcoin software program runs, it has the important thing to unscramble that knowledge and use it at will. XOR can also be very quick, so it doesn’t meaningfully influence efficiency. Right here’s an instance of the Bitcoin genesis block earlier than and after an XOR.
XOR is at the moment utilized to each the blockchain knowledge and the UTXO set. XOR was initially mentioned in 2014 when anti-virus software program began getting tripped up by blockchain knowledge it interpreted as virus code. The anti-virus software program would then quarantine a block, corrupting the blockchain knowledge and crashing Bitcoin, making sync unattainable. By the tip of 2015, XOR had been applied on the UTXO set knowledge at relaxation and in 2024 it was applied on all blockchain knowledge at relaxation.
By the way, the XOR course of signifies that no arbitrary knowledge may be recognized or extracted from the blockchain with out deliberately bypassing the XOR, a course of that isn’t essential for financial use of Bitcoin. For the reason that Bitcoin Core software program retains a easy database of the placement of every scrambled block, it could get its knowledge, unscramble it and use it in a focused method simply.
Syncing Bitcoin in an unscrambled means is a customized course of that may take as a lot time as syncing from scratch, because it mainly has to re-write the complete terabyte of knowledge in a brand new order, and there’s not a lot level in that for somebody that simply desires the traditional privateness and safety advantages of operating a Bitcoin node. So relating to the overwhelming majority of copies of the Bitcoin blockchain knowledge, resting on the computer systems of regular Bitcoiners all through the world, there’s successfully no arbitrary knowledge or pictures that may be recognized. Surprising, I do know. Be happy to run the PhotoRec take a look at your self by yourself node!