If verifyStateTransition(...) returns false then we know something has gone horribly wrong & we will need to invalidate that block & any child blocks.
Verifying the state transition means we need to specify the state & state transition format. For this initial PoC we will keep state commitments quite simple. We will use a sparse merkle tree (SMT) to reduce tree insertion complexity. This SMT may end up being very shallow if we determine that a SMT of depth 256 is too inefficient.
The actual process of verifyStateTransition(...) consists of: 1) verify inclusion of all inputs, and 2) run the transaction, insert all outputs into state tree, & verify root hash. We can call step 1 verifyInput(...) & step 2 verifyOutput(...)
One key component to optimistic rollup is the state transition verifier. In it’s simplest form this component simply verifies the following:
If
verifyStateTransition(...)
returns false then we know something has gone horribly wrong & we will need to invalidate that block & any child blocks.Verifying the state transition means we need to specify the state & state transition format. For this initial PoC we will keep state commitments quite simple. We will use a sparse merkle tree (SMT) to reduce tree insertion complexity. This SMT may end up being very shallow if we determine that a SMT of depth 256 is too inefficient.
The actual process of
verifyStateTransition(...)
consists of: 1) verify inclusion of all inputs, and 2) run the transaction, insert all outputs into state tree, & verify root hash. We can call step 1verifyInput(...)
& step 2verifyOutput(...)