With the KOINOS testnet developer preview it’s crazy easy to run a blockchain on your computer
Sooooooooo, I won’t lie… this post about the KOINOS testnet developer preview has been sitting in draft form for at least 20 days. I got caught up in a tornado of technical confusion initially, and then just left it for ages. When I jumped back into it this morning, it literally took me minutes to figure everything out and boot up a blockchain on my PC. It was embarrassingly simple and I want to thank @andrachy and @vandeberg for helping me… and @motoengineer for putting up with my insanely confusing comments in the Koinos Discord. They’re a good bunch in there…
Let’s get this started
I’ve got about 10 posts on the Koinos blockchain on my blog, and while I initially detailed my experience mining it and my first experience with an AMM (automated market maker, ie Uniswap), I haven’t really delved into the technical side of it.
I’m not super technical when it comes to blockchains, there’s a lot under the hood that I really don’t understand, and I never really learnt how to code (huge regret) but the Koinos blockchain seems like a good one to start with. The main reason is that is hasn’t been built yet… which, ah, seems like a good beginning point for me.
When I saw this post…
… I realised that now is the time to get stuck in and start learning the things.
From watching the video attached to the post above, I realised that this isn’t the testnet itself… The testnet will be a connected networked version of the Koinos blockchain that you’ll be able to test smart contracts out, without incurring any of the costs (especially if there is an error in the smart contract).
Instead, this is a Developer Preview of the testnet… which means you’re running the entire blockchain (or components of the blockchain if you prefer) on your PC. It’s not connected to anyone else so you’re free to make as many errors as you can without affecting anyone else.
This is a huge relief for me, I really don’t want to break anyone else’s stuff, nor accidentally lose KOIN because I did something wrong… I just want to learn what I can… so let’s get this developer preview testnet thing up and running.
Step 1 – find the Koinos blockchain
The Koinos Blockchain will have lots of different microservices that people can run depending on what they need… and this means that the Koinos Github has a number of repositories.
The README.md page at the very start has the instructions you’ll need…
Step 2 – download the Koinos code
You’ll need to clone this repository.
If you’re a git guru you can fork it and set it up in your own git and do all the things… but I still find GitHub super confusing so I just downloaded the ZIP file to my own directory.
I put the ZIP file in the directory I wanted this Koinos Developer Preview to be in, and the extracted all the files.
One thing I learned from my days of technical confusion is that the ‘docker-compose.yml‘ is the file that’s going to get you started… so make sure that’s in there…
Step 3 – download Docker to run the code
You’ll need a program called Docker. I don’t have that so I had to install it.
My internet connection is so terrible these days, so downloading Docket took me like 20 minutes… hopefully you absolutely rocketed through…
After downloading and installing, Docker asked me to reboot my computer. Upon reboot I was getting this message:
That link above took me to this page… and then I clicked on the WSL2 Linux kernal update package for x64 machines…
This downloaded another thing… which I clicked on and it wanted to install this thing…
Once that completed… I clicked on the Restart button of the Docker Desktop message above and it all continued processing. Win!
Docker itself wanted to take me through a tutorial… which I totally went through but won’t subject you to. After going through the tutorial (which I didn’t really understand to be honest) I got to here:
I’ve never had any exposure to any of this before… but I think that the 3 menus on the left are basically buckets that I put code. “Containers / Apps” are individual sections/processes that are isolated from the rest of the things your computer is doing. “Images” are not actual images/pictures… but an image of a self-contained computer essentially… so each image is it’s own entire world/environment. “Dev environments” seem to be where people can share code without having to set up a whole new world for it.
Okay… so what now?
This is where I launched headfirst into the tornado of technical confusion, I want down this total Docker rabbit hole with Powershell and the Docker Desktop trying to figure it out… but it turns out the answer wasn’t in Docker at all.
Step 4 – run the KOINOS testnet developer preview
Make sure your Docker Desktop is active… I’m using Windows 10 so I just need to check that it’s on in the Windows tray thingo.
Now, you can either use the Docker Desktop or the Command Prompt to get this party started… I couldn’t get it to work with PowerShell so I wouldn’t recommend that guy.
If you want to use the Command Prompt because you’re old school… open it up, find your directory and then type “docker-compose up“…
It’ll do some downloady things first… but before long you’ll be producing blocks like an absolute boss of blockchains…
Here’s a close up of a block being produced…
You’ve done it… you’re running a whole blockchain on your computer! Who even needs the rest of the world? Not you!!
If you’d prefer to use the Docker Desktop, go to the Containers / Apps section, and find koinos-master. For me it just appeared… I’m guessing because Docker found that ‘docker-compose.yml‘ file.
When you select it you’ll see a Start button. Press that one!
The little icon will go Yellow…
and if you click on the whole line… you’ll see the actual blocks being produced…
So there you have it…
Hopefully literally anyone can run this blockchain on their PC with these instructions. If you have any problems do let me know and I’ll see if I can help… otherwise I can’t recommend the Koinos Discord enough.
Running a blockchain on your computer is fun and all… but what are the next steps? Honestly, whatever you want them to be… personally I’m going to start to see if I can figure out how to run a smart contract on Ethereum (because I assume it’s the best documented) and then see if I can figure out how to run a smart contract on my Koinos personal testnet.
If you’re interested in learning more about Koinos, here are some of the previous chats with Andrew …
Previous Koinos content
Koinos Developer Testnet Preview and BitClout
Koinos mining update
Will the US Government ban Bitcoin?
Real use cases for Smart Contracts
Clarion OS & KOINOS announcements!
Koinos Plans for 2021 – come join the community!
Transaction Speeds – Centralization vs Decentralization
Institutional store of value in digital assets?
Tokenomics of Blockchains
Enterprises and Public Blockchains
Feeless Blockchain Transactions – How does it work?
Token distribution – Mining KOIN and Proof of Work
Integrating with Koinos
Smart Contracts – what are they?
A conversation with Andrew from the KOINOS Group
Additionally, here are all the good bits:
Koinos Network Socials
Koinos Group Socials
Thanks so much for going through this funness with me! The KOINOS testnet developer preview really was a wild but ultimately easy ride…
Please note : The above post may contain affiliate links.
Below are some product referral links that I love and will benefit us both if you’re interested.
Splinterlands – A super fun blockchain card game that I play almost every day.
Coil – A $5 USD monthly subscription fee provides you access to a ton of content and sites in a way that fairly rewards the creators of that content.
Exxp – The WordPress App to link your blog to the Hive blockchain.
NomadTask – Earn for completing online tasks like following accounts or completing reviews.