12.08.2022
blockchain

How to launch your own blockchain

Before you start working on your own blockchain, make sure everyone on your team knows what it’s for and how much money you have to spend on it.

Creating and maintaining a blockchain has its own set of challenges. They’re easy to ignore in planning if you underestimate the task’s scale and intricacy.

Read more about blockchain and games

Sergey Prilutsky, Head of Research at MixBytes, published a step-by-step guide to running blockchain to help projects avoid such blunders.

This article will assist you in selecting a blockchain engine for your project. Here are the technical characteristics and restrictions of blockchain, as well as the consensus method to use.

Building a blockchain from the ground up

Attempting to create a blockchain from the ground up is probably admirable, as many existing solutions have done so. Nonetheless, you should assess your team’s talents objectively.

Building your own database with a dependable network replication mechanism is similar to writing blockchain node code from scratch. If you look at how many of these databases have been developed over the last few decades, you’ll find that there are just about 100. Only a few firms (Oracle, MS SQL Server, MySQL, and PostgreSQL) have a significant market share, and the principal creators of these systems are well-known.

To build a blockchain node, you’ll need to assemble a group of really cool and rare specialists with experience in multi-threaded programming, cryptography, network protocols, complicated internal algorithms, and a working knowledge of how modern operating systems work.

Because the consensus algorithms of many validators can perform properly or completely differently when tens or hundreds of nodes are loaded, testing has a specific position in blockchains. In this situation, adding more developers will simply complicate communication within the team.

Based on our experience, business clients rarely choose this option. Creating your own blockchain is a task for a group of dedicated researchers who have the freedom to work without constraints, such as deadlines or a business plan. A team like this should be able to look into every issue that emerges without being concerned about the project’s timeline. At the moment, work on projects like Bitcoin and Ethereum is done by freelance individuals all around the world, with no set deadlines. External business pressures can be brutal to your project, causing you to address problems quickly without considering the ramifications.

Engines that support the blockchain

Because the term «engines» is frequently used in the software field to indicate a complex of diverse software that is meant to tackle a certain problem, I named the section «Engines.» «Search engine» or «graphics engine,» for example, encompasses not only code but also supporting software, supplementary tools, algorithm descriptions, and more. They should be named engines because there are numerous main blockchain cores around which existing networks are constructed (eg «build on Ethereum engine»).

It’s ideal to work with current engines if your blockchain doesn’t have a uniform design and you need to deliver a solution in a certain amount of time. They provide you the freedom to choose the type of consensus and transaction you want, as well as how you want to handle network validators. You may use open source software right now because it has been thoroughly tested on real networks.

You don’t have to edit the blockchain node’s code, and all you have to do is change the component provided by the engine developers to apply your logic. You can only focus on the business logic of your blockchain if you don’t introduce new security flaws or troubleshoot at the network level.

Let’s look at some pre-built blockchain engines that can help you run your own blockchain, create and implement its internal economy, and manage the launch of complex transactions.

Ethereum

This software package is built on the Ethereum blockchain’s public core. Proof-of-Work is used in public Ethereum, and many of its test networks use various sorts of Proof-of-Authority and Proof-of-Stake consensus. The software complies with the most stringent security requirements, has been thoroughly tested on dozens of real-world networks, and is, in my opinion, the most advanced for establishing blockchains with any consensus and fully functional, multi-functional smart contracts.

The role of the POA Network project, whose creators have done an excellent job and have already created multiple fast and dependable networks, is worth emphasizing. The POA network is more faster than the original Ethereum network, but it also has the same durability and variety in terms of executing all transactions, and validators (miners) are played by computers whose operation is legally certified. This network can be used as a model for developing business blockchains based on Ethereum.

Consensus and blockchain node code

The Ethereum node code is implemented in two ways: in Rust (code names: poa-parity (old) or openethereum (new)) and in Go (code, names: geth).

As of this writing, the clique consensus protocol is the simplest and least secure protocol with no finalization that can be used for more than just testing purposes when establishing a PoA network on Geth (Go).

Poa-Parity (Rust) uses two algorithms to achieve consensus: the Aura schedule validators and the GRANDPA finality device. This is a tried-and-true solution for Ethereum-based POA networks. POA Network is also working on putting the HoneyBadger BFT Consensus into action.

Special emphasis should be paid to the new Nethermind blockchain node, which was written in C# for the.NET Core platform. It is an excellent solution for organizations using.NET Core because it fully supports Ethereum and a wide range of operating systems.

Ethereum allows you to use the web3.js JavaScript library regardless of consensus, validators or localization.

For Ethereum POA, there is a repository that automates network deployment operations — Deployment Playbooks.

If you plan on running Ethereum POA, please use this guide. This will take you from generating validation keys, starting the first nodes, deploying system contracts, to running the validation interface and block explorer.

There is a ready-made Ethereum POA network in AWS, but I still recommend controlling the launch yourself. You need to understand what services you use and how they work.

EOS and its forks

EOS will come second in terms of guaranteed uptime and safety. It was no coincidence that «OS» appeared on his behalf.

EOS can function as a standalone network, PoS or PoA. Like Ethereum, this software is battle tested, has strong security and features that allow you to run your own blockchain with smart contracts to automate all transactions.

If Ethereum has a simple addressing system, EOS immediately uses a hierarchical system of accounts and permissions for various actions. All this makes EOS similar in structure to an operating system — a «program to run other programs».

As a business-to-business platform, EOS enables a convenient account management system and quick consensus, as well as easy integration of almost all functions with C Plugins ++ and C ++ / WebAssembly Smart Contracts (e.g. you can add another cryptography).

The structure of the EOS consensus and fast blocks enable very fast user reaction time, which is extremely important when building decentralized applications with complex functionality (eg Cyberway, Golos.io projects or Common Social network). Cyberway has recently carried out a complex migration of all business logic from the previous blockchain in a transparent manner to users, once again proving the flexibility and versatility of EOS.

Blockchain node code and consensus

EOS code is written in C ++ and is based on the experience of programmers working on the Graphene, Bitshares and Steemit engines. It uses its own version of the DPoS consensus.

Now almost all DPoS projects build their algorithms very similar to EOS: these are accounts that «vote» with token balances for the best validators. Validators sign blocks one at a time, but each one at a specific time interval on a schedule. Then together they repair the so-called the last irreversible block (LIB) that collects 2/3 + 1 signatures from validators.

Many EOS forks are trying to improve this consensus. For example, our version of Haya uses another last resort gadget, RANDPA, to do LIB checking to achieve a finality time of 2-3 seconds.

Moving to the corporate POA consensus is not difficult as the list of validators is controlled by smart contracts in the system.

Smart contracts and network management

Smart contracts in EOS use a modified WebAssembly VM, are typically written in C ++, and can be created and used by any account. Writing smart contracts is not difficult, they have something to do with Solidity in many ways.

In EOS, as in Ethereum POA, network management, main tokens (or tokens), and transaction types can be implemented in system smart contracts (here, for example, system tokens). An interesting feature of EOS contracts is the use of table abstraction to store contract data. Ethereum mainly uses mapping (hash).

Another feature of smart contracts in EOS is scalability. The contract owner can override it by updating the logic or fixing a bug. This is very different from Ethereum, where the immutability of contracts is an important condition to ensure that the logic of the contract never changes unless there is a hard fork.

I think for multi-enterprise blockchains, the ability to change the contract code is a key benefit. It’s still impossible to steal something undetected here, but you can update the code with the consent of the parties without any action by the validators.

In EOS, it is possible to organize «sponsored» transactions that are paid for by contractors, not by the users themselves. This is a great opportunity to attract new users. Do you remember that there are no «free» transactions in blockchains without losing security?

Additional software is required

BOSCore, Telos, Haya, and a slew of other EOS forks demonstrate that the software is useful for a wide range of tasks. There are enough tools for EOS that you don’t need to start from scratch with the supporting software.

Eosjs is a web3.js counterpart that lets you work with contracts on any EOS-based network from any browser or application.

EOSTracker is a decentralized block explorer and voting program for validators that is open source.

Because EOS lacks a large and strong integrator like Ethereum’s POA Network, each project must develop its own solution. The underlying node code, on the other hand, is stable and works without crashing even under severe traffic.

Добавить комментарий

Ваш адрес email не будет опубликован.