The team at Whiteblock is pleased to announce our partnership with the ETC Cooperative on a new proof of concept research project. This time we’ve teamed up to provide proof of concept of the use of Keccak256 as the Proof of Work (PoW) consensus algorithm for the Hyperledger Besu Ethereum client.

What is Keccak?

Keccak is a hash algorithm family. Hash algorithms serve as building blocks of the PoW consensus algorithms in blockchains and distributed systems. For example, the Ethereum network’s current PoW consensus algorithm, Ethash, is based on Keccak256, Keccak512, and a Directed Acyclic Graph (DAG). The Keccak family in particular was originally submitted in 2012 as part of the standardization competition of what would later be known as SHA-3. However, SHA-3 in its final form standardized by the National Institute of Standards and Technology (NIST) in 2015 would include some late stage parameter tweaks and padded zeros that deviated from the original 2012 submission. This led to a fair amount of confusion among teams in the industry and an overzealous use of the term “SHA-3” when in fact Keccak256 is the hash algorithm being used.

Why Use Keccak256?

For Ethereum Classic (ETC), the use of Keccak256 presents several core benefits, not the least of which is that a separate mining algorithm to the Ethereum network for ETC would encourage a mining community dedicated specifically to ETC. This would subsequently discourage the recent wave of double-spend attacks and the attempted monopolization of hashpower on the ETC network. 

Since Solidity, the primary language of the Ethereum network, has a native Keccak256 function, the implementation of Keccak256 for PoW in ETC presents the ability for smart contracts and dApps to be verified on chain, and makes much more feature rich layer 2 development possible. Additionally, teams within the community such as Epic Blockchain Technologies have a vested interest in building ASIC mining hardware that leverages this built in Keccak256 feature.

Hyperledger Besu Keccak256 Implementation

Switching the Hyperledger Besu client to Keccak256 mining is done by properly configuring the genesis file, similarly to how it is currently done with Ethash, Clique, IBFT, etc. The new key to use under “config” key is “keccak256pow”.

Implementing Keccak256 mining required extending a few components of Besu’s Ethereum core packages, with the most changes in the Blockcreation package. The class names introduced all have “pow” appended (e.g. Keccak256pow) to avoid any confusion with Keccak256 hashing functions. Because the Proof of Work is to replace the Ethash algorithm, the implementation was modeled after the Ethash implementation to maintain compatibility and readability. Additional abstractions were introduced to maintain side by side compatibility with Ethash.

To complement the Keccak256pow feature, we have created some tools to get developers started as soon as possible on joining our testnet and creating their own. The tools can be found in our Besu Keccak256 Proof-of-Work Testnet. Tools include a pre-built docker image with the extended Besu client developers can use to join our testnet or their own.

What’s Next for ETC?

ETC has stood the test of time and long attracted a stable flow of investors, so continued iteration and improvement of the network should be expected for a long time to come. Our research into this proposed change in its PoW consensus algorithm within the Hyperledger Besu client provided promising results, and the live testnet is currently hosted and maintained by Whiteblock to encourage ideas for future iteration from the ETC community.

Sign up for Whiteblock Genesis and try out the Keccak Testnet now.

Get Free Early Access To The Beta

Get Free Early Access To The Beta

You have Successfully Subscribed!