Thought I would share here for reference in the conversation for what this could look like in practice. I’ve implemented the most naive version of the EXECUTE precompile for the ethereumjs
EVM at github dot com/ethereumjs/ethereumjs-monorepo/pull/3865 (sorry, can’t post links) using the binary merkle tree structure from EIP-7864 as the backing tree representation of the state.
State transition verification here is implemented using a sparse state tree constructed from the prestate merkle proof and then transactions are re-executed. The traces are currently stored as ssz serialized bytestrings in local memory accessible to the EVM via a hash provided to the precompile.