mirror of https://github.com/status-im/op-geth.git
b63bffe820
This adds a few tiny fixes for les and the p2p simulation framework: LES Parts - Keep the LES-SERVER connection even it's non-synced We had this idea to reject the connections in LES protocol if the les-server itself is not synced. However, in LES protocol we will also receive the connection from another les-server. In this case even the local node is not synced yet, we should keep the tcp connection for other protocols(e.g. eth protocol). - Don't count "invalid message" for non-existing GetBlockHeadersMsg request In the eth syncing mechanism (full sync, fast sync, light sync), it will try to fetch some non-existent blocks or headers(to ensure we indeed download all the missing chain). In this case, it's possible that the les-server will receive the request for non-existent headers. So don't count it as the "invalid message" for scheduling dropping. - Copy the announce object in the closure Before the les-server pushes the latest headers to all connected clients, it will create a closure and queue it in the underlying request scheduler. In some scenarios it's problematic. E.g, in private networks, the block can be mined very fast. So before the first closure is executed, we may already update the latest_announce object. So actually the "announce" object we want to send is replaced. The downsize is the client will receive two announces with the same td and then drop the server. P2P Simulation Framework - Don't double register the protocol services in p2p-simulation "Start". The protocols upon the devp2p are registered in the "New node stage". So don't reigster them again when starting a node in the p2p simulation framework - Add one more new config field "ExternalSigner", in order to use clef service in the framework. |
||
---|---|---|
.. | ||
checkpointoracle | ||
flowcontrol | ||
lespay | ||
utils | ||
api.go | ||
api_backend.go | ||
api_test.go | ||
benchmark.go | ||
bloombits.go | ||
client.go | ||
client_handler.go | ||
clientpool.go | ||
clientpool_test.go | ||
commons.go | ||
costtracker.go | ||
distributor.go | ||
distributor_test.go | ||
enr_entry.go | ||
fetcher.go | ||
fetcher_test.go | ||
handler_test.go | ||
metrics.go | ||
odr.go | ||
odr_requests.go | ||
odr_test.go | ||
peer.go | ||
peer_test.go | ||
protocol.go | ||
pruner.go | ||
pruner_test.go | ||
request_test.go | ||
retrieve.go | ||
server.go | ||
server_handler.go | ||
serverpool.go | ||
serverpool_test.go | ||
servingqueue.go | ||
sync.go | ||
sync_test.go | ||
test_helper.go | ||
txrelay.go | ||
ulc.go | ||
ulc_test.go |