QuarkChain / go-ethereum

Official Go implementation of the Ethereum protocol
https://geth.ethereum.org
GNU Lesser General Public License v3.0
5 stars 2 forks source link

add precompiled contracts for sharded storage #84

Closed qizhou closed 2 years ago

qizhou commented 2 years ago

This is a significant PR that supports sharded storage via precompiled contracts. The major changes from the PR are

How to test it?

Suggested code review path:

qizhou commented 2 years ago

StateDB snapshot test flow:

  1. Add a putRawWithRevert() method in DecentralizedKV, which will revert after putRaw()
  2. Before the snapshot support: after calling putRawWithRevert(), observed the sharded storage is changed even the tx is failed
  3. After the snapshot support: after calling putRawWithRevert(), observed the sharded storage is unchanged even the tx is failed