Commit graph

14 commits

Author SHA1 Message Date
Daniel Liu
ec08863ba0
all: use WaigGroup.Go() to simplify code (#1699) 2025-11-29 17:17:08 +05:30
georgehao
62afcf6b85 common/prque: fix godoc comments (#29460)
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-12-28 09:06:31 +08:00
Daniel Liu
57eb92da1c common/prque: remove dependency on golang.org/exp (#29314) 2024-12-28 09:06:31 +08:00
Péter Szilágyi
39e9d8f94d common/prque: generic priority queue (#26290) 2024-12-28 09:06:31 +08:00
Daniel Liu
32e033df3a common, p2p: use AbsTime.Add instead of conversion (#25417) 2024-12-28 09:06:31 +08:00
Seungbae.yu
1bff428a39 common/prque: fix typo (#25206) 2024-12-28 09:06:30 +08:00
Daniel Liu
e2eb22dcac common/prque: make Prque wrap-around priority handling optional (#22495) 2024-12-28 09:06:30 +08:00
Daniel Liu
e52587df53 common: do not pass current time as param in priority funcs (#22183) 2024-12-28 09:06:30 +08:00
Péter Szilágyi
d852f8cf88 common/prque: pull in tests and benchmarks from upstream (#22157) 2024-12-28 09:06:30 +08:00
Daniel Liu
cf0c5c8cd2 common/prque: refactor LazyQueue (#21236) 2024-12-28 09:06:30 +08:00
olumuyiwadad
b5abbfed79 new EVM Upgrade
- Solidity Upgraded up to v0.8.0
-  Fixed and Added eth_chainId
- Fix error in TransactionRecipet
- Reward halving issue fixed
2021-09-21 16:53:46 +05:30
olumuyiwadad
571c41f891 FIx Bad block error. 2021-09-17 17:59:06 +05:30
dev-vadim
dbe8c9d984 upgrade XDC.Network with v1.8.27. 2020-12-23 16:32:06 +05:30
Felföldi Zsolt
b2ddb1fcbf les: implement client connection logic (#16899)
This PR implements les.freeClientPool. It also adds a simulated clock
in common/mclock, which enables time-sensitive tests to run quickly
and still produce accurate results, and package common/prque which is
a generalised variant of prque that enables removing elements other
than the top one from the queue.

les.freeClientPool implements a client database that limits the
connection time of each client and manages accepting/rejecting
incoming connections and even kicking out some connected clients. The
pool calculates recent usage time for each known client (a value that
increases linearly when the client is connected and decreases
exponentially when not connected). Clients with lower recent usage are
preferred, unknown nodes have the highest priority. Already connected
nodes receive a small bias in their favor in order to avoid accepting
and instantly kicking out clients.

Note: the pool can use any string for client identification. Using
signature keys for that purpose would not make sense when being known
has a negative value for the client. Currently the LES protocol
manager uses IP addresses (without port address) to identify clients.
2018-08-14 22:44:46 +02:00