
This is the 3rd blog in a comprehensive blog series meticulously exploring the intricate convergence of the Ethereum Virtual Machine (EVM) and the Cosmos ecosystem. Our investigation specifically scrutinizes this convergence through the analytical framework of layered blockchain architecture, a conceptual paradigm that has garnered substantial prominence subsequent to the pivotal Ethereum Merge in 2022.
Previous articles in this series, Part 1 and Part 2, primarily concentrated on elucidating the monolithic architectural paradigm, wherein a singular blockchain functions as a self-contained entity within the broader Cosmos framework. While instrumental for apprehending foundational concepts, this monolithic perspective does not fully encapsulate the evolving landscape of blockchain design.
The present article, conversely, reorients its focus toward a more granular examination of layered architectures. We will meticulously dissect the two fundamental layers that constitute such systems: the consensus layer (CL) and the execution layer (EL), as well as the interoperability between them. By rigorously analyzing the distinct responsibilities and functionalities of each layer, we aim to uncover their profound and respective implications for both the Cosmos framework and the EVM.
This in-depth analysis will illuminate how the judicious separation of concerns between these layers can engender enhanced scalability, flexibility, and interoperability within the blockchain domain, ultimately shaping the future trajectory of decentralized applications and networks.
Following the momentous Merge, the Ethereum mainnet underwent a fundamental transformation, resulting in a sophisticated architecture comprised of two distinct and specialized functional layers.

Since the Merge, the inherent complexity of Gasper FFG: Casper FFG (Friendly Finality Gadget) with combining of LMD (Latest Message Driven) - GHOST (Greedy Heaviest-Observed Sub-Tree), to elaborate on the aforementioned glossary, is not even easy to understand.
Interoperability through the Engine API is a key area of focus. Since the Merge, the Engine API has seen several iterations, with version 5 anticipated by Q4 2025 alongside the upcoming Fusaka upgrade. However, this article will use the [Shanghai Spec] (https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md) as an example to demonstrate the interoperability between the Execution Layer (EL) and Consensus Layer (CL) via Engine API v2:
engine_exchangeCapabilities: Facilitates the exchange of supported Engine API methods between clients;engine_forkchoiceUpdatedV2: Updates the fork choice of the EL client and initiates the payload build process;engine_getPayloadV2: Retrieves an execution_payload from a build process previously started by engine_forkchoiceUpdatedV2 by CL client;engine_newPayloadV2: Used by the CL client to send an execution_payload to the execution layer client for validationThe complete workflow is illustrated in the following image:

According to Blocks, the execution_payload, representing a duplicate of the Execution Layer(EL) block, is an integral sub-field within the beacon block object. It is crucial for the beacon block's creation and propagation in the Consensus Layer (CL). The process unfolds as follows:
engine_forkchoiceUpdatedV2 to the Execution Layer (EL), which updates the EL client's fork choice and initiates the execution_payload build process. The CL receives a buildProcessId as a response.engine_newPayloadV2.Ethereum's architecture, featuring decoupled Consensus Layer(CL) and Execution Layer(EL), facilitates the integration of new consensus engines into the CL while maintaining compatibility with the existing EL. This is achieved through the Engine API, which carefully designs communication protocols and data structures to ensure seamless information flow and network stability, thereby optimizing Ethereum for efficiency, scalability, and resilience.
In the past two years, innovative projects like Berachain and Story Protocol have actively explored alternative consensus mechanisms. A significant area of this research and development focuses on the feasibility of replacing Gasper FFG with CometBFT(former Tendermint) in the Consensus Layer. The CometBFT, a well-established and widely utilized Byzantine Fault Tolerant (BFT) consensus engine, offers distinct characteristics and potential advantages that some teams believe could enhance certain aspects of the Consensus Layer compared to Ethereum.
BeaconKit, the Berachain Consensus Layer, is a groundbreaking, modular consensus layer that integrates the CometBFT consensus algorithm with any EVM execution environment, making it compatible with EVM blockchains. This is achieved by bundling CometBFT with a modular middleware layer engineered to accept blocks from any execution environment adhering to the Engine API specification. The overall architecture can be seen below:

CometBFT's consensus mechanism, as detailed in the ABCI++ specification, significantly differs from Ethereum's. Block creation involves four primary ABCI interfaces/methods, which can be understood by comparing them to the Ethereum mainnet process:
engine_forkchoiceUpdated and engine_getPayload.engine_newPayload sent to the EL for block validation.ForkChoiceUpdate (FCU) request, without payload attributes, is sent to EL clients to update the state.Substituting CometBFT as an alternative consensus layer appears to be largely compatible with the current Engine API specification and the existing EVM execution layer. Nevertheless, slight discrepancies between the two consensus algorithms and their respective implementations might introduce high-severity vulnerabilities.
As highlighted earlier, the four core methods(PrepareProposal, ProcessProposal, FinalizeBlock, and Commit) within ABCI form a robust consensus engine. These methods are designed with atomic revert operations to ensure the consistency of the entire block production process.
In the BeaconKit Cantina Competition Report, the ProcessProposal step, essential for validating proposer creations, treats all errors as "non-fatal", as shown in the code snippet below:

When an invalid proposal is encountered, two approaches are possible:
BeaconKit adopts the second approach, accepting all proposals regardless of their correctness, as shown in the code snippet below:

This design choice results in createProcessProposalResponse accepting invalid proposals, which impacts the subsequent process during the block finalization stage within FinalizationBlock. This will lead to several severe consequences:
execution_payload (EVM transactions).To ensure alignment with the Execution Layer, the ProcessProposal logic must reject proposals that lead to an execution error, thereby reverting the proposal process.
The verifier.verifySidecars function, used in ProcessProposal to verify sidecars, fails when duplicate KZG commitments are detected due to an error in its duplicate detection logic, as shown in the code snippet below:

If two blobs within a single EVM block contain identical data, they will generate the same KZG commitment. When the Consensus Layer (CL) prepares a proposal for this EVM block from the EL, it will include two sidecars with identical KZG commitments. This will cause ProcessProposal to fail due to a flaw in the aforementioned duplicate detection logic. Consequently, a malicious user could exploit this to halt the chain by submitting two blob transactions with identical blob data, leading to repeated proposal reversions.
Duplicate KZG commitments should be accepted by the duplicateCommitment check when the sidecar index differs. This allows for two blobs to contain identical data while preventing duplicate sidecars.
Inspired by Ethereum's post-Merge architecture (since 2022), this article explores a layered blockchain design consisting of an Execution Layer, a Consensus Layer, and Engine APIs for inter-layer communication.
Significant innovation has emerged through adapting this model, particularly by replacing Ethereum's consensus layer with the widely adopted CometBFT engine. This approach aims to deliver an enhanced scalability EVM (Ethereum Virtual Machine) experience while preserving security and robustness. Projects like Berachain and Story Protocol demonstrate the success of this approach in achieving desired outcomes.
However, differences in consensus engines can introduce potential flaws in both mechanism and implementation, necessitating thorough investigation. CertiK is dedicated to providing fundamental security assessments to safeguard the overall security of complex blockchain protocols employing layered architectures.