Method, apparatus, and electronic device for restoring state data of blockchain
Abstract:
A computer-implemented method, computer-implemented apparatus, and non-transitory, computer-readable medium for restoring state data of a blockchain. Account state data in the blockchain is organized into a Merkle state tree and stored in a database. The Merkle state tree includes a current Merkle state tree obtained by organizing a latest account state of each blockchain account and a historical Merkle state tree obtained by organizing a historical account state of each blockchain account. A target block to be restored is determined, where the target block is any historical block preceding a latest block of the blockchain. State restoration logic is iteratively performed until a latest account state corresponding to each blockchain account on a current Merkle state tree of the latest block is restored to a historical account state corresponding to each blockchain account on a historical Merkle state tree of the target block.
Information query
Patent Agency Ranking
0/0