aboutsummaryrefslogtreecommitdiffstats
path: root/light
diff options
context:
space:
mode:
authorFelföldi Zsolt <zsfelfoldi@gmail.com>2019-02-26 19:32:48 +0800
committerFelix Lange <fjl@users.noreply.github.com>2019-02-26 19:32:48 +0800
commitc2003ed63b975c6318e4dd7e65b69c60777b0ddf (patch)
tree0045c39070c4d2b9fcaa93cbcbdd8d5ea4f4a29f /light
parentc2b33a117f686069e36d58d937e1c75d72d7b94c (diff)
downloadgo-tangerine-c2003ed63b975c6318e4dd7e65b69c60777b0ddf.tar
go-tangerine-c2003ed63b975c6318e4dd7e65b69c60777b0ddf.tar.gz
go-tangerine-c2003ed63b975c6318e4dd7e65b69c60777b0ddf.tar.bz2
go-tangerine-c2003ed63b975c6318e4dd7e65b69c60777b0ddf.tar.lz
go-tangerine-c2003ed63b975c6318e4dd7e65b69c60777b0ddf.tar.xz
go-tangerine-c2003ed63b975c6318e4dd7e65b69c60777b0ddf.tar.zst
go-tangerine-c2003ed63b975c6318e4dd7e65b69c60777b0ddf.zip
les, les/flowcontrol: improved request serving and flow control (#18230)
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.
Diffstat (limited to 'light')
-rw-r--r--light/lightchain.go2
-rw-r--r--light/odr.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/light/lightchain.go b/light/lightchain.go
index 5019622c7..fb5f8ead2 100644
--- a/light/lightchain.go
+++ b/light/lightchain.go
@@ -14,6 +14,8 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
+// Package light implements on-demand retrieval capable state and chain objects
+// for the Ethereum Light Client.
package light
import (
diff --git a/light/odr.go b/light/odr.go
index 900be0544..95f1948e7 100644
--- a/light/odr.go
+++ b/light/odr.go
@@ -14,8 +14,6 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
-// Package light implements on-demand retrieval capable state and chain objects
-// for the Ethereum Light Client.
package light
import (