ref: ADR-0001 (#226)
emerald currently has malachite consensus directly calling Engine API methods (generate_block, notify_new_block, set_latest_forkchoice_state, etc.) throughout app/src/. this couples consensus logic to EVM execution details like retry config, fee recipient, fork detection, payload caching, and validator contract reads.
introduce a consensus-agnostic ExecutionLayer trait in a new crates/core crate as the single integration boundary. restructure the codebase so malachite consensus is generic over this trait and the EVM Engine API is one concrete implementation behind it.
crate layout after
crates/
core/ # ExecutionLayer trait (no malachite, no alloy deps)
consensus/malachite/ # malachite consensus, generic over ExecutionLayer
execution/evm/ # Engine API impl of ExecutionLayer
cli/ # single binary wiring everything together
existing emerald start behavior is preserved throughout. each PR compiles and passes tests independently.
ref: ADR-0001 (#226)
emerald currently has malachite consensus directly calling Engine API methods (
generate_block,notify_new_block,set_latest_forkchoice_state, etc.) throughoutapp/src/. this couples consensus logic to EVM execution details like retry config, fee recipient, fork detection, payload caching, and validator contract reads.introduce a consensus-agnostic
ExecutionLayertrait in a newcrates/corecrate as the single integration boundary. restructure the codebase so malachite consensus is generic over this trait and the EVM Engine API is one concrete implementation behind it.crate layout after
existing
emerald startbehavior is preserved throughout. each PR compiles and passes tests independently.