If you feel dizzy after reading a couple of guides on the topic riddled with code, I totally understand. As a business owner, you don’t need the coding nitty-gritty to understand how to create a private blockchain network.
If you want to learn enough details to discuss the topic with developers and not waste your time deciphering through the lines of code, you’re in the right place.
I firmly believe entrepreneurs have little interest in building blockchains, private or not. They create platforms to host decentralized apps generating value. Here’s how you attack that.
- Private Ethereum blockchain development makes sense only in the context of creating a distributed application that relies on the decentralized nature of the chain. Such dApps may run on Ethereum and other private blockchains.
- Running a private blockchain on Ethereum is a solid choice due to the established developer community, support for smart contracts, and the general adoption of this chain.
- What makes a private Ethereum blockchain a good solution is using decentralized technologies while limiting access to the product for the general public.
Table of Contents:
- 6 Reasons to Create a Private Blockchain
- Why You Should Choose Ethereum
- 5 Steps to Create a Private Blockchain
- Limitations to Private Ethereum Blockchain Development
- Tech Stack for Building a Private Ethereum Blockchain
6 Reasons to Create a Private Blockchain
If you’ve skimmed our recent blockchain-related blog posts, you already know that a blockchain is but a publicly shared Excel spreadsheet, although much more secure.
Among other things, such as hosting hyped crypto, blockchain networks also happen to be:
- transparent (all participants can trace each other’s actions)
- anonymous (participants can remain fully anonymous)
- secure (it’s incredibly hard to hack, mess with data, or bring down a chain)
- congruent (all participants’ actions are logged and can’t be reverted)
Despite all these virtues, blockchains are still as public as it gets — their peer-to-peer nature allows anyone on the internet to join.
So why start a private blockchain?
If you’re in the healthcare business, the answer is crystal clear. The concept of medical data on a public peer-to-peer network doesn’t sit well with the industry’s regulations. Having a private blockchain immediately removes the burden of screwing up on that, big time.
On the contrary, if you operate in finances, why limit the audience? Well, the most common reason is to remove intermediaries.
Reasons #1 and #2: Stronger security and lower costs
If you’re good at reading between the lines, we’ve already discovered two reasons why developing a private blockchain makes sense:
- enhanced security
Private blockchains are also called permissioned for this very reason.
Participants need permission to join and act on such networks. Hence, there’s less probability to expose private data to the general (read global) public.
- reduced operating costs
Since private blockchains allow you to collaborate with other businesses directly (read no intermediaries), the costs involved with paying intermediaries go down.
Reasons #3 and #4: Transparency and anonymity
Okay, that’s already something. How about some other incentives to set up a private blockchain? Are there any?
In addition to lower costs and improved security, you also get the traditional bonuses we’ve already covered: transparency and anonymity (if necessary) of transactions.
All businesses and individuals with access to a private blockchain can see everything happening on the chain. At the same time, some users, e.g., patients, may remain anonymous if your business model requires that.
Reasons #5 and #6: Performance and data integrity
But that’s not all. If you’ve already dipped your toe into crypto trading, you know that most current blockchains (with any adoption at all) are far from being fast.
In fact, transactions may take minutes and sometimes even hours, depending on how many users transact and how much they’re ready to pay for transactions.
The good news is that in the case of a permissioned blockchain:
- you get to set the rules for transaction fees (if any)
- you get way faster transactions (fewer participants and no/lower fees)
On top of these features, you get:
- flexible data integrity
On a regular public blockchain, no one can change the data written to the chain unless they control 51% of nodes, which is virtually impossible.
|Quick reminder: a node is a computer running an instance of a blockchain and validating all transactions happening on the chain.|
As for private chains, you can customize its behavior by deploying additional logic or providing the tools for all participants to agree on a change. That way, you can change data on a blockchain and also customize its logic.
Still, why blockchain?
After reading all of that, you may still wonder, “What’s the upside of developing a blockchain-based solution instead of using proven cloud technologies?”
After all, cloud-based software paired with a mobile app (if required), developed off-chain, can work as well and even outperform a blockchain-based equivalent. So why bother?
The honest answer is blockchain technology favors specific business models.
Software running on a chain will serve you well when you want to drop intermediaries and establish completely transparent, secure, automated operations between multiple participants.
Why You Should Choose Ethereum
Ethereum, as you must have heard, is the open-source blockchain hosting the second biggest crypto — Ether (ETH). Why do people prefer this blockchain over other chains when developing a private blockchain?
Established and well-known
First of all, even though Ethereum comes second after the Bitcoin blockchain, it’s been around for quite a while — since 2015. That means the blockchain developer community has been playing with Ethereum for over 6 years. As a result, the chain has:
- time-tested development tools
- in-depth documentation
- plenty of tutorials and discussion groups
You may counter that with, “Didn’t the bitcoin network come first? Why not use that instead?” Unfortunately, the bitcoin chain is only suitable for transactions. Ethereum, on the other hand, was created to host decentralized applications in the first place, which brings us to the next point.
|Quick reminder: a decentralized app (aka dApp) is software consisting of a smart contract or several contracts running on a blockchain.|
Smart contracts are precisely why you would want to create a private Ethereum blockchain. Let’s admit that — the final goal is to spin up a decentralized application, which is only possible if you can deploy smart contracts to the chain.
Smart contracts are the basis of any dApp. They essentially represent an app’s logic, automatically performing the pre-programmed actions when interacted with. The two predominant types of contracts include ERC-20 and ERC-721. ERC-20 typically serves as a standard for crypto tokens, and ERC-721 represents NFTs. There are also other, more advanced types of smart contracts on Ethereum.
The two things you need to know about smart contracts are:
- smart contracts can interact with other contracts
- blockchain participants can trigger pre-programmed functions in a smart contract
You could argue that other chains, like Solana, also feature smart contracts. While that is true, you’re still more likely to find qualified developers with hands-on experience in creating Ethereum smart contracts.
Other blockchains typically either don’t support this functionality or use novel technologies for writing smart contracts.
Finally, due to its wide adoption, Ethereum has become the home to many decentralized applications and, as such, has seen the biggest user adoption. Usually, that wouldn’t matter since you’re building a private network anyways.
Still, suppose your software running on a permissioned blockchain requires onboarding new users from a wider audience, e.g., patients. In that case, it will be much easier to accomplish the task if they are already familiar with Ethereum.
5 Steps to Create a Private Blockchain
I’m glad you’ve made it through this far. Let’s discuss how to build a private blockchain using Ethereum without going into coding details.
If Ethereum is just a secure, shared spreadsheet with automatically executing formulas, we might as well click File > Make a copy to build a private Ethereum blockchain, right? Although it’s one of the possible scenarios, the process is a little more complicated.
Let’s take one step at a time.
Step #1: Start with why?
Why are you building a private blockchain anyway? I bet you have a business idea revolving around a blockchain and some decentralized applications running on it.
Image by Thomas Keller via ResearchGate.net
Some good examples in the healthcare niche would be:
- consortium-managed decentralized medical records
- medical IoT inventory management
- supply chain automation for tracking medicine provenance
- automation of patient consent gathering
- insurance claims management
If your goal is a fintech solution, you may be after:
- distribution of rewards among employees
- loyalty platform
- local lending/borrowing solution
So at this step, you go through your target audience’s needs and seek to find an agreement between the future users on how the dApp should function. Again, the end goal is a decentralized application that generates traction and improves your business’s efficiency.
Regardless of the purpose, your Ethereum blockchain will serve as the ground layer to validate transactions and host a dApp with its built-in business logic.
Related: Custom Mobile App Development Guide
At Topflight, we love to run a preflight workshop to craft the business strategy and create a lean canvas with all necessary details to attack the project. Besides looking into the technical feasibility of an idea, we work together on a strategic roadmap for your product and map business objectives onto its features.
Step #2: Hire the right team/ teams
In fact, you’re better off partnering with an agency because it’s less headache and greater efficiency for your business:
- no need to hire part-time remote employees, disconnected from your business idea
- faster development when all resources are used to working together as a team
- on-demand up- and downscaling of resources
- flexible approach to product development, adjusting to the market
- greater engagement with the focus on creating a perfect product-market fit
These are all signs of a confident development team making the best of the agile development framework. Imagine what it would take to hire and train a similar team in-house.
Working with an agile team allows you to literally see how your investment transforms into a tangible software product over time. Best of all, you get the flexibility to adjust the solution based on how the target audience accepts its early versions. In the end, you go to market with a solid product-market fit, immediately starting to generate traction.
Ideally, you’d find someone who can take the project from start to finish and has enough business acumen in your industry, plus the expertise in blockchain and traditional software design and development.
Step #3: Build a private chain
Once you’ve found the right development partner and refined your strategic roadmap, it’s time to create a private blockchain with Ethereum.
An experienced team of developers will nicely handle this task. Here are a few pointers so you can keep your finger on the pulse of what they are doing specifically:
- configure the chain’s parameters in the genesis block (the first block)
Simply put, that’s where you can choose how fast your network will work (by setting a 0 difficulty for block generation) and preallocate addresses on the chain with fake Ether balances. I call it fake because you can’t transact with it on the main Ethereum blockchain. Still, within your private blockchain, it’s a valid cryptocurrency for transacting.
- create accounts (aka addresses) for users and smart contracts
Unlike run-of-the-mill software accounts, blockchain accounts don’t offer much functionality beyond transacting. These accounts act like crypto wallets, allowing participants to transact on the chain, e.g., for the patient to make its medical record available for a particular clinic or doctor.
- start mining Ether and distribute it among participants’ account balances according to the business model
Mining happens nearly immediately as the chain is infant, and your node does all calculations while adding new blocks.
- add more nodes
An easy way to think of nodes is to imagine a server running an instance of a private blockchain (on EVM — Ethereum Virtual Machine). You will need enough nodes for all participants to execute equal rights over the product. Your devs will probably offer Infura (cloud service for running blockchains) or a similar scenario.
The points above describe how developers would set up a private Ethereum blockchain using Go Ethereum (aka geth), an Ethereum implementation of the Go programming language.
Here’s how developers are likely to describe the process to you. They install geth, verify if they want to use the Homestead version of Ethereum, or use eip155Block or other Ethereum Improvement Proposals (EIP). They then create the genesis file and modify it through the geth console (command line interface).
Fork Ethereum Scenario
Another scenario is to fork Ethereum. Remember how we discussed going to File > Make a copy in our spreadsheet metaphor? Well, that’s about this scenario; programmers talk about copying a blockchain in terms of creating forks.
With this approach, you get even more control over how your chain will operate. For example, you can implement another consensus mechanism, which is particularly useful to scale globally.
|Quick reminder: a consensus mechanism is how blockchains validate on-chain data, preventing fraudulent transactions. Proof of work and proof of stake are some of the most popular types of such instruments.|
You’d also need to remove all other dApps that Ethereum already has because you wouldn’t need to spend resources on maintaining them.
Overall, this scenario requires way more resources than the geth approach, and you should consult with your development partner on which variant works best for you.
Step #4: Build a decentralized app
Designing a private blockchain on its own makes very little sense. Just another decentralized network that drastically needs users to produce any value.
You will create a decentralized application that will sit on top of the private chain during this step. We cover the topic in-depth in our blogs on How to Develop a dApp and How to Create a Blockchain App.
Two things you need to remember when creating a decentralized application is you will need:
- smart contracts
- front ends for users: web and/or mobile apps
As soon as you realize there will be run-of-the-mill front ends involved, you know you need to go through the whole development process:
- prototyping the UI/UX and verifying it with the target users
- developing the front itself and its back end
Step #5: Deploy the dApp to the blockchain
Once the dApp is ready, it’s time to deploy its smart contract to the chain and the rest of its infrastructure to production servers. Ensure your partners establish a proper DevOps process in line with the agile best practices to simplify the app’s further maintenance and upgrades.
Limitations to Private Ethereum Blockchain Development
You need to be aware of a few compromises you have to make when you create your own private blockchain on Ethereum.
First of all, with a private blockchain, you no longer have a 100% uptime guarantee like on the main Ethereum chain with hundreds of thousands of nodes.
You need to take care of the chain integrity and security yourself, ensuring enough independent nodes to validate on-chain transactions.
I agree that total anonymity would probably negate the purpose of creating a private blockchain because it’s often designed to streamline collaboration between existing partners. However, you still can have users, e.g., patients, who remain anonymous to the rest of the network unless they open up access to their data.
Access rights management
Typically, only a few of the chain participants would have access to the critical network properties. For example, only founding members would be able to redeploy a smart contract if they agree it has to be updated with some options.
Similarly, you might want participants to have various rights on the platform: patients and healthcare providers should have different access rights. To achieve that, you’ll need to add yet another layer with access rights management.
Tech Stack for Building a Private Ethereum Blockchain
I totally agree that you don’t have to be a tech wizard.
Image by Sam Richards, software developer @ ethereum.org
Still, it’s a good practice to err on the safe side and ensure your development partner is familiar with mainstream technologies used for making private Ethereum network:
- Go Ethereum (geth) — for implementing the chain itself
- Solidity (programming language) — for developing smart contracts
- Remix — environment for smart contracts development
- the Truffle suite — for testing
- Infura — for deploying nodes
- Web3.js — to connect the chain with off-chain software
- Node.js, React, etc. — for developing off-chain components
Time to Start a Private Blockchain
You now know more about how to make a private blockchain than an average business owner. Hopefully, the information will be of use when you hit on a brilliant decentralized app idea. Definitely get in touch with our experts to discuss it when you do. We’ll help you refine it and release the product to the market in the best shape and form.
Frequently Asked Questions
Who can join my private blockchain on Ethereum?
Anyone with the credentials that you will provide.
How long will it take to create a private chain?
A couple of weeks to set everything up correctly. However, the real use of the chain starts with a decentralized app that may take another 3 to 6 months to develop, depending on its feature set.
I heard blockchains aren't very scalable when handling massive data sets. Are they?
You’re okay with a private chain because you don’t target the global market like the public Ethereum network. However, if a massive data directory is part of your solution, you’ll need an off-chain workaround.
Is there a software to automatically build a private Ethereum blockchain?
Not that I’m aware of. Such projects are very individual and still novel in the industry.