Your AI powered learning assistant

We mined BITCOIN in Minecraft!

Introduction

00:00:00

Bitcoin emerges as the most unexpected and rare block in Minecraft, challenging traditional expectations of diamonds or emerald ores. A giant redstone machine, developed over two years by Soundtomb and Armadillo28, mines Bitcoin solely using in-game mechanics without any mods or commands. The narrative unfolds by detailing the machine’s operation, explaining Bitcoin fundamentals, and evaluating the financial returns of this innovative method.

How does Bitcoin work?

00:00:35

Bitcoin mining begins by compiling an exhaustive transaction history and assembling newly bundled transactions into a block with a timestamp, formatted into an 80-byte header. The block header is then hashed twice using the SHA-256 algorithm, which produces a consistent yet unpredictable 256-bit number. This hash is compared against a preset target, and if it falls below the target, the block is accepted and new Bitcoin is generated as a reward. The repeated cycle of tweaking the header and rehashing ensures the network’s security by making transaction forgery extremely challenging.

To-do list

00:02:00

A design to mine Bitcoin in Minecraft leverages a Python script to fetch block headers from the network, which a player bot encodes into redstone blocks arranged in a binary pattern. The block header is processed through SHA-256 and compared with a target value, while the chat system transmits success signals. A general purpose computer module, CHUNGUS2, then completes the necessary computations within the strict 10‐minute block mining window, ensuring native game speed. The approach is reimagined from earlier command-based miners to work in pure survival mode without cheats.

Data in

00:03:58

Lectern-Based Hexadecimal Signal Manipulation A 32-bit computer system faces a tight deadline of 6,000 ticks, prompting an inventive method that uses a lectern's 15-page book to relay data. The lectern produces varying redstone signal strengths corresponding to each page, and a subtraction adjustment is applied to reliably represent a zero signal. A clever mechanism using page up and page down transitions triggers a write signal without altering the intended output, while a special shift function corrects the output for the hexadecimal value F. This approach efficiently encodes bytes into the system by precisely controlling page transitions for accurate signal representation.

Efficient Binary Conversion and 32-Bit Data Storage After generating hexadecimal signals, a redcoder circuit converts each value into four stacked binary signals. Eight of these nibbles feed into a distributor circuit that reorders and stacks them into a 32-bit vertical format, ideal for bitwise operations. A large shift register then pre-stores 512 bits of data to prevent lag by separating the data and mining circuits. This method ensures seamless data manipulation by integrating conversion and storage in a tightly synchronized circuit design.

Shift registers

00:08:30

Shift registers form the backbone for moving binary data sequentially in SHA-256, where memory cells are aligned in a line to shift one position with each clock pulse. Their design allows data to be transferred bit-by-bit, resulting in a vertically arranged series of binary numbers. By integrating comparators between locked repeaters, the system can switch to simultaneous data loading, effectively converting the shift register into a standard register. This mechanism also supports dual-source loading, enhancing the efficiency and flexibility of data handling.

Rotates

00:09:29

Minecraft employs a vertical rotation mechanism that shifts data downward and wraps the bits around, mimicking a bitwise right rotate. The design uses trapdoors adjacent to a column of walls to change states, with observers detecting these changes to reorganize separate signals. A fixed rotation offset ensures that outputs realign rapidly in only four ticks, even though they are lowered by 64 blocks. Bubble columns are then used to elevate the data back, freeing up space above for additional circuitry and optimizing overall performance.

Other functions

00:11:17

A bitwise XOR outputs a 1 when two bits differ while a multiplexer chooses between two numbers. The design handles three 32-bit inputs with a majority function that outputs 1 if at least two inputs are high, achieved through interconnected AND gates. Additionally, a 'choice' component stacks 32 1-bit multiplexers to pick, for each bit, between two signals based on a control input. The narrative hints at a later introduction of a 32-bit adder, gradually building up the circuit's complexity.

SHA-256 explanation

00:12:13

SHA-256 processes data in 512‑bit chunks by first loading them into a 16‑cell shift register, where a round function expands the input into 64 unique values. The algorithm uses 64 fixed constants and an 8‑element state register to store intermediate results, with the state later split into working variables labeled A through H. A compressor stage then performs 64 rounds that combine rotates, shifts, XORs, and modular additions, seamlessly integrating components like majority and choice logic. Finally, the working variables are merged back into the state and rehashed, ensuring robust data integrity and security.

Adders

00:15:21

The hashing process requires 192 rounds within a strict 9-minute window, making speed crucial. A specially designed 32-bit adder circumvents the usual delay by leveraging comparator priming and subtick timing, allowing instant signal propagation. This method employs a bubble column to ensure the carry moves accurately from the least to the most significant bit, and its compact variants maintain efficiency in less critical operations. Together, these innovations reduce the overall clock cycle to just 40 game ticks, or 2 seconds, guaranteeing the miner's rapid performance.

Pipelining

00:18:02

Pipelining 192 iterations of the round function takes about 6.5 minutes, prompting a search for more efficient designs. The optimization introduces a pipelining strategy using multiplexers that enables three rounds to be processed concurrently. This approach requires a few extra rounds of setup, so each chunk now executes 67 rounds instead of 64. The method showcases a balance between speeding up core operations and managing additional configuration overhead.

Compressor build-up

00:18:24

A time-saving compressor design incorporates a robust ROM that cycles through 64 constants using bubble columns and observers to maintain data stability. Data flows from the expander into the compressor as working variables, managed by eight thin adders and connected back into the state. The state is repurposed as a shift register to feed into a subsequent hash round, with wiring that spans the entire build. The system is completed with a control circuit featuring a self-resetting ROM that utilizes floated mine carts to finalize the hashing mechanism.

Target

00:19:40

Minecraft leverages SHA-256 to compute a double hash that must be compared to a target value derived from a block header. The block header contains a 32-bit nBits representing a compressed target, which is expanded using 32 bytes of RAM and a 5-bit decoder. nBits is split into four bytes where one sets the starting position in memory and the other three are sequentially added, with a simple control circuit completing the process. This method produces a precise 256-bit target for validating the hash output.

Endianness

00:20:26

Binary numbers can be represented in big endian or little endian formats, with the former being the standard and the latter reversing the byte order. SHA-256 naturally uses big endian, while Bitcoin employs little endian, necessitating a reversal of the state’s bytes before any comparison can occur. A rotate circuit elegantly rearranges the bytes and condenses the state to 64 blocks that align with the target. An infinitely expandable comparison circuit then connects these elements, culminating in the final output for cryptographic validation.

Data out

00:21:11

In the game, a computed hash is compared with a target to determine if a Bitcoin has been mined, with only one nonce evaluated per cycle. A failure triggers a trapdoor that kills the player, while success results in dropping an anvil on a tamed pet—each event sending a death message in the chat. A vegetarian option offers an alternative trigger, and a Python program collects these messages to broadcast the result to the Bitcoin network. Additionally, disabling mining functions allows the SHA‑256 hasher to output a 256‑bit hash as black and white pixels that can be converted into text.

How much money does it earn?

00:23:19

A cryptographic hash function in Minecraft is repurposed to theoretically mine Bitcoin, yielding a minuscule reward based on probabilistic odds. Calculations show that, over a year, the operation would earn only the equivalent of two historical cents. The energy cost, determined by a 300-watt draw amounting to about £2 daily, dramatically outweighs any potential Bitcoin gain. Scaling up the system fails to mitigate these excessive power expenses, confirming the setup is economically unviable.

Showcase

00:24:53

A remarkable redstone build is presented in its full operational glory, fulfilling the goal of creating an impressive mechanism. The design integrates creative redstone engineering with a functional showcase of intricate components. The complete build highlights the convergence of aesthetic appeal and technical precision in redstone construction.

Coinbase message

00:26:18

A pioneering project fuses Minecraft redstone engineering with real-world Bitcoin network infrastructure, transforming gameplay into a robust computational experiment. The setup leverages Minecraft's capabilities to potentially mine a Bitcoin block, permanently affecting the global blockchain. By embedding a custom coinbase message in the block header, the experiment seamlessly integrates authentic Bitcoin transactions with digital creativity. Despite challenging debugging hurdles, the project marks a significant breakthrough in merging game mechanics with cryptocurrency innovation.

Credits

00:27:18

A blockchain block displaying a credit message signifies an innovative approach to acknowledging contributions. The description provides essential resource links, including academic papers, Minecraft mods, and creative projects. Soundtomb’s musical contributions are highlighted with links to his channel, Bandcamp, and website. Supplementary materials on multiple channels encourage viewers to stay connected through continued subscriptions.