---
# System prepended metadata

title: CDAP Development Update 3

---

# CDAP Development Update 3

This is my third update. In my last [update](https://hackmd.io/@alexchenzl/rkkBdK_OY), the goal for this stage was set to:
* Finish the first version of a runnable application
* Write some basic test cases and make them passed

Progress
---

Over the past two weeks. I was working on the implementation of my first version of this predictive engine prototype [predict_al](https://github.com/alexchenzl/predict_al.git). Now it can run against some basic test cases, but there are still some more complex cases that need to resolve.

In order to simulate the execution of transactions, I need to implement a customized EVM. Since the EVM implementation in [go-ethereum](https://github.com/ethereum/go-ethereum) is deeply optimized and modulized, I decided to reuse its source code and customize it according to this project's target.

This engine doesn't need to update any real data, so I created a fake_statedb to simulate interactions between statedb and EVM. Gas calculation could be simplified or even skipped in this prototype. Then most of the work left is to customize the operation of every instruction. As of now, most of the instructions have been handled without too much modification.

There are some complex instructions that are not completed yet, such as call-liked opcodes, create and create2. Since I use a specific unit256 value to tag unknown values related to storage slots, this makes it a problem to handle mstore8 correctly when its parameter is an unknown value. I decide to skip it currently unless I find a way to resolve it. After all it's not necessary to handle every possible cases. Besides these instuctions, the conditional jumping is the most complex case. If the condition depends on an unknown storage value, how the engine could follow both branches and find possible accesses either way? In the worst case, it may even cause a path explosion problem.

Next Goals
---
* Finish all remained instructions
* Add a state fetcher that fetches states via Geth RPC

    
