Commit Graph

20550 Commits

Author SHA1 Message Date
battlmonstr
b86bdb7a7e
silkworm: disable in release binaries (#8927)
A short-term safety measure to keep release.yml GH workflow unaffected.
2023-12-08 11:07:19 +01:00
battlmonstr
dac73f4b57
silkworm: check glibcpp compatibility (#8932)
libsilkworm requires libstdc++.so.6.0.30, but Rocky Linux 9.3 has only
libstdc++.so.6.0.29,
and `make erigon` produces an error about the GLIBCXX Version needed
3.4.30 (available 3.4.29).

see:

https://stackoverflow.com/questions/10354636/how-do-you-find-what-version-of-libstdc-library-is-installed-on-your-linux-mac
https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
2023-12-07 17:53:29 +01:00
Somnath
5987d4ef72
Enable superfluous ws.port flag to fix some Hive RPC tests (#8909)
### Context
**Websocket port flag**
Hive tests for RPC suite depend on the (geth) default 8546 port. So,
opening one more listener for this additional port if `ws.port` was
specified. This flag isn't used in Erigon, as it shares port with http
listener. Normally, one may not specify and it offers no other benefit.
2023-12-07 14:59:22 +04: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
battlmonstr
d78cbfeceb
silkworm: disable on incompatible Linux versions (#8893)
Silkworm built on Ubuntu 22 depends on glibc 2.34. In order to run on an
older OS, Silkworm needs to be built and linked with an older glibc, but
to build on an older OS we need a compatible compiler. Silkworm requires
gcc 11+ that is not available on Ubuntu 20 or Debian 11.

To simplify the deployment disable Silkworm support on versions before
Ubuntu 22, Debian 12, and glibc prior to 2.34. The check for Ubuntu and
Debian is explicit, because some Ubuntu 16 installations report glibc
2.35 with ldd, but `go build` still uses an older system one and fails.
2023-12-06 16:01:44 +01:00
Mark Holt
624e4d4201
Fix snap initialization from frozen blocks (#8908)
This fixes a bug on syncing from scratch if the start point is in a
frozen block.
2023-12-06 14:28:05 +00:00
Giulio rebuffo
0d2aecf829
Backfill only with flag (#8913)
Caplin snapshots only enabled with caplin.backfill
2023-12-06 14:22:13 +01:00
4rgon4ut
8bfff94941
Update gnosis bootnodes (#8907)
Title seems selfdescribing.

Bootnodes list source:

https://github.com/gnosischain/configs/blob/main/mainnet/bootnodes_execution.yaml
2023-12-06 14:20:25 +01:00
Alex Sharov
754276909b
bor snaps: "erigon snapshots retire" to build bor files (#8912) 2023-12-06 12:12:43 +00:00
Giulio rebuffo
c477281362
Caplin: Parallel historical states reconstruction (#8817)
What does this PR do:
* Optional Backfilling and Caplin Archive Node
* Create antiquary for historical states
* Fixed gaps of chain gap related to the Head of the chain and anchor of
the chain.
* Added basic reader object to Read the Historical state
2023-12-06 10:48:36 +01:00
Alex Sharov
7335dccc2c
mdbx: print in logs - real limit (#8910) 2023-12-06 15:46:05 +07:00
Alex Sharov
e11e374f8b
estimate: less ram for indexing (#8911) 2023-12-06 09:20:28 +01:00
battlmonstr
96bb5ddb81
silkworm: macOS Intel library (#8891)
61782fa8d0

435dee4642
2023-12-06 11:02:54 +07:00
ddl
edcd7fcd63
update outdated information (#8906)
1. When running locally, found that these **TODO** json-rpc have been
implemented. Updating these outdated information can make the document
clearer.
```
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[],"id":1}' http://loca
lhost:8545
{"jsonrpc":"2.0","id":1,"result":"0x02000000000000009c49b60f431cabc7"}
```
2. [but it's easy to accomplish] Points to an obsolete message
(9b8cdc0f22/eth/downloader/downloader.go (L673))
2023-12-06 09:23:43 +07:00
ddl
f9f36b59e7
chore:TxPoolGossipDisableFlag usage (#8899)
Spotted this typo when follow the help commond
2023-12-05 12:17:17 +01:00
Alex Sharov
9bea4e3a9c
blockReader: read blockNum == r.FrozenBlocks() from files (#8890)
Example value of `r.FrozenBlocks()`: `499999`
In future PR I will rename this method to something like
`MaxBlockNumInFiles()`
2023-12-05 13:59:21 +07:00
ddl
df9b47478c
fix: Example TOML config file parsing error (#8902)
follow  Example TOML config file will cause parsing error
```
erigon git:(devel) ✗ ./build/bin/erigon --config ./config.toml --chain=sepolia
EROR[12-05|12:07:09.029] failed setting config flags from yaml/toml file err="(1, 1): parsing error: keys cannot contain ` character"
(1, 1): parsing error: keys cannot contain ` character
```
after remove ` character works 
```
✗ ./build/bin/erigon --config ./config.toml --chain=sepolia 
INFO[12-05|12:00:17.619] logging to file system                   log dir=data/logs file prefix=erigon log level=info json=false
INFO[12-05|12:00:17.620] Build info                               git_branch=devel git_tag=v2.54.0-91-g47a6ac16d-dirty git_commit=47a6ac16da6de62e589b655bde7936dcdb0eb073
INFO[12-05|12:00:17.620] Starting Erigon on Sepolia testnet... 
INFO[12-05|12:00:17.622] Maximum peer count                       ETH=100 total=100
INFO[12-05|12:00:17.623] starting HTTP APIs                       APIs=eth,debug,net
INFO[12-05|12:00:17.623] torrent verbosity                        level=WRN
INFO[12-05|12:00:19.967] Set global gas cap                       cap=50000000
INFO[12-05|12:00:19.968] [Downloader] Runnning with               ipv6-enabled=true ipv4-enabled=true download.rate=16mb upload.rate=4mb
INFO[12-05|12:00:19.970] Opening Database                         label=chaindata path=/erigon/data/chaindata
INFO[12-05|12:00:19.974] [db] chaindata                           sizeLimit=12TB pageSize=8192
INFO[12-05|12:00:19.975] Re-Opening DB in exclusive mode to apply migrations 
INFO[12-05|12:00:20.025] [db] chaindata                           sizeLimit=12TB pageSize=8192
INFO[12-05|12:00:20.025] Apply migration                          name=db_schema_version5
INFO[12-05|12:00:20.033] Applied migration                        name=db_schema_version5
INFO[12-05|12:00:20.033] Apply migration                          name=txs_begin_end
INFO[12-05|12:00:20.035] Applied migration                        name=txs_begin_end
INFO[12-05|12:00:20.035] Apply migration                          name=txs_v3
INFO[12-05|12:00:20.036] Applied migration                        name=txs_v3
INFO[12-05|12:00:20.036] Updated DB schema to                     version=6.1.0
INFO[12-05|12:00:20.074] [db] chaindata                           sizeLimit=12TB pageSize=8192
INFO[12-05|12:00:20.084] Writing custom genesis block             hash=0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9
INFO[12-05|12:00:20.085] Initialised chain configuration          config="{ChainID: 11155111, Homestead: 0, DAO: <nil>, Tangerine Whistle: 0, Spurious Dragon: 0, Byzantium: 0, Constantinople: 0, Petersburg: 0, Istanbul: 0, Muir Glacier: 0, Berlin: 0, London: 0, Arrow Glacier: <nil>, Gray Glacier: <nil>, Terminal Total Difficulty: 17000000000000000, Merge Netsplit: 1735371, Shanghai: 1677557088, Cancun: <nil>, Prague: <nil>, Engine: ethash}" genesis=0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9
INFO[12-05|12:00:20.095] Initialising Ethereum protocol           network=11155111
```
2023-12-05 12:23:15 +07:00
a
47a6ac16da
[beacon handler] framework (#8851)
adds a two indexes to the validators cache

creates beaconhttp package with many utilities for beacon http endpoint
(future support for ssz is baked in)

started on some validator endpoints
2023-12-05 00:13:52 +01:00
Anıl
1492cc4de1
fixing typos (#8883)
Correction for "Lets assume":

Incorrect: "Lets assume"
Correct: "Let's assume"
Explanation: In this phrase, the word "Lets" is incorrectly written. The
correct form should be "Let's," which is a contraction of "let us."

Correction for the word "tripple":

Incorrect: "tripple"
Correct: "triple"
Explanation: The word "tripple" is misspelled. The correct spelling is
"triple," which refers to something made up of three parts, or
multiplied by three.
2023-12-05 05:59:13 +07:00
ddl
c5f4c761e0
fix: ethdb-doc (#8886) 2023-12-05 05:58:57 +07:00
Andrew Ashikhmin
6a70aaaaf2
params: begin 2.56 release cycle (#8895) 2023-12-04 14:47:11 +01:00
a
3fcb1e6a93
add config files to gitignore (#8894) 2023-12-04 07:40:04 -06:00
Alex Sharov
49890b38b7
caplin: to use 1 worker for snapshots compression (#8892)
Erigon by default must use as minimum resources as possible to build
snapshots. But cli commands - can go opposite and maximize.
2023-12-04 18:55:40 +07:00
Andrew Ashikhmin
fcb9fce5d0
flags: bump default value of db.size.limit to 12TB (#8889)
As per the
[comment](https://github.com/ledgerwatch/erigon/pull/8869#issuecomment-1836645516)
in PR #8869, 8 TB is actually not enough for Polygon.
2023-12-04 11:56:30 +01:00
a
b376d3cabf
allow disable file logging (#8884)
allows the disabling of file logging using the new flag
`--log.dir.disable`



NOTE: diagnostics tool logs WILL NOT function if this is set.
2023-12-04 11:11:11 +07:00
Alex Sharov
2991a6b645
integration: run_migration must not use Accede mode (#8867) 2023-12-02 18:09:53 +07:00
Bayram Guvanjov
e7e1bf444c
Caplin: Add a request limiter (#8868)
This PR is to add the request rate limiter. 

The solution is to count the request number for each peer for each
minute, if the peer exceeds the limit, block the requests for a
specified time.

Current limits:
- Request limited to `5000` requests per minute for each handler.
- Penalty blockage time `1-minute`
2023-12-01 20:11:18 +01:00
Mark Holt
85ade6b49a
FIx outstanding know header==nil errors + reduce bor heimdall logging (#8878)
This PR has fixes for a number of instances in the bor heimdall stage
where nil headers are either ignored or inadvertently processed.

It also has a demotion of milestone related logging messages to debug
for missing blocks because the process is not at the head of the chain +
a general reduction in periodic logging to 30 secs rather than 20 to
reduce the log output on long runs.

In addition there is a refactor of persistValidatorSets to perform
validator set initiation in a seperate function. This is intended to
clarify the operation of persistValidatorSets - which is till performing
2 actions, persisting the snapshot and then using it to check the header
against synthesized validator set in the snapshot.
2023-12-01 17:52:50 +00:00
Alex Sharov
ad48ecdcbb
downloader: download rates per peer with webseeds (#8879) 2023-12-01 13:39:43 +00:00
Alex Sharov
421118378a
fix LoadFromFile empty error (#8877) 2023-12-01 18:50:06 +07:00
Stéphane Loeuillet
b5640bb64b
Bump GraphQL version + implement blocks (block range) (#8872) 2023-12-01 10:21:16 +01:00
Andrew Ashikhmin
1ae130198e
debug_trace*: root gas should use tx.gasLimit (#8858)
Cherry pick https://github.com/ethereum/go-ethereum/pull/27029

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Delweng <delweng@gmail.com>
2023-12-01 10:04:32 +01:00
Alex Sharov
b72c37cd37
lint fix: go mod tidy (#8873) 2023-12-01 15:37:18 +07:00
a
98c57e75c0
[caplin] event source server (#8865)
eventsource is required for the validator api. this implements the
eventsource sink/server handler

the implementation is based off of this document:
https://html.spec.whatwg.org/multipage/server-sent-events.html

note that this is a building block for the full eventsource server.
there still needs to be work done

prysm has their own custom solution based off of protobuf/grpc:
https://hackmd.io/@prysmaticlabs/eventstream-api using that would be not
good

existing eventsource implementations for golang are not good for our
situation. options are:

1. https://github.com/r3labs/sse - has most stars - this is the best
contender, since it uses []byte and not string, but it allocates and
copies extra times in the server (because of use of fprintf) and makes
an incorrect assumption about Last-Event-ID needing to be a number (i
can't find this in the specification).
2. https://github.com/antage/eventsource -requires full buffers, copies
many times, does not provide abstraction for headers. relatively
unmaintained
3. https://github.com/donovanhide/eventsource - missing functionality
around sending ids, requires full buffers, etc
4. https://github.com/bernerdschaefer/eventsource - 10 years old,
unmaintained.

additionally, implemetations other than r3labs/sse are very incorrect
because they do not split up the data field correctly when newlines are
sent. (parsers by specification will fail to encode messages sent by
most of these implementations that have newlines, as i understand it).
the implementation by r3labs/sse is also incorrect because it does not
respect \r

finally, all these implementations have very heavy implementation of the
server, which we do not need since we will use fixed sequence ids.
r3labs/sse for instance hijacks the entire handler and ties that to the
server, losing a lot of flexiblity in how we implement our server
 
for the beacon api, we need to stream: 

```head, block, attestation, voluntary_exit, bls_to_execution_change, finalized_checkpoint, chain_reorg, contribution_and_proof, light_client_finality_update, light_client_optimistic_update, payload_attributes```
 
some of these are rather big json payloads, and the ability to simultaneously stream them from io.Readers instead of making a full copy of the payload every time we wish to rebroadcast it will save a lot of heap size for  both resource constrained environments and serving at scale.  

the protocol itself is relatively simple, there are just a few gotchas
2023-11-30 22:21:51 +01:00
battlmonstr
ebdfbd8e54
silkworm: disable on arm64 Linux (#8870)
see
c5729e30cf
2023-11-30 22:49:00 +07:00
Andrew Ashikhmin
333e0e5666
flags: bump default value of db.size.limit to 8TB (#8869)
3TB is not enough for Polygon
2023-11-30 21:08:26 +07:00
battlmonstr
bc0b727fc0
silkworm: use silkworm-go bindings (#8829) 2023-11-30 12:45:02 +01: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
Alex Sharov
5ff9ce802b
prnt_stages: to show value of --snapshots flag (#8862) 2023-11-30 16:16:53 +07:00
Guido Vranken
015f6eb4c5
Call Tracer.CaptureState before memory expansion (#8860)
This aligns the tracing behavior with Geth, Besu and Nimbus.
2023-11-30 11:33:11 +07:00
Anshal Shukla
8d1758ceea
Add support for amoy testnet (#8674)
Co-authored-by: Mark Holt <mark@distributed.vision>
Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2023-11-30 08:19:52 +07:00
Alex Sharov
473e0414ef
estimate: at-lest 1 worker (#8859) 2023-11-29 16:29:15 +00:00
Alex Sharov
2e0f9b0411
"erigon snapshots diff": setup logger (#8834) 2023-11-29 16:27:58 +00:00
Alex Sharov
427f2637d2
mdbx: hard-limit of small db's dirty_space (#8850)
it didn't cause problems yet. but it seems a good idea in-general.
2023-11-29 15:09:55 +01:00
kaliubuntu0206
e91dc9f1bf
Update mingw cmake version for windows (#8856)
From comment
https://github.com/ledgerwatch/erigon/issues/8623#issuecomment-1831473288
2023-11-29 19:10:49 +07:00
a
71d7e2c957
fix (#8852)
- dont return nil for config :)
2023-11-29 12:18:38 +07:00
a
a2673c62c5
[caplin/sentinel] config reorganizations (#8844) 2023-11-28 22:45:58 -06:00
Alex Sharov
3e8a028cbb
evm: remove interpreter interface - step3 (#8842) 2023-11-29 09:29:16 +07:00
Dmytro
a63b89334b
added logging for slow RPC requests (#8818)
Changed distribution of httpcfg.HttpCfg to be pointer.
Added new flags:
rpc.slow.log - which is false by default, this flag need to enable
logging slow RPC requests
rpc.slow.log.threshold - which is 100 by default, this flag specify slow
threshold in milliseconds
Updated rpc handler to log slow requests:
- added map[request id] {method, timestamp}
- put every request details to map above
- delete request details from map above
- added time interval check for elements in map and if time difference
is more than given threshold print request id and the method
- app will print slow requests in next cases:
1. As soon as request take more than given threshold
2. Every 20 seconds if request still in process
3. After request finished and it took more than give threshold

---------

Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2023-11-28 16:11:39 +07:00