MoonBlokz series part I. — Building a Hyper-Local Blockchain by Péter Sallai

Last year, I embarked on an exciting pet project: creating a blockchain specifically optimized to run on microcontrollers with radio communication capabilities. Over the past few months, I successfully designed and implemented this blockchain, which I named MoonBlokz (www.moonblokz.com). In this series of articles, I will provide a comprehensive overview of the algorithms used and the implementation decisions I made throughout the process.

Before jumping into design and implementation, some fundamental questions should be discussed:

Why create a new blockchain when solutions like Ethereum, Hyperledger Fabric, and Mira are readily available?

The core idea of blockchains is to establish a payment and accounting system that operates independently of the current centralized and regulated financial infrastructure. However, existing blockchains still rely on high-speed internet as a central infrastructure. MoonBlokz, on the other hand, is designed to operate using small nodes, potentially powered by solar energy, that communicate solely through radio signals. This unique approach eliminates the need for high-speed internet, making it ideal for remote or resource-constrained environments. My goal is not to build another worldwide network but to develop the technology to create an economy where nothing is available.

Example use cases

To illustrate the possibilities, I outline three potential use cases for MoonBlokz. While these may not be the best examples, they help to understand the system’s capabilities:

1. Payment between autonomous devices in space

The first example stems from our bright future. In the coming decades, we may utilize the resources available in space, with various automated and non-automated agents collaborating on tasks such as mining asteroids.

These devices will operate far from any central infrastructure on Earth, aiming to establish a functioning economy that facilitates task sharing and revenue distribution. A lightweight blockchain could serve as the foundation for this economy by providing a local contracting and payment infrastructure. While I recognize this is a moon-shot vision, I believe large-scale space utilization won’t be possible without functioning local economies.

2. Local payment network for a town

The second use case draws inspiration from a potentially dark future. One of my favorite books and TV series is The Expanse. In one of the episodes, Amos Burton states:

Thing is, we’re humans. We’re tribal. More settled things are, the bigger your tribe is. All the people in your gang, or all the people in your country. All the ones on your planet. Then the churn comes, and the tribe gets small again.

Today, we live in large tribes and rely heavily on centralized infrastructure, particularly regarding payments. However, if something were to happen that forced smaller tribes — like towns or cities — to organize independently, how would we conduct financial transactions? We would no longer be able to use our credit cards. Are we to revert to using attractive shells as currency?

By utilizing a local blockchain where all (or many) households in a town function as nodes, we could create a financial infrastructure without relying on a central authority.

3. Payments & Contracting in large rural construction site

The third example is more grounded-to-earth. Even today, there are many instances of companies collaborating in rural areas to facilitate transactions. For example, in a large-scale construction project, automated devices or human workers can use a local blockchain to manage their contracts and payments efficiently with minimal administrative effort.

Goals & Assumptions

After examining the use cases, let’s define our objectives. To clarify my goals, I compiled the following list of requirements to guide the project:

  1. The blockchain implementation must securely and reliably handle cryptocurrency transactions between nodes.
  2. The network should work from two to tens of thousands of nodes.
  3. The consensus algorithm should support the operation of the network.
  4. The prototype system must operate on a standard microcontroller readily available on the market.
  5. The strength of radio communication should not limit the physical size of the network. To relay messages effectively, the nodes create a mesh network. Typically, the network is connected, and every node is within range of multiple nodes.
  6. The implementation must efficiently manage weak and unreliable radio communication and temporarily disconnected network parts.
  7. The solution should be portable across different microcontrollers (or computers) and various radio communication technologies.
  8. Nodes should be easy to configure, requiring minimal setup.
  9. The system should support chain-level configuration options for different use cases, both for operational and macroeconomic parameters.
  10. The minimum viable product (MVP) prototype should initially handle only currency transactions. Still, the blockchain should be designed to support various types of payloads in the future (with smart contracts or other technologies).

To define my requirements for supported hardware, I also gathered the following assumptions:

  • Each node can measure elapsed time, although this measurement may be inaccurate (CPU tick counting); there is no access to a global time.
  • Every node is equipped with some form of persistent storage. The implementation must be efficient enough to work with limited storage capacities, which may be as small as a few megabytes.
  • Nodes communicate solely through radio signals. While various forms of radio communication are available, MoonBlokz must support low-energy and low-bandwidth options. The prototype shall work with LoRa.
  • The nodes may or may not have true random number generators. The system should be able to function without one, although this will limit its functionality, particularly regarding onboard key generation.

That’s all for now. In our next session, I’ll dive into the technologies and architectural concepts to use. You can read it here.

Author: Péter Sallai

Source: https://medium.com/@peter.sallai/moonblokz-series-part-i-building-a-hyper-local-blockchain-2f385b763c65

Have a question?

If you are interested in our solutions, contact us via the form below.

Dorsum is proud to benefit from the European Commission’s Brexit Adjusment Reserve.
Learn more about our project aimed at aligning our Wealth Management Suite to the UK market. (Hungarian content)