Description
Parameters
METROPOLIS_FORK_BLKNUM
: TBA
Specification
Option 1: For blocks where block.number >= METROPOLIS_FORK_BLKNUM
, the receipt should remove the intermediate state root parameter.
Option 2: For blocks where block.number >= METROPOLIS_FORK_BLKNUM
, the intermediate state root parameter in the receipt should be set to zero instead of the actual state root.
Option 3 (update 2017.07.28: we are going with this one): For blocks where block.number >= METROPOLIS_FORK_BLKNUM
, the intermediate state root parameter in the receipt should be set to a \x01
byte if the outermost code execution succeeded, or a zero byte if the outermost code execution failed.
Rationale
Not calculating the state root after each transaction allows for the process of computing the state root to be parallelized, and for fewer merkle tree branches to be calculated because repeated updates can be hashed. Additionally, it sets the stage for future scalability upgrades where transaction processing itself is done in parallel.
This change DOES mean that if a miner creates a block where one state transition is processed incorrectly, then it is impossible to make a fraud proof specific to that transaction; instead, the fraud proof must consist of the entire block. However, (1) block times are low and we expect block times to reduce in the future with Casper, and (2) we have already accepted the principle that light clients must be capable of downloading entire blocks if need be, because of how verifying bloom filter entries works.