# Week 12 and 13 This were busy weeks where our primary focus was to pass the eest tests. After that we rebased the latest main in our work and made neccessary refactoring. ## Ethereum Execution Spec Tests Result When we first ran the tests we could only pass the valid cases,our primary idea was that we are lacking proper checks. With that in mind we added presence check like: ```rust pub fn validate_amsterdam_block_access_lists<B: Block>( block: &SealedBlock<B>, ) -> Result<(), ConsensusError> { let bal = block.body().block_access_list().ok_or(ConsensusError::BlockAccessListMissing)?; let bal_hash = alloy_primitives::keccak256(alloy_rlp::encode(bal)); let header_bal_hash = block.block_access_list_hash().ok_or(ConsensusError::BlockAccessListHashMissing)?; if bal_hash != header_bal_hash { tracing::error!( target: "consensus", ?header_bal_hash, ?bal, "Block access list hash mismatch in validation" ); return Err(ConsensusError::BodyBlockAccessListHashDiff( GotExpected { got: bal_hash, expected: header_bal_hash }.into(), )); } Ok(()) } ``` We also fixed the `genesis_header` which was another point of failure like: ```rust // If Amsterdam is activated at genesis we set block access list hash empty hash. let block_access_list_hash = hardforks .fork(EthereumHardfork::Amsterdam) .active_at_timestamp(genesis.timestamp) .then_some(EMPTY_BLOCK_ACCESS_LIST_HASH); ``` With this changes made we got 14/15 passes which was great. But we needed to pass the test storage writes,I added a bunch of tracing across revm,evm and reth.From logs, I locally rlp encoded and decoded the bal and its hash respectively. In the end we found it was a type problem for post transaction storage value which the eip specifies to be B256 whereas we were using U256 from alloy-primitives. We finally got all test cases passed in `consume-rlp` tests for bal. ## Recording pre state for eip-4788 and eip-2935 Initially we were not recording the pre state for system calls like `apply_beacon_root_contract_call` and `apply_blockhashes_contract_call` and matching it with post,Rimeeeeee fixed this. Another thing we noticed was a problem with the value of `HISTORY_SERVE_WINDOW`, we fixed that too. ## Rebasing and cleaning up While I focused on rebasing our work across revm,evm and alloy,Rimeeeeee took up the part of cleaning up our existing implementation. This was majorly feature gating the BAL changes, moving core structures and reverting unnecessary changes. I also added some helper functions to our PR in alloy-eips and replaced alloy's types with the newly merged `alloy-eips` crate. We made a fresh pr for our work in reth. Attended the BAL Breakout where we learnt about the status of bal implementation in other clients. ## TODO * look deeply into the edge cases * get our work reviewed by the reth team ## Works * [BAL reth branch](https://github.com/Rimeeeeee/reth/tree/bal) * [BAL evm branch](https://github.com/Rimeeeeee/evm) * [BAL revm branch](https://github.com/Soubhik-10/revm/tree/bal) * [BAL alloy branch](https://github.com/Soubhik-10/alloy/tree/bal) * [Tracking issue for BAL in reth](https://github.com/paradigmxyz/reth/issues/18253)