From 043ffe316505ed7971b8953e3ed84607d1777531 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Wed, 27 Nov 2024 14:06:52 +0700 Subject: [PATCH 1/4] save --- erigon-lib/go.mod | 1 - erigon-lib/go.sum | 4 ++-- erigon-lib/state/existence_filter.go | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/erigon-lib/go.mod b/erigon-lib/go.mod index 33a10b0e9f0..247cca657dd 100644 --- a/erigon-lib/go.mod +++ b/erigon-lib/go.mod @@ -157,6 +157,5 @@ require ( replace ( github.com/anacrolix/torrent => github.com/erigontech/torrent v1.54.2-alpha-38 - github.com/holiman/bloomfilter/v2 => github.com/AskAlexSharov/bloomfilter/v2 v2.0.8 github.com/tidwall/btree => github.com/AskAlexSharov/btree v1.6.2 ) diff --git a/erigon-lib/go.sum b/erigon-lib/go.sum index f87a1170846..71a15c40926 100644 --- a/erigon-lib/go.sum +++ b/erigon-lib/go.sum @@ -4,8 +4,6 @@ crawshaw.io/iox v0.0.0-20181124134642-c51c3df30797/go.mod h1:sXBiorCo8c46JlQV3oX crawshaw.io/sqlite v0.3.2/go.mod h1:igAO5JulrQ1DbdZdtVq48mnZUBAPOeFzer7VhDWNtW4= filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU= filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -github.com/AskAlexSharov/bloomfilter/v2 v2.0.8 h1:eRExAhnCcGHKC4/s8bpbYHJTQfOtn/urU/CYXNx2Q+8= -github.com/AskAlexSharov/bloomfilter/v2 v2.0.8/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/AskAlexSharov/btree v1.6.2 h1:5+GQo+SmoAmBEsnW/ksj1csim/aQMRuLUywvwMphs2Y= github.com/AskAlexSharov/btree v1.6.2/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -263,6 +261,8 @@ github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFO github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= diff --git a/erigon-lib/state/existence_filter.go b/erigon-lib/state/existence_filter.go index f0ed98c8f3a..db5ca88a868 100644 --- a/erigon-lib/state/existence_filter.go +++ b/erigon-lib/state/existence_filter.go @@ -46,7 +46,8 @@ func NewExistenceFilter(keysCount uint64, filePath string) (*ExistenceFilter, er e.empty = true } else { var err error - e.filter, err = bloomfilter.New(m) + const HardcodedK = 3 + e.filter, err = bloomfilter.New(m, HardcodedK) if err != nil { return nil, fmt.Errorf("%w, %s", err, fileName) } From fe7dd0c67c921453024ffcb2b9e471c1d184438e Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Wed, 27 Nov 2024 14:11:48 +0700 Subject: [PATCH 2/4] save --- go.mod | 1 - go.sum | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 62ee556903d..6387ec7ce7e 100644 --- a/go.mod +++ b/go.mod @@ -290,5 +290,4 @@ require ( replace ( github.com/anacrolix/torrent => github.com/erigontech/torrent v1.54.2-alpha-38 - github.com/holiman/bloomfilter/v2 => github.com/AskAlexSharov/bloomfilter/v2 v2.0.8 ) diff --git a/go.sum b/go.sum index 46fde5c4bf0..a9aedaf5565 100644 --- a/go.sum +++ b/go.sum @@ -471,6 +471,7 @@ github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= github.com/holiman/uint256 v1.3.1/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= From fe33c0c740d9d55d294fa8faf199344e8e6817b3 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Wed, 27 Nov 2024 14:12:38 +0700 Subject: [PATCH 3/4] save --- go.mod | 4 +--- go.sum | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 6387ec7ce7e..2c7323d2d1f 100644 --- a/go.mod +++ b/go.mod @@ -288,6 +288,4 @@ require ( zombiezen.com/go/sqlite v0.13.1 // indirect ) -replace ( - github.com/anacrolix/torrent => github.com/erigontech/torrent v1.54.2-alpha-38 -) +replace github.com/anacrolix/torrent => github.com/erigontech/torrent v1.54.2-alpha-38 diff --git a/go.sum b/go.sum index a9aedaf5565..64c77504721 100644 --- a/go.sum +++ b/go.sum @@ -51,8 +51,6 @@ gfx.cafe/util/go/generic v0.0.0-20230721185457-c559e86c829c/go.mod h1:WvSX4JsCRB git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/99designs/gqlgen v0.17.56 h1:+J42ARAHvnysH6klO9Wq+tCsGF32cpAgU3SyF0VRJtI= github.com/99designs/gqlgen v0.17.56/go.mod h1:rmB6vLvtL8uf9F9w0/irJ5alBkD8DJvj35ET31BKbtY= -github.com/AskAlexSharov/bloomfilter/v2 v2.0.8 h1:eRExAhnCcGHKC4/s8bpbYHJTQfOtn/urU/CYXNx2Q+8= -github.com/AskAlexSharov/bloomfilter/v2 v2.0.8/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Giulio2002/bls v0.0.0-20241116091023-2ddcc8954ec0 h1:6DVEDL29nd7f2GoHZIA9rjpW90gYeNE3x5aUadOgTB4= @@ -471,6 +469,7 @@ github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.0/go.mod h1:y4ga/t+u+Xwd7CpDgZESaRcWy0I7XMlTMA25ApIH5Jw= github.com/holiman/uint256 v1.3.1 h1:JfTzmih28bittyHM8z360dCjIA9dbPIBlcTI6lmctQs= From a34a4054ca907b0e7c81e436a2c77dd8ffbebf19 Mon Sep 17 00:00:00 2001 From: "alex.sharov" Date: Thu, 28 Nov 2024 08:52:59 +0700 Subject: [PATCH 4/4] save --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index a59017bba69..60935941202 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ version: '2.2' # Basic erigon's service x-erigon-service: &default-erigon-service image: erigontech/erigon:${TAG:-latest} - pid: service:erigon # Use erigon's PID namespace. It's required to open Erigon's DB from another process (RPCDaemon local-mode) + pid: service:erigon # Processes must have different PID: to open Erigon's DB from another process (RPCDaemon). So, use same PID sequence across all containers. volumes_from: [ erigon ] restart: unless-stopped mem_swappiness: 0