tokamak-network / solEVM

Partial implementation of the Ethereum runtime in Solidity (PoC)
Mozilla Public License 2.0
1 stars 1 forks source link

Support account states and state root #4

Open 4000D opened 4 years ago

4000D commented 4 years ago

Account state, as a array with 4 elements [nonce, balance, storageRoot, codeHash], should be verified in contract, along with block's stateRoot to guarantee state inclusion.

Jake-Song commented 4 years ago

I think we have to consider stateRoot as intermediateRoot between transactions, not stateRoot in block. Assuming transactions in one block that change a specific account's state several times, if we have only stateRoot in block, how do we verify account's state?

4000D commented 4 years ago

Yes the correct word is intermediateRoot, not stateRoot