TL;DR: For the release of the EHash Project, the first completely open-source Bitcoin miner, we met with Liu Xiangfu. Member of Qi Hardware for a decade and founder of Canaan Creative, Xiangfu has been an active supporter and contributor to open-source projects long before Satoshi published his White Paper. In this interview, Xiangfu tells us how open-source has contributed to the Bitcoin mining industry in China, and his plans to reestablish the concept.
More Spice: The Bitcoin White Paper Visualized
From Suitcase to Warehouses, Liu Xiangfu’s Bitcoin Mining Journey
The Wudaokou neighborhood in Northwest Beijing, affectionately nicknamed “the Wu,” is the commercial and cultural hub linking the city’s top universities and research institutes, attracting a diverse body of students, researchers, and entrepreneurs. In 2012, in a small coffee shop on the upper floor of an office building near Tsinghua University, a dozen or so students and young software developers gathered for the first time around their common interest in Bitcoin.
Xiangfu Liu, founder of Canaan Creative, a Bitcoin mining hardware company launched the following year, was at that meetup of Beijing-based cryptocurrency enthusiasts. “There was a very young student there, sitting in the corner,” Xiangfu recalls, being careful not to reveal any names. “Later, he founded the world’s number one Bitcoin mining pool.”
The student was pitching his online messaging group, where you could learn about Bitcoin in exchange for a 1 BTC entrance fee. “I never paid,” Xiangfu laughs, “because I could read the source code.” The meeting itself ended early when a birthday party took over the small coffee shop, turning these cryptocurrency pioneers out into the street. At the time no one in the room had any idea how far Bitcoin would go.
A Separate Place of the Internet
Fuzzy headlines have fueled the narrative of a mysterious China mining world, where data centers hide in remote mountains. While China is often considered as a separate place of the Internet, it has become one of the major centers of the blockchain world. Chinese miners especially have shaped what Bitcoin is today, by adding a whole new level of security to the chain.
These blurry pictures of journalists have failed to capture the whole story. During the last decade, the breathtaking pace of Bitcoin development relied on the capacity of Chinese hardware designers and manufacturers to organically grow and ship products.
Xiangfu, who has seen the whole Bitcoin story unfold, remembers it all started by its enthusiasm for open-source technologies. “I grew up in Northern China and when I arrived at the university in Beijing, I was very impressed by the big city,” Xiangfu explained. “I [studied] software development, but everything was about Windows. I wanted to find out more about how computers work; Windows was closed but then I found Linux. At that time, only two students in my class were interested in Linux. At the end of university, we all had to choose a direction. I realized that choosing Windows meant competing with everyone else in China, so decided to choose Linux because it was more of a specialty.”
In China at that time, Linux was not so popular. “My first jobs were all under Windows but after a few years, I started working on Linux more and more,” recalls Xiangfu. “Around 2007-2008, I started to work on the Openmoko cell phone. It was before the iPhone. I worked for Openmoko for 1-2 years where I started contributing to open-source more. I wrote low level code for bootloader which talks to hardware directly. From when the power button is pushed to when the screen goes on, there is a delay. I had to wait for the hardware to power on! I was getting more interested in hardware AND software, not just hardware. You code on the platform, then the platform and the kernel, and others take care of the hardware.”
The Openmoko project faded, and Xiangfu moved on. He joined Qi Hardware and helped to build Milkymist, one of the first commercialized system-on-chip designs with free HDL source code. There, Xiangfu learned to program FPGA (field-programmable gate array), an advanced technology for reprogrammable CPUs. “With Openmoko, the CPU was fixed, can’t check the inside. The Milkymist had FPGA. It made more sense that software and hardware were combined,” he insisted.
In 2011, Xiangfu heard about a small group of people in Beijing building a miner. “When working on Milkymist, [I discovered] FPGA was the same one used for the first FPGA bitcoin miner. The people doing the FPGA mining were getting higher frequency on the chip, and we wondered how they were doing it. Then I tried to find out more about Bitcoin,” he remembers.
Icarus, Warm Apartment Walls
Xiangfu continued to play with FPGAs and explore Bitcoin mining. In 2012, he created the Icarus, an open-source FPGA miner. “No one used the blockchain at that time, only bitcoin. I decided to contribute the FPGA driver code to the open source lib CGminer. Back then, CGminer was the number one open source miner application in Bitcoin. Before the OpenWrt and CGminer, miners used a whole computer to control the FPGA miners and gpu miners,” Xiangfu detailed.
From there, he continued experimenting with mining technology. “One of my first miners fit in a suitcase. Then it was growing bigger and bigger, so I bought a much better power supply unit because I was worried about fires. The walls of my apartment were warm even in Beijing’s cold winter!”
In 2012, a team started to come together in Beijing to ship a new ASIC miner, the first machine with an ASIC specifically designed for Bitcoin. “All the work was happening over the internet. There were no in-person meetings. I had to learn everything: how the hardware was made, all the factory details, etc.,” explains Xiangfu.
From China to the World
Online, the war of pre-orders started. More and more people were beginning to use bitcoin, and mining machines were in demand. And back in 2012 companies, such as those in the United States, announced unrealistic shipping dates and ended up postponing deliveries for the first ASIC miners.
In Beijing, Canaan chose to put a big countdown on their website to announce shipment of their first product batch. On January 19, 2013, as the countdown displayed zero, and the first 300 Avalon mining rigs were sent out from China to the world.
“Most of my code was open-source so everyone in China start using it, often without changing it even a little,” continues Xiangfu. “I was really busy with the software so I stopped mining myself. Then, in the space of a few years, mining went from my suitcase to a basement, to entire warehouses.”
Time-to-Market and EHash
Indeed, the hashrate grew from roughly 20 transactions per second to several millions in the space of a few years. “I remember visiting one mining facility that was installed on a chicken farm. Also somewhere in the North of China, they had this huge transformer from a Russian brand. It was so hot that they had to build a small lake to put the transformer into and cool it,” Xiangfu said.
While most of the millions of machines have been shipped from companies based in Beijing, the other instrumental city in this story is Shenzhen. “The most important thing in Bitcoin manufacturing is the time-to-market. Every time BTC changes difficulty, profit changes so time becomes the critical thing to plan for. Shenzhen has such a gigantic component market that, as long as you are willing to pay for it, you can always get what you want tomorrow instead of next week. Their factory working style is super fast, plus the shipment to Beijing only takes one day,” he marveled.
Factories in Beijing, on the other hand, are more inclined to work with governmental contractors. “In Beijing, you have the top two universities, and so there are lots of hi-tech people and professors. You can easily talk to them to ask for help and connections,” explained Xiangfu. “Mining farms are mostly located in Southern China because energy costs less. With all the rain in the summer, they have large excesses of hydro power so you can plug directly from dams to the mines. It usually takes a two or three-hours ride in the mountains to get there though.”
That wealth of experience and knowledge has prepared him the for the next chapter. After years leading the expansion of the Bitcoin mining industry, Xiangfu announced EHash, a new 100% open-source miner. “I hope the contribution of an open-source design file can help the mining industry develop a standard of mining hardware for blockchain,” he explained, “so we can make mining more efficient and smooth, like a container standard for logistics.”
Clément Renaud, author. Special thanks to Qi Hardware for allowing CoinSpice to publish the interview.
CONTINUE THE SPICE and check out our piping hot VIDEOS. Our podcast, The CoinSpice Podcast, has amazing guests. Follow CoinSpice on Twitter. Join our Telegram feed to make sure you never miss a post. Drop some BCH at the merch shop — we’ve got some spicy shirts for men and women. Don’t forget to help spread the word about CoinSpice on social media.