aboutsummaryrefslogtreecommitdiffstats
path: root/les/distributor_test.go
Commit message (Collapse)AuthorAgeFilesLines
* les, les/flowcontrol: improved request serving and flow control (#18230)Felföldi Zsolt2019-02-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This change - implements concurrent LES request serving even for a single peer. - replaces the request cost estimation method with a cost table based on benchmarks which gives much more consistent results. Until now the allowed number of light peers was just a guess which probably contributed a lot to the fluctuating quality of available service. Everything related to request cost is implemented in a single object, the 'cost tracker'. It uses a fixed cost table with a global 'correction factor'. Benchmark code is included and can be run at any time to adapt costs to low-level implementation changes. - reimplements flowcontrol.ClientManager in a cleaner and more efficient way, with added capabilities: There is now control over bandwidth, which allows using the flow control parameters for client prioritization. Target utilization over 100 percent is now supported to model concurrent request processing. Total serving bandwidth is reduced during block processing to prevent database contention. - implements an RPC API for the LES servers allowing server operators to assign priority bandwidth to certain clients and change prioritized status even while the client is connected. The new API is meant for cases where server operators charge for LES using an off-protocol mechanism. - adds a unit test for the new client manager. - adds an end-to-end test using the network simulator that tests bandwidth control functions through the new API.
* les, light: reduce les testing stress (#17867)gary rong2018-10-081-1/+1
|
* les: changed if-else blocks to conform with golint (#16658)GagziW2018-05-031-2/+1
|
* all: gofmt -w -s (#15419)ferhat elmas2017-11-081-1/+1
|
* les: code refactoring (#14416)Felföldi Zsolt2017-06-211-8/+2
| | | | | | | | | | | | This commit does various code refactorings: - generalizes and moves the request retrieval/timeout/resend logic out of LesOdr (will be used by a subsequent PR) - reworks the peer management logic so that all services can register with peerSet to get notified about added/dropped peers (also gets rid of the ugly getAllPeers callback in requestDistributor) - moves peerSet, LesOdr, requestDistributor and retrieveManager initialization out of ProtocolManager because I believe they do not really belong there and the whole init process was ugly and ad-hoc
* all: update license informationFelix Lange2017-04-141-1/+1
|
* les: implement request distributor, fix blocking issues (#3660)Felföldi Zsolt2017-03-231-0/+192
* les: implement request distributor, fix blocking issues * core: moved header validation before chain mutex lock