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 sstorage p2p protocol -- part 1 #100

Closed ping-ke closed 1 year ago

ping-ke commented 1 year ago

doc about the sstorage p2p protocol, https://docs.google.com/document/d/1rfuGeCBU1Qj52gPOSyhefgb8hqLooTNPGiAeZbc85u4/edit Part 1 only contains the p2p protocol sstorage code and its dependencies.

cyl19970726 commented 1 year ago

I've written some code analysis that might help you when reviewing the code https://literate-wolfsbane-bf0.notion.site/p2p-network-code-review-6a6620b255be465988b2db5d6702a114

qizhou commented 1 year ago

What is the summary of the PR?

blockchaindevsh commented 1 year ago

Two points:

  1. shard id list can be just communicated during handshake since it's not gonna change once started.
  2. currently sstorage sync and precompile can be racing to update the same shard, there needs to be a lock to prevent a stale update.