hiero-ledger / hiero-ledger/hiero-consensus-node

[EPIC] Besu Native libs verification

Open
#18,776 0 comments 0 reactions 1 assignee Claimed by @stoyanov-st View on GitHub
Epic Hedera Smart Contract Service
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

Previously we have faced issues when updating the Besu libraries to newer versions, mainly with deploying consensus node image that would produce perfomance impact, and require hot-fixing and unwanted calamities due to missing native libraries on the deployment environment/s.

This design aims to come up with a solution to verify the existence of said native libraries before the consensus node is actually started.

We can take as a reference the way that the Besu CLI does add with version 25.3.0.
https://github.com/hyperledger/besu/pull/8418

By mapping over the required native libraries for mainnet and leveraging either the `isNative()` or `maybeEnableNative()` methods for each of the libs implementations we can verify that all the required native libs are present for the env.

We want to be able to stop the start-up of the node if any of those are missing to minimise the chance of error during execution that would result in catastrophic failures and downtime.

After researching the method used by Besu CLI and understanding of the start-up of a Hedera node, there were several places in the codebase where we could plug the verification check.
With the smart contracts team agreeing on including the check in `ContractServiceImpl`.
This way the verification is in the direct domain of the smart-contracts service thus giving us the full control over managing and maintaining this strategy.

The feature should have configuration options to switch between "warning" mode and "halt" mode.
- in Warning mode, after verification is done, if unsuccessful we should only add warning logs and continue with the start-up of the node (DEFAULT)
- in Halt mode, after verification is done, if unsuccessful we should halt the node with appropriate logs and message.

As this feature also changes the version of the Besu EVM to 25.3.0, the feature with also add a new version for the HederaEVM at v63 and also provide overrides for the newly added op-codes with said EVM version.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.