erigon-pulse/erigon-lib
battlmonstr 9623b7cefe
txpool: limit transactions outgoing messages (#8271) (#8742)
* limit remote transactions re-broadcast to 3-6 peers  
  Broadcasting to 100 peers generates too much outgoing traffic.
* limit transactions count/size in PooledTransactions replies

Before it was sending 5.5-6.5 MiB/sec:

![Screenshot 2023-11-17 at 15 50
15](https://github.com/ledgerwatch/erigon/assets/11477595/bd2f51c5-190b-4f3e-aabf-4ff42ab8972d)


With the fixes it stays at 3-3.5 MiB/sec:

![Screenshot 2023-11-17 at 15 39
10](https://github.com/ledgerwatch/erigon/assets/11477595/74b18037-6017-49f1-8c00-9d7f3d1818b3)

P.S. A baseline if everything is disabled (BroadcastPooledTxs,
AnnouncePooledTxs, responses to GetPooledTransactions) is 0.5-1 MiB/sec.
2023-11-20 21:19:20 +07:00
..
.github/workflows go.mod: minimal go version 1.20 (#8495) 2023-10-17 06:52:28 +07:00
bptree Add 'erigon-lib/' from commit '93d9c9d9fe4bd8a49f7a98a6bce0f0da7094c7d3' 2023-09-20 14:50:25 +02:00
chain Fix Agra hf scheduling on Mumbai (#8620) 2023-10-30 15:18:47 +01:00
commitment Add 'erigon-lib/' from commit '93d9c9d9fe4bd8a49f7a98a6bce0f0da7094c7d3' 2023-09-20 14:50:25 +02:00
common erigon-lib: remove unused constants from protocol.go (#8644) 2023-11-03 10:20:36 +01:00
compress Add full support to beacon snapshots (#8665) 2023-11-13 14:10:57 +01:00
crypto Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
diagnostics added snapshot sync diagnostic information, updated diagnostic channel (#8645) 2023-11-07 12:50:36 +00:00
direct snapshots: reduce merge limit of blocks to 100K (#8614) 2023-11-01 23:22:35 +07:00
downloader Added duties/proposer to beacon api (#8777) 2023-11-19 22:03:14 +01:00
etl etl: more tests (#8534) 2023-10-20 13:54:46 +07:00
gointerfaces snapshots: reduce merge limit of blocks to 100K (#8614) 2023-11-01 23:22:35 +07:00
kv metrics: swap remaining VictoriaMetrics usages with erigon-lib/metrics (#8762) 2023-11-20 12:23:23 +00:00
metrics metrics: swap remaining VictoriaMetrics usages with erigon-lib/metrics (#8762) 2023-11-20 12:23:23 +00:00
mmap sys deps up (#8695) 2023-11-11 15:04:18 +03:00
patricia Upgrade libp2p (enables go 1.21 support) (#8288) 2023-09-29 22:11:13 +02:00
pedersen_hash Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
recsplit Block execution using embedded Silkworm (#8353) 2023-10-05 09:27:37 +07:00
rlp Fix rlp.EncodeString for length 56 (#8528) 2023-10-19 11:45:19 +02:00
rlp2 rlp2 (#8643) 2023-11-04 09:22:11 +07:00
sais Add 'erigon-lib/' from commit '93d9c9d9fe4bd8a49f7a98a6bce0f0da7094c7d3' 2023-09-20 14:50:25 +02:00
state metrics: swap remaining VictoriaMetrics usages with erigon-lib/metrics (#8762) 2023-11-20 12:23:23 +00:00
tools sys deps up (#8695) 2023-11-11 15:04:18 +03:00
txpool txpool: limit transactions outgoing messages (#8271) (#8742) 2023-11-20 21:19:20 +07:00
types sys deps up (#8695) 2023-11-11 15:04:18 +03:00
.gitignore Add 'erigon-lib/' from commit '93d9c9d9fe4bd8a49f7a98a6bce0f0da7094c7d3' 2023-09-20 14:50:25 +02:00
.golangci.yml sys deps up (#8695) 2023-11-11 15:04:18 +03:00
go.mod snaps: mumbai 42.5m (#8784) 2023-11-20 11:13:57 +07:00
go.sum snaps: mumbai 42.5m (#8784) 2023-11-20 11:13:57 +07:00
LICENSE Add 'erigon-lib/' from commit '93d9c9d9fe4bd8a49f7a98a6bce0f0da7094c7d3' 2023-09-20 14:50:25 +02:00
Makefile ci: go mod tidy check (#8263) 2023-09-22 14:04:25 +07:00
README.md make: refactor erigon-lib make tasks (#8249) 2023-09-21 13:50:59 +02:00
rules.go fix-rules-typo (#8681) 2023-11-09 07:40:24 +03:00
tools.go Add 'erigon-lib/' from commit '93d9c9d9fe4bd8a49f7a98a6bce0f0da7094c7d3' 2023-09-20 14:50:25 +02:00

erigon-lib

Parts of Erigon codebase, written from scratch and licensed under Apache 2.0.

License requirements

erigon-lib dependencies use various open source licenses compatible with Apache 2.0. This is checked on CI using make lint-licenses.

In order to keep license purity it is not allowed to refer to the code in the erigon root module from erigon-lib. This is ensured by the go.mod separation.

It is not allowed to copy or move code from erigon to erigon-lib unless all original authors agree to relief the code license from GPL to Apache 2.0.

Code migration policy

It is encouraged to write new erigon code inside erigon-lib.

It is encouraged to move and relicense parts of the code from erigon to erigon-lib that are safe and easy to move. For example, code written from scratch by erigon core contributors that has no significant external contributions could be refactored and moved.