Commit Graph

57 Commits

Author SHA1 Message Date
Alex Sharov
26ce6aa88b
return 1 lost mainnet file (#9242) 2024-01-17 14:21:51 +07:00
milen
e25b15b00e
remotedbserver: add support for bor snapshots (#9180) 2024-01-09 14:48:01 +00:00
Alex Sharov
7490e7dd63
up x and cli deps (#9154) 2024-01-08 16:01:36 +07:00
a
235af8a321
glob filter (#9148) 2024-01-07 12:03:17 -06:00
Giulio rebuffo
415b17ca85
Updated erigon-snapshots (#9111) 2024-01-02 09:23:16 +07:00
Giulio rebuffo
a959387aae
Make caplin sync snapshots (all of them) (#9106) 2024-01-01 08:18:56 +07:00
Giulio rebuffo
580c55517f
Make caplin snapshots downloadable (only sepolia) (#9105) 2023-12-31 13:22:41 +01:00
ledgerwatch
ab27531fa7
Introduce new public buckets for the snapshots (#9094)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-12-28 12:39:25 +00:00
Alex Sharov
a48db431cb
return deleted caplin-v2 webseed (#9083) 2023-12-26 18:55:17 +07:00
Alex Sharov
0d31444eea
bor mainnet 51m (#9073) 2023-12-25 11:24:14 +07:00
Alex Sharov
2944abbd19
fix typo in snap webseed server names (#9072) 2023-12-24 16:37:13 +07:00
Giulio rebuffo
a4d7b6d33f
Switched Caplin snapshot format to ZSTD blinded blocks (#9058)
* Chunked format -> blinded
* LZ4 -> ZSTD
* Implemented parent block root support for history download
* Rationale: Allows to optimize GC collection easily on state
reconstruction and it allows to read fast attestations in historical
states reader
2023-12-23 15:56:35 +01:00
ledgerwatch
ec970ac6bc
Fixed duplicate bucket names, remove presigned URLs (#9060)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-12-23 04:11:12 +00:00
Alex Sharov
8c822256db
remove bor mainnet files (#9033) 2023-12-21 08:09:54 +07:00
Alex Sharov
d41d523050
Downloader: add ProhibitNewDownloads() (#8939)
"whitelisting" mechanism (list of files - stored in DB) - which
protecting us from downloading new files after upgrade/downgrade was
broken. And seems it became over-complicated with time.
I replacing it by 1 persistent flag inside downloader:
"prohibit_new_downloads.lock"
Erigon will turn downloader into this mode after
downloading/verification of first snapshots.


```
//Corner cases:
	// - Erigon generated file X with hash H1. User upgraded Erigon. New version has preverified file X with hash H2. Must ignore H2 (don't send to Downloader)
	// - Erigon "download once": means restart/upgrade/downgrade must not download files (and will be fast)
	// - After "download once" - Erigon will produce and seed new files
```

------
`downloader --seedbox` is never "prohibit new downloads"
2023-12-12 16:05:56 +07:00
Alex Sharov
be10b7de29
bor: block snaps 50m (#8941) 2023-12-10 14:52:10 +07:00
Alex Sharov
f3822b17d4
sepolia: auto-gen snaps to 4.7M (#8898) 2023-12-07 08:24:50 +07:00
Alex Sharov
6960ec3d81
up golang/x deps (#8900) 2023-12-06 18:49:52 +00:00
Alex Sharov
ad48ecdcbb
downloader: download rates per peer with webseeds (#8879) 2023-12-01 13:39:43 +00:00
Alex Sharov
0fbcd5b5d8
downloader: use manifest.txt for public bucket (#8863)
use manifest.txt instead of webseed.toml in public buckets
2023-11-30 16:58:23 +07:00
milen
28fff1b35e
metrics: remove VictoriaMetrics/metrics lib (#8766)
# Background

Erigon currently uses a combination of Victoria Metrics and Prometheus
client for providing metrics.

We want to rationalize this and use only the Prometheus client library,
but we want to maintain the simplified Victoria Metrics methods for
constructing metrics.

This task is currently partly complete and needs to be finished to a
stage where we can remove the Victoria Metrics module from the Erigon
code base.

# Summary of changes

- Remove `UsePrometheusClient` boolean flag
- Remove `VictoriaMetrics` client lib and related code (simplifies
registry and prometheus http handler initialisation since now we have
only 1 registry and can use default `promhttp.Handler`)
2023-11-23 20:31:38 +00:00
Alex Sharov
33f42df10e
snaps: mumbai 42.5m (#8784) 2023-11-20 11:13:57 +07:00
dependabot[bot]
97e94f6d2c
build(deps): bump github.com/consensys/gnark-crypto from 0.12.0 to 0.12.1 in /erigon-lib (#8680)
Bumps
[github.com/consensys/gnark-crypto](https://github.com/consensys/gnark-crypto)
from 0.12.0 to 0.12.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/consensys/gnark-crypto/releases">github.com/consensys/gnark-crypto's
releases</a>.</em></p>
<blockquote>
<h2>v0.12.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: GLV exponentiation in GT with large exponents by <a
href="https://github.com/ThomasPiellard"><code>@​ThomasPiellard</code></a>
in <a
href="https://redirect.github.com/Consensys/gnark-crypto/pull/451">Consensys/gnark-crypto#451</a>
<a
href="https://github.com/Consensys/gnark-crypto/security/advisories/GHSA-pffg-92cg-xf5c">Security
Advisory</a></li>
<li>feat: kzg extended transcript by <a
href="https://github.com/ThomasPiellard"><code>@​ThomasPiellard</code></a>
in <a
href="https://redirect.github.com/Consensys/gnark-crypto/pull/452">Consensys/gnark-crypto#452</a></li>
<li>perf(fft): introduce cache efficient bit reverse shuffling by <a
href="https://github.com/gbotrel"><code>@​gbotrel</code></a> in <a
href="https://redirect.github.com/Consensys/gnark-crypto/pull/446">Consensys/gnark-crypto#446</a></li>
<li>perf: Improve performance of point equality checks by <a
href="https://github.com/jsign"><code>@​jsign</code></a> in <a
href="https://redirect.github.com/Consensys/gnark-crypto/pull/450">Consensys/gnark-crypto#450</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Consensys/gnark-crypto/compare/v0.12.0...v0.12.1">https://github.com/Consensys/gnark-crypto/compare/v0.12.0...v0.12.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="da0317fd01"><code>da0317f</code></a>
clean: remove useless snippet in mulWindowed (<a
href="https://redirect.github.com/consensys/gnark-crypto/issues/453">#453</a>)</li>
<li><a
href="65cdb1d1c2"><code>65cdb1d</code></a>
Feat/kzg extended transcript (<a
href="https://redirect.github.com/consensys/gnark-crypto/issues/452">#452</a>)</li>
<li><a
href="95e674b3d6"><code>95e674b</code></a>
perf(fft): introduce cache efficient bit reverse shuffling (<a
href="https://redirect.github.com/consensys/gnark-crypto/issues/446">#446</a>)</li>
<li><a
href="ec6be1a037"><code>ec6be1a</code></a>
Merge pull request <a
href="https://redirect.github.com/consensys/gnark-crypto/issues/451">#451</a>
from Consensys/fix/glv</li>
<li><a
href="aef1eef48a"><code>aef1eef</code></a>
fix: add GT ExpGLV fix to BLS24 + BW6</li>
<li><a
href="feaf161b4d"><code>feaf161</code></a>
fix: merge and fix tests for expGLV</li>
<li><a
href="ced3076bef"><code>ced3076</code></a>
fix: use max(size(s1), size(s2)) for ExpGLV</li>
<li><a
href="4096ad9913"><code>4096ad9</code></a>
feat: discared useless files</li>
<li><a
href="ace5318b72"><code>ace5318</code></a>
Merge pull request <a
href="https://redirect.github.com/consensys/gnark-crypto/issues/450">#450</a>
from jsign/jsign-eq-improv</li>
<li><a
href="dc4e2d4f77"><code>dc4e2d4</code></a>
feat: added test for [-s]G=-[s]G</li>
<li>Additional commits viewable in <a
href="https://github.com/consensys/gnark-crypto/compare/v0.12.0...v0.12.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/consensys/gnark-crypto&package-manager=go_modules&previous-version=0.12.0&new-version=0.12.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/ledgerwatch/erigon/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 10:27:26 +01:00
Alex Sharov
950bb12098
metrics: race fix (#8701) 2023-11-11 18:09:04 +03:00
Alex Sharov
35bfffd621
sys deps up (#8695) 2023-11-11 15:04:18 +03:00
Alex Sharov
6722334671
fix mdbx version in devel branch (#8679) 2023-11-10 19:44:15 +03:00
Giulio rebuffo
e08b031f74
Updated go.sum and go.mod for snapshots (#8664) 2023-11-06 23:39:44 +01:00
Giulio rebuffo
4b580dcc2f
update caplin snapshots hashes (#8663)
This PR also adds snippets to download caplin snapshots
2023-11-06 21:05:07 +01:00
Alex Sharov
714fa0fdc7
mainnet 18.3M snaps (#8639) 2023-11-02 14:14:39 +07:00
Alex Sharov
329d18ef6f
snapshots: reduce merge limit of blocks to 100K (#8614)
Reason: 
- produce and seed snapshots earlier on chain tip. reduce depnedency on
"good peers with history" at p2p-network.
Some networks have no much archive peers, also ConsensusLayer clients
are not-good(not-incentivised) at serving history.
- avoiding having too much files:
more files(shards) - means "more metadata", "more lookups for
non-indexed queries", "more dictionaries", "more bittorrent
connections", ...
less files - means small files will be removed after merge (no peers for
this files).


ToDo:
[x] Recent 500K - merge up to 100K 
[x] Older than 500K - merge up to 500K 
[x] Start seeding 100k files
[x] Stop seeding 100k files after merge (right before delete)

In next PR: 
[] Old version of Erigon must be able download recent hashes. To achieve
it - at first start erigon will download preverified hashes .toml from
s3 - if it's newer that what we have (build-in) - use it.
2023-11-01 23:22:35 +07:00
Alex Sharov
b5ea87d8c5
mdbx_empty_kv_dup (#8635) 2023-11-01 15:50:27 +07:00
battlmonstr
eb65ffbaa7
config: avoid OOM in docker using cgroups v2 limit (#6646) (#8632)
Tested on Debian 11 by:

    $ git revert HEAD
    $ make docker
    $ docker run --memory=8.8G <sha>

before the fix outputs:

    15.6 GB

after the fix outputs:

    8.8 GB
2023-11-01 09:02:34 +07:00
Alex Sharov
c90bff7e22
mdbx: use release tag (#8628) 2023-10-31 10:11:40 +07:00
Giulio rebuffo
0e5af0a69c
Added beacon snapshots download (#8601) 2023-10-28 17:41:50 +02:00
Alex Sharov
f36d090f39
make db-tools: suspend enum-int linter error (#8598)
```
 error: conflicting types for ‘mdbx_get_datacmp’ due to enum/integer mismatch; have ‘int (*(unsigned int))(const MDBX_val *, const MDBX_val *)’ {aka ‘int (*(unsigned int))(const struct iovec *, const struct iovec *)’} [-Werror=enum-int-mismatch]
26609 | __cold MDBX_cmp_func *mdbx_get_datacmp(unsigned flags) {
      |                       ^~~~~~~~~~~~~~~~
mdbx.h:4932:1: note: previous declaration of ‘mdbx_get_datacmp’ with type ‘int (*(MDBX_db_flags_t))(const MDBX_val *, const MDBX_val *)’ {aka ‘int (*(MDBX_db_flags_t))(const struct iovec *, const struct iovec *)’}
```
can't upgrade mdbx version for now
2023-10-27 11:01:11 +07:00
Andrew Ashikhmin
84a0b702b9
Update go-kzg-4844 to v0.7.0 (#8551) 2023-10-22 12:44:56 +02:00
a
436493350e
Sentinel refactor (#8296)
1. changes sentinel to use an http-like interface

2. moves hexutil, crypto/blake2b, metrics packages to erigon-lib
2023-10-22 01:17:18 +02:00
Alex Sharov
783b2f39d6
downloader: fix e2 bucket name (#8521) 2023-10-20 13:54:38 +07:00
Giulio rebuffo
ec2207fc7f
Gnosis Snapshot updated (#8532) 2023-10-19 23:49:14 +02:00
Andrew Ashikhmin
f492d88178
Switch to official KZG ceremony trusted setup (EIP-4844) (#8531)
See https://github.com/ethereum/consensus-specs/pull/3521 &
https://github.com/crate-crypto/go-kzg-4844/pull/61. This is required
for
[dencun-devnet-10](https://notes.ethereum.org/@ethpandaops/dencun-devnet-10).
2023-10-19 18:33:05 +02:00
Alex Sharov
f998e18219
downloader: default webseed token for e2 (#8512) 2023-10-19 08:17:49 +07:00
Alex Sharov
33d5399436
downloader: support token (#8507) 2023-10-18 14:24:09 +07:00
Alex Sharov
3ac9f493b6
move chainname and snapcfg packages to erigon-lib (#8508) 2023-10-18 13:37:39 +07:00
canepat
9568567eda
Add RPC daemon using Silkworm (#8486)
This introduces _experimental_ RPC daemon run by embedded Silkworm
library. Same notes as in PR #8353 apply here plus the following ones:

- activated if `http` command-line option is enabled and `silkworm.path`
option is present, nothing more is required (i.e. currently, both block
execution and RPC daemon run by Silkworm when specifying
`silkworm.path`, just to keep things as simple as possible)
- only Execution API endpoints are implemented by Silkworm RPCDaemon,
whilst Engine API endpoints are still served by Erigon RPCDaemon
- some features are still missing, in particular:
  - state change notification handling
- custom JSON RPC settings (i.e. Erigon RPC settings are not passed to
Silkworm yet)
2023-10-18 06:37:16 +07:00
battlmonstr
911da43128
go.mod: minimal go version 1.20 (#8495)
Because 1.19 is not working anymore.
2023-10-17 06:52:28 +07:00
Giulio rebuffo
9e42b705ce
Caplin: under the hood block downloading (#8459) 2023-10-16 15:35:26 +02:00
Alex Sharov
3b6f38025f
up x/sync lib (#8479) 2023-10-15 10:10:36 +07:00
dependabot[bot]
7750ee5dbc
Bump golang.org/x/net from 0.15.0 to 0.17.0 (#8444)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.15.0 to
0.17.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b225e7ca6d"><code>b225e7c</code></a>
http2: limit maximum handler goroutines to MaxConcurrentStreams</li>
<li><a
href="88194ad8ab"><code>88194ad</code></a>
go.mod: update golang.org/x dependencies</li>
<li><a
href="2b60a61f1e"><code>2b60a61</code></a>
quic: fix several bugs in flow control accounting</li>
<li><a
href="73d82efb96"><code>73d82ef</code></a>
quic: handle DATA_BLOCKED frames</li>
<li><a
href="5d5a036a50"><code>5d5a036</code></a>
quic: handle streams moving from the data queue to the meta queue</li>
<li><a
href="350aad2603"><code>350aad2</code></a>
quic: correctly extend peer's flow control window after MAX_DATA</li>
<li><a
href="21814e71db"><code>21814e7</code></a>
quic: validate connection id transport parameters</li>
<li><a
href="a600b3518e"><code>a600b35</code></a>
quic: avoid redundant MAX_DATA updates</li>
<li><a
href="ea633599b5"><code>ea63359</code></a>
http2: check stream body is present on read timeout</li>
<li><a
href="ddd8598e56"><code>ddd8598</code></a>
quic: version negotiation</li>
<li>Additional commits viewable in <a
href="https://github.com/golang/net/compare/v0.15.0...v0.17.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/net&package-manager=go_modules&previous-version=0.15.0&new-version=0.17.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/ledgerwatch/erigon/network/alerts).

</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2023-10-12 10:54:30 +02:00
Alex Sharov
2a24ea6f62
exp lib up (#8359) 2023-10-04 12:55:48 +07:00
Alex Sharov
0165d00ee6
downloader: don't drop torrents after download (performance problem there solved) (#8358) 2023-10-04 12:34:45 +07:00