# Week 10 & 11
This two weeks we focused on implementing engine-api changes and running the execution spec tests concerning BAL in hive.
## Updates on engine-api changes
The specs proposed creation of new payload i.e.`ExecutionPayloadV4`.This will be same as `ExecutionPayladV3` but with the rlp encoded block access list. In addition to that it added functions like `newPayloadV5` and `getPayloadV6`.I along with my friend worked on building the core structure for it in alloy,was kind of skeptic about ssz encoding format.I decided to go through the previously encoded structures in alloy which proved to be helpful.
I added the `newPayloadV5` method in reth,and added proper validation checks like matching block-access-list hash in header with of that of keccak256 of rlp encoded block access list in body.Apart from that,I incorporated certain sanity checks in validation.
Meanwhile I added amsterdam hardfork to alloy,which gave us the oppurtunity just to check whether it is active while validation,and perform several checks.Though the implementation is not full proof,it is good.
Added several roundtrip tests just to check whether the newly added payload is behaving properly.
## Working with Ethereum Execution Spec Tests
I am very new to working with Hive,but both me and my friend wanted to run the bal related tests using it. Fgimenez who works on this part for reth is currently OOO,so we decided upon having something which is sort of makeshift. After several failed attempts,we got it incorporated in reth's CI,all thanks to Mattsse who guided us in every step.
I was trying to run the tests in local,but running Docker in windows proved to be a nightmare :(
Initially it was the issue with virtualization support which on enabling through BIOS even came false. Apart from that there was some problem with DNS, I could ping to sites, but cannot access images through cloudflare. So a bunch of stuffs needed resolution but Docker works perfectly fine now.
So what was left adding amsterdam to rulset in eest and also to hive. After that I generated the tar,which was needed for the hive tests to be run on reth.
## Other works concerning BAL
There was some trouble with the indexing in BAL. To resolve that my friend added a bunch of utility functions in revm,we decided to clear state for every field in revm after adding it to BAL, the length we fetched from receipts. Not super confident about the implementation,but it improves performance to a great extent.
We are also upstreaming the core BAL structures to alloy eips.
I also attended the first BAL breakout and came to know progress of other clients while my friend shared updates on behalf of reth.
## TODO
* Refactor the code based on hive test.
* Make other refactoring.
* Lots of cleanup.
## Resources
* [Alloy-Eips Pr](https://github.com/alloy-rs/eips/pull/39)
* [Alloy-Hardforks Amsterdam fork](https://github.com/alloy-rs/hardforks/pull/58)
* [Reth ci check](https://github.com/paradigmxyz/reth/pull/18188)
* [Alloy Envelope6 ](https://github.com/Soubhik-10/alloy/pull/10)
* [ExecutionPayloadV4](https://github.com/Soubhik-10/alloy/pull/8)
* [Engine Api Changes](https://github.com/Rimeeeeee/reth/pull/14)