Silkworm and Akula, the future of Erigon

Giulio Rebuffo
4 min readAug 10, 2021

--

I Believe we should pay attention how fast is the Go-Ethereum database is growing everyday in terms of disk size. The Go-Ethereum database is growing approximately 10 Gigabyte per day. However, a new client has come to fix this problem, Erigon whose database footprint is slightly higher than 1 Terabyte(Against Go-Ethereum’s 6 Terabytes) and that can sync an entire Archive node less than a week(while Go-Ethereum takes almost a full month).

If you have never heard of it, here is a recap 👇 (Skip it if you are already aware of what Erigon is)

What is Erigon:

Erigon is an implementation of Ethereum , on the efficiency frontier, written in Go. here are the several new concepts it introduces:

  • A modular client design, enabling parallelized development of the client
  • New (“flat”) model of storing Ethereum state, allowing a lower disk footprint
  • Preprocessing of data outside of the storage engine, making database write operations faster by a magnitude
  • Staged synchronization technique, allowing very fast synchronization. More information on stagedsync here: https://github.com/ledgerwatch/erigon/tree/devel/eth/stagedsync#readme

Benefits:

  • Much lower disk footprint
    - 1.2TB for archive node, 430GB for pruned node.
  • Faster sync speed
    - >10 blk/s at tip, compared to <1blk/s for OpenEthereum.
    - An archive node can be bootstrapped in under 3 days.
    - Performance improvements allow Erigon to run even on HDD.
  • Crash resilience
    - Forceful shutdown or power failure cannot damage Erigon’s database.
  • New vision of modularity
    -
    P2P and web3 RPC services can be run as separate components on a remote machine.
  • Full support for OpenEthereum/Parity `trace_` API, including `trace_filter`

If you would like to know more about Erigon, i suggest the following: https://medium.com/openethereum/gnosis-joins-erigon-formerly-turbo-geth-to-release-next-gen-ethereum-client-c6708dd06dd

Silkworm and Akula

However, The Erigon written in Go as we know it, is not going to become the ultimate official client. As a matter of fact, that is just meant to be used as a mere prototype in the future to test out new features on, to then be released on the actual super-efficient clients. Give a warm welcome to Silkworm and Akula. Akula and Erigon are from scratch clients that aims to implement the mature ideas implemented in Erigon and combine them with the best of C++ and Rust respectively.

Silkworm

Silkworm the C++ implementation of the Erigon client. Which is aimed to be more efficient than Go due to the programming language itself producing more efficient binaries. As a matter of fact, Silkworm individual components are almost as twice as fast as their Go counterparts. Here are a few examples:

  • Execution (Erigon vs Silkworm)
Erigon on the left, silkworm on the right. Note: These tests were made a long time ago but i think it still gives the Ideas.

By the way those are hours not days.

Silkworm also makes use of evmone, a C++ implementation of the Ethereum Virtual Machine (EVM) that aims for clean, standalone EVM implementation that can be imported as an execution module by Ethereum Client projects and thatis optimized to provide fast and efficient execution of EVM smart contracts.

In addition to this, alongside silkworm, we are developing API service, SilkRPC, written in C++20, that aims to achieve better performance than the current Erigon RPCDaemon.

Code implemented in Silkworm

In Silkworm, every single stages except for call traces, downloader’s stages and interhashes stages has been implemented. Stage Loop is yet to be started. ETL framework has already been implemented. and support for mining has yet to be started. In other words, we are somewhat close to a barebone client.

Akula

Akula is the Rust implementation of the Erigon client. Which is aimed to be more efficient than Go due to being very similar to C++ it is supposed to produce more efficient binaries. Additionally, Rust is deemed as a very fast language to write code and implement new features in, faster than C++ in that matter. However, very little has been written in Rust so far so we have no data to back this claim up just yet.

Code implemented in Akula

In Akula, we have implemented the block hashes stage, the ETL framework and MDBX bindings. Additionally, like Silkworm that makes us of evmone, Akula have an EVM version written in Rust, evmodin, for the sole purpose of having the entire client written in Rust.

Apache License

We also chose a different License for the development of Akula and Silkworm and that is Apache 2.0. As a matter of fact, The GNU GPL is a copyleft license. So software that uses any GPL-licensed component has to release its full source code and all rights to modify and distribute the entire code. The Apache License 2.0 doesn’t impose any such terms. In other words, if an enterprise wants to make their own version of Erigon, they can do it without having any restrictions.

--

--