aboutsummaryrefslogtreecommitdiffstats
path: root/les/fetcher.go
Commit message (Collapse)AuthorAgeFilesLines
* les, les/flowcontrol: improved request serving and flow control (#18230)Felföldi Zsolt2019-02-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: implement ultralight client (#16904)b00ris2019-01-241-89/+211
| | | | For more information about this light client mode, read https://hackmd.io/s/HJy7jjZpm
* les: fix fetcher syncing logic (#18072)Felföldi Zsolt2018-11-261-27/+29
|
* les: limit state ODR retrievals to the last 100 blocks (#17744)Felföldi Zsolt2018-10-011-10/+17
|
* les: add announcement safety check to light fetcher (#17034)Felföldi Zsolt2018-07-041-2/+9
|
* core/rawdb: separate raw database access to own package (#16666)Péter Szilágyi2018-05-071-3/+3
|
* les: fix light fetcher database race (#16103)Felföldi Zsolt2018-02-191-9/+21
| | | | | | * les: fix light fetcher database race * les: lightFetcher comments
* les: add missing lock around peer accessPéter Szilágyi2018-02-151-0/+3
|
* les: fix misuse of WaitGroup (#15365)Evgeny Danilenko2017-11-091-3/+3
|
* les: code refactoring (#14416)Felföldi Zsolt2017-06-211-5/+6
| | | | | | | | | | | | 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
* consensus, core: drop all the legacy custom core error typesPéter Szilágyi2017-04-061-1/+2
|
* les: implement request distributor, fix blocking issues (#3660)Felföldi Zsolt2017-03-231-77/+111
| | | | | * les: implement request distributor, fix blocking issues * core: moved header validation before chain mutex lock
* all: update light logs (and a few others) to the new modelPéter Szilágyi2017-03-031-18/+17
|
* all: blidly swap out glog to our log15, logs need reworkPéter Szilágyi2017-02-231-19/+19
|
* Merge pull request #3519 from zsfelfoldi/light-topic5Péter Szilágyi2017-01-091-14/+32
|\ | | | | les: fixed selectPeer deadlock, improved request distribution
| * les: fixed selectPeer deadlock, improved request distributionZsolt Felfoldi2017-01-061-14/+32
| | | | | | | | les/flowcontrol: using proper types for relative and absolute times
* | all: gofmt -w -sFelix Lange2017-01-061-1/+1
|/
* les, light: add block availability check for ODR requestsZsolt Felfoldi2016-12-101-1/+11
|
* les: using random request IDsZsolt Felfoldi2016-12-101-1/+1
|
* les: improved header fetcher and server statisticsZsolt Felfoldi2016-12-101-182/+572
|
* les: fixed light fetcher request ID matchingZsolt Felfoldi2016-12-081-4/+10
|
* all: update license informationFelix Lange2016-11-091-1/+1
|
* core/types: remove header accessorsFelix Lange2016-11-091-2/+2
| | | | | | These accessors were introduced by light client changes, but the only method that is actually used is GetNumberU64. This commit replaces all uses of .GetNumberU64 with .Number.Uint64.
* les: light client protocol and APIZsolt Felfoldi2016-11-091-0/+295