Skip to content

Latest commit

 

History

History
19 lines (8 loc) · 1.26 KB

partial-revive.md

File metadata and controls

19 lines (8 loc) · 1.26 KB

Partial Revive

According to the design of BEP-206, the shadow node will record the metadata of when the MPT node is accessed. This feature can be used for partial revival and saves gas in batch revival scenarios.

When a large number of states in Storage Trie has expired, the whole sub-tries will be pruned.

The partial revive allows the user to revive the state in batch mode and only revive the left part. At this time, the trie nodes could be revived layer by layer to the storage MPT, thereby reducing the gas consumption of batch state revival.

The revived trie nodes rebuild the Shadow Nodes to indicate which child have been revived, or which are still expired.

When you first revive C, you need combine Witness[0], Witness[1] and Witness[5] in ReviveStateTx. But if you want to revive D later, you only need provide Witness[6] is enough...