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

MindReading PartII #121

Closed cyl19970726 closed 1 year ago

qizhou commented 1 year ago

I would suggest adding a brief summary of what the PR is doing.

cyl19970726 commented 1 year ago

This PR mainly completes the following functions:

  1. Add MindReading to the proposal block process of the proposer-validator-node (core/state_process.go miner/worker.go)
  2. Add MindReading to the verification block process of the non-proposer-validator-node (core/state_process.go)
  3. Add MindReading to the block synchronization process of the non-validator node(core/state_process.go)
  4. Modify tracerApi to support MindReading(eth/)
  5. Optimize crossChainCall precompile contract (core/vm/contracts.go)
cyl19970726 commented 1 year ago

I think a simple change is to call getNextReplayableCCCOutput() outside (perhaps in state_processor), and check if it is not nil, then some CCCoutpus are not consumed.

Good advice and update code to this mechanism at https://github.com/QuarkChain/go-ethereum/pull/121/commits/2c87ee7772ce0daeda8a5e5299caaac85c569756