# Week 5 This week was spent in implementing StorageAccess in revm and designing couple of tests for it. ## Adding StorageAccess to Account in revm Our primary goal was to figure out where we can access the post value and storage-key without using inspector,for that we decided to go through the codebase thoroughly. After spending sometime, we decided that for the StorageChange part of eip-7928 we can populate the StorageAccess directly at the opcode level like SLOAD and SSTORE. I was primarily working on the testing part and tried to breakdown my cases: * slot accessed through SLOAD should be part of reads and SSTORE should be part of writes,for this I designed test-cases to check satisfiablity. * some cases like that pre value exist and post value is zero is alreadly handled by the revm implementation ,hence storing them as a part of writes of StorageAccess or testing was not really a problem. * one small challenge was slot common in both reads and writes, this required to be stored as a part of writes of StorageAccess. The sload function was called inside the sstore so as a result if a slot was not exactly read using SLOAD opcode was getting stored as a part of reads of StorageAccess. Our primary way of handling it was excluding it from reads part of it,but that was inefficient since it was pushing values in the reads(when called inside sload) and then removing it. We then decided to add a simple bool to the sload function that checks whether the call is from sstore,if false then only it stores data in StorageAccess reads else not. By following the later method we effectively brought down the regression from 16% to 12%. Moreover while testing I found that there is no way to handle the revert case. So added that along with the tests. ## Doing Other Stuffs Apart from this I spent some time working on my rust skills.I also tried to solve two issues in revm-inspectors. ## Works * [Storage Change PR in revm](https://github.com/Soubhik-10/revm/pull/1/files) * [Comparison PR for double read write](https://github.com/Soubhik-10/revm/pull/3) * [Boxed decoded field PR](https://github.com/paradigmxyz/revm-inspectors/pull/326) * [Reuse call trace stack PR](https://github.com/paradigmxyz/revm-inspectors/pull/325)