mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 19:40:36 +00:00
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_backend.go | ||
api_test.go | ||
api.go | ||
benchmark.go | ||
bloombits.go | ||
client_handler.go | ||
client.go | ||
clientpool_test.go | ||
clientpool.go | ||
commons.go | ||
costtracker.go | ||
distributor_test.go | ||
distributor.go | ||
enr_entry.go | ||
fetcher_test.go | ||
fetcher.go | ||
handler_test.go | ||
metrics.go | ||
odr_requests.go | ||
odr_test.go | ||
odr.go | ||
peer_test.go | ||
peer.go | ||
protocol.go | ||
pruner_test.go | ||
pruner.go | ||
request_test.go | ||
retrieve.go | ||
server_handler.go | ||
server.go | ||
serverpool_test.go | ||
serverpool.go | ||
servingqueue.go | ||
sync_test.go | ||
sync.go | ||
test_helper.go | ||
txrelay.go | ||
ulc_test.go | ||
ulc.go |