Over the past few months I've really, really gotten into crypto so today I decided to create my own blockchain from scratch(ish). After very little research I decided Ethereum would be the best choice and I found this article on Medium and got cracking.
In the article they used Go Ethereum (geth), which is just the Golang implementation of the Ethereum protocol. The official site suggests that one of the quickest ways to get up and running is using Docker. Unfortunately I'm on a Mac M1 chip (arm64 CPU), so I thought it would be easier to use the Rosetta 2 emulator and Homebrew:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
This set it up in the /usr/local directory. From here I could install:
Next, I set up a miner account to generate public and private keys:
geth account new --datadir <path-to-data-directory>
Finally I set up and initialized the genesis block which required creating a simple json file:
geth -datadir <path-to-data-directory> init <path-to-genesis-block>
And that was it! I was ready to start mining. Pretty easy, maybe 30 minutes and very little coding. Hopefully this trend continues in the next steps.