Commit Graph

20444 Commits

Author SHA1 Message Date
Giulio rebuffo
8d8368091c
Add full support to beacon snapshots (#8665)
This PR adds beacon blocks snapshots for the following chains:

* Mainnet snapshots
* Sepolia snapshots
2023-11-13 14:10:57 +01:00
Andrew Ashikhmin
1857aa4a60
Remove stale issues workflow (#8716)
At the team meeting in Istanbul we decided to remove the auto-stale bot.
2023-11-13 13:12:22 +01:00
Andrew Ashikhmin
d60356e05b
params: begin 2.55 release cycle (#8715) 2023-11-13 12:41:39 +01:00
Andrew Ashikhmin
aeec5221c9
params: remove dev from v2.54.0 (#8713) 2023-11-13 11:48:44 +01:00
guangwu
887dd255ff
chore: remove refs to deprecated io/ioutil (#8557) 2023-11-13 10:32:14 +01: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
Alex Sharov
c344144133
defaults change: increase default --db.read.concurrency 4 times (#8683)
we plan step-by-step keep increasing this default
still see users for who it helped to handle more rpc 
tradeoff: increasing of this flag - increasing "historical rpc"
throughput and decreasing "recent data rpc" throughput
2023-11-10 09:52:12 +03:00
Arpit Temani
4297a31155
agra hf mainnet (#8684)
Add Agra HF details for bor mainnet.
2023-11-09 19:03:45 +05:30
pwd123
ff88a9393e
fix-rules-typo (#8681) 2023-11-09 07:40:24 +03:00
pwd123
a0682088ab
Add readonly transaction rollback check rule (#8682) 2023-11-09 07:40:11 +03:00
Dmytro
466031ab8f
add fixes (#8673) 2023-11-08 17:02:30 +03:00
Manav Darji
97f00a1433
headerdownload: handle tie breaker for forkchoice in pow networks (#8616)
Based on https://github.com/maticnetwork/bor/pull/871 in bor, this PR
handles import of same difficulty chains (tie breaker conditions) based
on their height and hash.

This PR also modifies an existing test to check different types of
side-chain import and how the canonical is decided.
2023-11-07 19:24:59 +00:00
Dmytro
9c7c758bda
added snapshot sync diagnostic information, updated diagnostic channel (#8645) 2023-11-07 12:50:36 +00:00
Sixtysixter
d1271268c7
debug_traceBlockByNumber pattern test (#8655)
added debug_traceBlockByNumber API pattern test
2023-11-07 15:51:25 +07:00
Mark Holt
509a7af26a
Discovery zero refresh timer (#8661)
This fixes an issue where the mumbai testnet node struggle to find
peers. Before this fix in general test peer numbers are typically around
20 in total between eth66, eth67 and eth68. For new peers some can
struggle to find even a single peer after days of operation.

These are the numbers after 12 hours or running on a node which
previously could not find any peers: eth66=13, eth67=76, eth68=91.

The root cause of this issue is the following:

- A significant number of mumbai peers around the boot node return
network ids which are different from those currently available in the
DHT
- The available nodes are all consequently busy and return 'too many
peers' for long periods

These issues case a significant number of discovery timeouts, some of
the queries will never receive a response.

This causes the discovery read loop to enter a channel deadlock - which
means that no responses are processed, nor timeouts fired. This causes
the discovery process in the node to stop. From then on it just
re-requests handshakes from a relatively small number of peers.

This check in fixes this situation with the following changes:

- Remove the deadlock by running the timer in a separate go-routine so
it can run independently of the main request processing.
- Allow the discovery process matcher to match on port if no id match
can be established on initial ping. This allows subsequent node
validation to proceed and if the node proves to be valid via the
remainder of the look-up and handshake process it us used as a valid
peer.
- Completely unsolicited responses, i.e. those which come from a
completely unknown ip:port combination continue to be ignored.
-
2023-11-07 08:48:58 +00: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
Giulio rebuffo
e67db34145
Caplin: Bumbed down snapshots from 500 to 100k (#8657) 2023-11-06 15:41:19 +01:00
Alex Sharov
bba91e90ec
downloader: demote webseed request errors (#8662) 2023-11-06 14:47:57 +01:00
pwd123
0df5a6c08a
add rollback tx at GetVoteOnHash #8637 (#8660)
At `turbo/jsonrpc/bor_snapshot.go:239` creates read only transaction and
acquire semaphore but does not rollback or commit transaction and
unrelease semaphore lock. Over time, this will result in the locking all
of semaphore resources. Any other resources can't acquire semaphore.

I added defer function to rollback transaction to release semaphore.
2023-11-06 11:39:10 +00:00
ledgerwatch
1185587b20
Move validator set snapshot computation to bor_heimdall stage (#8646)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro-2.local>
2023-11-06 08:24:33 +00:00
NotCoffee418
86e7abecc4
Fix typos and capitalization in --help (#8659) 2023-11-06 13:38:48 +07:00
ledgerwatch
2064edc5e6
Add arguments (no-op) (#8653) 2023-11-04 17:44:34 +00:00
ledgerwatch
138dceb639
Make some functions in bor exportable (no-op) (#8650) 2023-11-04 12:54:31 +00:00
ledgerwatch
6b09679774
Fix typo in make output (#8649) 2023-11-04 11:11:15 +00:00
ledgerwatch
a77e33e7c4
Introduce extra functions for BorSpans (no-op) (#8648) 2023-11-04 10:59:07 +00:00
ledgerwatch
1ffa3fcf94
Properly remove borspans snapshots after merges (#8647) 2023-11-04 09:58:56 +00:00
a
2aab8f496c
rlp2 (#8643)
rlp2 is a package that aims to replace the existing erigon-lib/rlp
package and the erigon/common/rlp

it is called rlp2 for now because it requires breaking changes to
erigon-lib/rlp and i do not have the time right now to test all current
uses of such functions

however, the encoder/decoder characteristics of rlp2 might be desirable
for caplin, and also for execution layer parsing blob txns, so im
putting it in a folder called rlp2 (note that it exports package rlp for
easier switching later)

importantly, rlp2 is designed for single-pass decoding with the ability
to skip elements one does not care about. it also is zero alloc.
2023-11-04 09:22:11 +07:00
Giulio rebuffo
36595994e8
Bumps down Bodies Timeout from 30 secs to 2 secs (#8619)
Now our timings are 8.6 MB/sec
2023-11-03 21:44:35 +01:00
battlmonstr
9db2d56aac
devnet: scenarios as tests (#8640) 2023-11-03 15:25:27 +01:00
Andrew Ashikhmin
8288dcb5c2
erigon-lib: remove unused constants from protocol.go (#8644) 2023-11-03 10:20:36 +01:00
Alex Sharov
714fa0fdc7
mainnet 18.3M snaps (#8639) 2023-11-02 14:14:39 +07:00
battlmonstr
d92898a508
p2p: silkworm sentry (#8527) 2023-11-02 08:35:13 +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
battlmonstr
35696afca1
tests: test that erigon can be used as a library (#8494) 2023-11-01 11:44:01 +01:00
battlmonstr
3698e7f476
devnet: configuration fixes (#8592)
* fix "genesis hash does not match" when dev nodes connect  
The "dev" nodes need to have the same --miner.etherbase in order to
generate the same genesis ExtraData by DeveloperGenesisBlock(). Override
DevnetEtherbase global var that's used if --miner.etherbase is not
passed. (for NonBlockProducer case)

* fix missing private key for the hardcoded DevnetEtherbase  
Fixes panic if SigKey is not found. Bor non-producers will use a default
`DevnetEtherbase` while Dev nodes modify it. Save hardcoded
DevnetEtherbase/DevnetSignPrivateKey into accounts so that SigKey can
recover it.

* refactor devnet.node to contain Node config  
This avoids interface{} type casts and fixes an error with
Heimdall.validatorSet == nil

* add connection retries to rpcCall and Subscribe of requestGenerator  
Fixes "connection refused" errors due to node not ready to handle early
RPC requests.

* fix deadlock in Heimdall.NodeStarted

* fix GetBlockByNumber
Fixes "cannot unmarshal string into Go struct field body.transactions of
type jsonrpc.RPCTransaction"

* demote "no of blocks on childchain is less than confirmations
required" to Info (#8626)

* demote "mismatched pending subpool size" to Debug (#8615)

* revert wiggle testing code
2023-11-01 11:08:47 +01:00
Alex Sharov
8e54a965ca
webseed: don't download .torrent files (#8629) 2023-11-01 15:50:35 +07:00
Alex Sharov
b5ea87d8c5
mdbx_empty_kv_dup (#8635) 2023-11-01 15:50:27 +07:00
Alex Sharov
d4b19b3bb6
pool: limit broadcast tx size by 4kb (#8634)
similar to geth
2023-11-01 09:56:02 +07:00
yyjia
22332f72eb
fix: batch close confict with flush (#8613)
both batch.Flush() and batch.close() close channel, I think flush is not
necessary to close channel
2023-11-01 09:08:47 +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
Mark Holt
c20af7d985
Add code to handle close/cancel semantics (#8633) 2023-10-31 18:43:23 +00:00
Andrew Ashikhmin
cabd2b21dd
Mumbai: fix fork ID for Agra (#8630)
otherwise we start losing maticnetwork/bor peers on devp2p
2023-10-31 10:35:53 +01:00
a
d8d7d8d5df
Enable h2c for http handler. add https handler for http2 (#8610)
new flag examples.

--https.enabled
--https.addr="0.0.0.0"
--https.port=443
--https.url="unix:///file.wow"
--https.cert="keyfile.cert" 
--https.key="certfile.cert"

also adds support for h2c to the http handler - http2 protocol without tls.
2023-10-31 04:14:20 -05:00
Alex Sharov
c90bff7e22
mdbx: use release tag (#8628) 2023-10-31 10:11:40 +07:00
Anshal Shukla
83bbe0dd37
Fix Agra hf scheduling on Mumbai (#8620)
Co-authored-by: yperbasis <andrey.ashikhmin@gmail.com>
2023-10-30 15:18:47 +01:00
Giulio rebuffo
513fd50fa5
Compress snapshots for Caplin with lz4 level=1 (#8609) 2023-10-30 13:48:14 +01:00