Core developer of
tech

How Substrate adds security to the development of Aleph Zero?

Alex Bączkowski

Content Writer

Apr 4, 2023

4 min read

The Aleph Zero blockchain takes advantage of the Substrate framework as a base for the security systems we’ve developed to ensure the safety of the network. 

Substrate, developed by Parity, is an open-source framework that allows for developing novel blockchains. It aims to simplify the process of launching Web3 solutions by offering developers building blocks that can be used creatively in a variety of contexts. A number of blockchains are built using these elements, including the Polkadot main chain, Kusama, and a significant number of parachains built on top of Polkadot itself. However, Aleph Zero, which was built outside of the Polkadot ecosystem, has also used Substrate to great effect for a variety of features, including those pertaining to security. One of the great advantages of Substrate is its modular design which allows builders to take what they need from it whether or not they want to build as an independent chain, bridge to the chains of their choice, or co-exist in the Polkadot/Kusama ecosystems. So what exactly did Aleph Zero source from Substrate? 

Building Aleph Zero Upon Substrate 

Aleph Zero used a number of solutions offered by Substrate, albeit with the caveat that these building blocks were used as jumping-off points for creating a truly unique blockchain ecosystem with its own consensus protocol that resulted in superior performance. One of the great advantages of using Substrate is that due to its popularity and the involved community of developers, it is constantly improving. The open-source nature of the project also means that it is constantly being audited by third parties, a quality that also contributes to the evolving security of the code. Additionally, numerous projects building on Substrate organize bug bounties, including Aleph Zero; however, the largest bug bounty is spearheaded by the Web3 Foundation, which provides a tremendous incentive for white hat hackers to help find potential security vulnerabilities.

Cryptography 

One feature Aleph Zero sourced from Substrate is their cryptographic solutions. Several components have been repurposed for our needs, including hash functions, digital signatures, and their blueprint for hybrid symmetric-asymmetric cryptography. We’ve also used Substrate’s Elliptic Curve Digital Signature Algorithm (ECDSA) and Schnorr signatures which help provide a high degree of security. The latter is especially efficient when dealing with multi-signatures. 

Storing Runtime Images and Forkless Upgrades

One of the elements we’ve used was the feature that allows Substrate-based chains to store the runtime image right on the chain. This allows the whole chain’s business logic to be updated in a secure and verifiable way. An added advantage is that Substrate and its Runtime Module Library are written in the Rust programming language, which means they are compatible with WASM. Both Rust and WASM are crucial elements of the Aleph Zero project. 

Another benefit of using Substrate is the guarantee of forkless upgrades, which is enabled by storing images. This is an important quality because when runtime images get updated on-chain, we will run into a situation where certain nodes will not be running updated software. If this occurs, their node will execute the correct version of the runtime regardless by interpreting it on Substrate’s integrated WASM virtual machine. This results in all nodes being always able to synchronize the chain correctly, which in turn prevents forking from occurring. This is especially important when we begin to explore multichain applications. Forks that occur within siloed chains are less problematic than those that occur once disparate blockchains begin to communicate with one another.

Substrate’s Modular Playground is Foundational to Aleph Zero 

The Cardinal Cryptography team has been incredibly inspired by the software development kit created by Substrate, as it significantly shortened the time in which the Aleph Zero blockchain was brought to the market. This open-source modular architecture, bolstered by a dedicated community of developers, aligns with Aleph Zero’s vision of what the blockchain space should strive for. These qualities have already been incorporated into the design of Aleph Zero as we intend to give developers building on this layer 1 the same kind of freedom and tweakability that were crucial to Aleph Zero’s development on Substrate. 

Let's talk Let's talk