Description
Basically for a stateless clients there are 3 verifications which are crucial:
- Pre State is valid with regard to previously accepted valid stateRoot of the parent
a. In context with VKT implementations this involves verifying the currentValues and the proof nodes can be used to construct a valid partial VKT with the root as the parent's stateRoot - Validate block's STF (state transition function) i.e. run EVM on prestate and verify you get exactly the post state thats in the execution witness, nothing less nothing more (and gas/receipts/logs match)
- Validate that the pre State partial VKT can be updated with the post state to form the post state partial VKT with the root matching the block's stateRoot, which is when you can accept the blockState root as valid and corresponding to the block.
Now currently this library provides 1. and this feature request is also to provide 3 via possibly the single interface because both pre and post state for the block is available right at the start in the execution witness and can be used to validate that they represent valid pre/post block execution VKTs
Afterwards (or in parallel) a stateless client like ethereumjs can execute the block with its evm using the pre-state in execution witness and validate it gets the exact post state i.e. point 2.
With 1 & 3 verified by the VKT crypto lib and 2. verified by the client EVM, the stateless clients will get a good interface to work with without even dealing with the VKT layer which can act as a blackbox for them. This will surely make the dev cleaner, easier and more maintainable.