DEV Community

Sumant
Sumant

Posted on

Blockchain in Go

As I continue to learn Go, I wanted to combine it with another thing that interests me. Blockchain.
Blockchain is not a new concept, it started with the hype around bitcoin.

I am not a crypto fanatic but I do want to know exactly what goes on under the hood.

I started by reading the paper, Bitcoin: A Peer-to-Peer Electronic Cash System. I had to re-read it, while I jumped on other blog posts and videos on YouTube until it made some sense. No, I don’t understand it completely but enough that I could start a transaction.

But for now, I would rather stick to the developer perspective. So I set out to find a way to make the blockchain. Go was the choice here as I also found a few resources which give out samples on building blockchain in Go.Resource

So here is the link to my GitHub for Blockchain in Go.Blockchain-In-Go

What is unique is this also shows the code to mine the block. Perhaps the most confusing part of Bitcoin was mining for me. Mind that we are only referring to blockchain and not any sort of crypto coins in the code.

I am not an expert here but I did figure out that a lot of things can be added to make the existing code more modular. Adding database, but which one do I need to figure out. Do we also use cache? Can we make a blockchain that is scalable, make it a microservice? I am still figuring things out and this is just the beginning.

If you are interested leave a comment here or suggest changes on my GitHub. We are working here to learn something new.

Top comments (0)