Skip to content

Feature to consturct and verify post-stateRoot for stateless clients #9

Open
@g11tech

Description

@g11tech

Basically for a stateless clients there are 3 verifications which are crucial:

  1. 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
  2. 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)
  3. 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.

cc @holgerd77 @gabrocheleau @kevaundray @gballet @jsign

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions