Commit Graph

20231 Commits

Author SHA1 Message Date
Dmytro
ae88a69511
diagnostics - added query for bootnodes (#8344) 2023-10-03 10:28:21 +07:00
Mark Holt
3d6d2a7c25
Added fix to allow getroothash to work with no api running (#8342)
Whitelisting calculation of the roothash should not be dependent on the
bor api running. This will not always be the case, for example when
erigon is configured with a separate rpc deamon.

To fix this the calculation has been moved to Bor.

Additionally the redundant Bor API code has been removed as this is not
called by any code and the functionality looks to have migrated to the
turbo/jsonrpc package.
2023-10-02 18:55:31 +01:00
Mark Holt
0bdca6c457
Metrics label fixes (#8339)
Fixes for label discrepancies in collector for summaries etc which have
a template which includes a quantile.

Initial native Prometheus client implementation of metrics - which is
currently turned off except for local testing and interface exports.
2023-10-02 17:19:02 +01:00
Alex Sharov
b6ffd87e44
downloader: don't probe port naive way (#8336)
- don't start server listener. it may stick port for some time and can
be assumed as port-scanning-activity
2023-10-02 08:39:54 +07:00
Giulio rebuffo
10746eb376
Added BLS_TO_EXECUTION_CHANGES pool (#8332)
Adds BLS_TO_EXECUTION_CHANGES
2023-10-01 17:16:55 +02:00
Andrew Ashikhmin
0427b162c4
Optimize gas by default in eth_createAccessList (#8337)
Enable gas optimizations of PRs #3453 & #8261 unless the `optimizeGas`
argument is explicitly set to `false`.
2023-10-01 14:22:18 +02:00
Quentin Kniep
3775f4a5d4
Extend gas optimization for eth_createAccessList (#8261)
This builds upon #3453 and #3524, which previously implemented gas
optimizations for the access lists generated by Erigon's implementation
of the `eth_createAccessList` RPC call.

Erigon currently optimizes inclusion of the recipient address based on
how many storage keys are accessed, but does not perform the same
optimization for sender address and precompiled contract addresses.
These changes make the same optimization available for all of these
cases.

Additionally, this handles the cases of block producer address and
created smart contract addresses. If these cases were omitted on purpose
since they heavily rely on state, it may still make sense to offer them
to users but disable them by default.
2023-10-01 13:24:15 +02:00
Somnath
6dd7d8fe6a
Fix some hive tests (#8331)
Changes:
Reorder some Engine API invalid checks to be closer to specs/hive tests
Move the Engine API direct method names to `interfaces`
2023-10-01 12:42:27 +02:00
lupin012
ecba93837a
rpctest: Add rpctest for eth_getBlockByHash() (#8323) 2023-09-30 13:06:14 +07:00
Giulio rebuffo
72ba18bd36
Beacon: Added basic operations pool (#8309)
Added operation pools for beacon chain. operations are the equivalent of
txs for eth2

Added operation pools for:

* Attester Slashings
* Proposer Slashings
* VoluntaryExits
* BLSExecutionToChange
* Postponed to later: Attestations (or maybe not)
2023-09-29 23:42:07 +02:00
Jason Yellick
5654ba07c9
Upgrade libp2p (enables go 1.21 support) (#8288)
Closes #8078 

This change is primarily intended to support go 1.21, but as a
side-effect requires updating libp2p, which in turn triggers an update
of golang.org/x/exp which creates quite a bit of (simple) churn in the
slice sorting.

This change introduces a new `cmp.Compare` function which can be used to
return an integer satisfying the compare interface for slice sorting.

In order to continue to support mplex for libp2p, the change references
github.com/libp2p/go-libp2p-mplex instead. Please see the PR at
https://github.com/libp2p/go-libp2p/pull/2498 for the official usptream
comment that indicates official support for mplex being moved to this
location.

Co-authored-by: Jason Yellick <jason@enya.ai>
2023-09-29 22:11:13 +02:00
Mark Holt
8d7a4bf4fb
Bor mainnet bootnode update (#8329)
Polygon updated these for bor recently, using our current bootnode can
cause a chain halt due to poor network connectivity
2023-09-29 16:52:58 +01:00
Alex Sharov
d0366ae34e
snapshots: remove concept of separated hist .toml file (#8326) 2023-09-29 11:30:02 +07:00
Alex Sharov
e94f4d8199
mdbx: less warn (#8325) 2023-09-29 10:40:32 +07:00
sudeep
d39f03783f
fix t8n call to ExecuteBlockEphemerally by passing chainReader (#8298)
fixing crash on consensus/merge/merge.go#Initialize function, on this
line.

```
chain.Config().IsCancun(header.Time)
```
2023-09-29 09:04:13 +07:00
Alex Sharov
e993ee984b
stage loop: allow nil in hook (#8318) 2023-09-29 09:03:19 +07:00
Mark Holt
9dfc8e0bde
Only reduce the consensus db size based on flags values (#8321)
This is to fix an issue with resource usage if the db.size.limit is
increased from its default setting of 2TB. This is applied to the chain
DB, but should not be used on the consensus DB which has smaller data
requirements. Expanding both DBs results in excessive RAM being reserved
by the underlying OS.
2023-09-28 19:25:12 +01:00
Dmytro
2cbd446e88
Diag session routing (#8317)
Co-authored-by: Mark Holt <mark@distributed.vision>
2023-09-28 16:02:02 +03:00
Andrew Ashikhmin
669503d38f
params: begin 2.51 release cycle (#8314) 2023-09-28 10:52:13 +02:00
Alex Sharov
32b2824e42
downloader: use after (#8315) 2023-09-28 10:41:39 +02:00
Andrew Ashikhmin
f00cf3720a
params: release 2.50.0 (#8313) 2023-09-28 09:46:00 +02:00
Andrew Ashikhmin
c724c0e916
Subdue logging from stages in inMemoryExecution (#8308)
Apparently `log.New()` doesn't discard messages. Before this change I
saw the following in the console log:
```
[INFO] [09-27|15:25:36.225] [NewPayload] Handling new payload        height=18227379 hash=0xa82630b9acf814930f18b45cad533a635076eaaf8e0ae596914d906db02ea3aa
[INFO] [09-27|15:25:36.624] [5/7 Execution] Completed on             block=18227379
[INFO] [09-27|15:25:37.245] [updateForkchoice] Fork choice update: flushing in-memory state (built by previous newPayload) 
[INFO] [09-27|15:25:37.854] RPC Daemon notified of new headers       from=18227378 to=18227379 hash=0xa82630b9acf814930f18b45cad533a635076eaaf8e0ae596914d906db02ea3aa header sending=9.615µs log sending=336ns
[INFO] [09-27|15:25:37.854] head updated                             hash=0xa82630b9acf814930f18b45cad533a635076eaaf8e0ae596914d906db02ea3aa number=18227379
```
And after this change:
```
[INFO] [09-27|20:31:36.929] [NewPayload] Handling new payload        height=18228897 hash=0x276fbffe9dc95fa613815238c870de89de340784b4d3d7a7bd5bf1cea6e54a97
[INFO] [09-27|20:31:37.713] [updateForkchoice] Fork choice update: flushing in-memory state (built by previous newPayload) 
[INFO] [09-27|20:31:38.172] RPC Daemon notified of new headers       from=18228896 to=18228897 hash=0x276fbffe9dc95fa613815238c870de89de340784b4d3d7a7bd5bf1cea6e54a97 header sending=17.073µs log sending=272ns
[INFO] [09-27|20:31:38.172] head updated                             hash=0x276fbffe9dc95fa613815238c870de89de340784b4d3d7a7bd5bf1cea6e54a97 number=18228897
```

This is a follow-up to PR #7464.
2023-09-28 09:13:23 +02:00
Alex Sharov
6cc2bd5751
downloader: non-readonly open db (so it can auto-recover if need) (#8312) 2023-09-28 11:38:29 +07:00
Alex Sharov
bd5908daae
downloader: stop timers (#8310) 2023-09-28 10:08:29 +07:00
Alex Sharov
664a58a1db
log skipped files (#8297) 2023-09-28 08:56:37 +07:00
Alex Sharov
b1c7824ecc
mdbx: less compile warnings (#8300) 2023-09-28 08:56:24 +07:00
Giulio rebuffo
d555fc450d
Fixed ungraceful shutdown (#8307) 2023-09-27 19:09:36 +02:00
Somnath
adaba41538
Disable blobCount check for local txn (#8303)
That should fix the hive tests as well. This change is keeping in line
with what happens for non-blob txs as well
2023-09-27 14:27:07 +00:00
Mark Holt
f99f326363
Bor fix frozen snapshot load (#8305)
This is a fix for at least one cause of this isssue:
https://github.com/ledgerwatch/erigon/issues/8212.

It happens after the end of the snapshot load, because the snapshot
processing which was introduced a couple of month ago does not deal with
validation of the headers at the start of the start of the chain.

I have also added a fix to the persistence so that the last snapshot is
recorded so that subsequent runs are not forced to process the whole
snapshot run from start.

The relationship between this an memory usage is that the fact that
headers are not processed leads to a queue of pending headers with size
of around 5GB. I have not changed any header parameters - so likely a
prolonged stop to header processing will result in a similar level of
memory growth.
2023-09-27 13:45:09 +01:00
Mark Holt
f26c7b389e
Bor break loop onrewind (#8302)
Add code to the headers state to break processing if a bor milestone
rewind is detected.

The rewind processing happens in the bor/heimdall stage - this change
just avoids unnecessary header loading
if a milestone fork is likely to be detected

---------

Co-authored-by: Anshal Shukla <shukla.anshal85@gmail.com>
2023-09-27 13:17:54 +01:00
Giulio rebuffo
d62ef03cad
Added states/fork and states/root to beacon API (#8293)
Added /eth/v1/beacon/states/{state_id}/root and
/eth/v1/beacon/states/{state_id}/fork
2023-09-27 11:15:51 +02:00
a
7a833e5dc5
can't change size of btree during ascend (#8295) 2023-09-27 09:42:20 +07:00
Andrew Ashikhmin
6afcd7eeb6
Update BeaconRootsAddress (#8294)
Set BeaconRootsAddress to `0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02`
in preparation for
[dencun-devnet-9](https://notes.ethereum.org/@ethpandaops/dencun-devnet-9)
per https://github.com/ethereum/EIPs/pull/7672. Hopefully this will be
the final change to BeaconRootsAddress.

Also update execution-spec-tests to
[v1.0.5](https://github.com/ethereum/execution-spec-tests/releases/tag/v1.0.5).
2023-09-26 17:44:36 +02:00
Alex Sharov
b3f4520449
increase loginterval of txpool and p2p logs (#8291) 2023-09-26 13:29:19 +07:00
Mark Holt
f794438335
Diag session routing (#8232)
Code to support react based UI for diagnostics:

* pprof, prometheus and diagnistics rationalized to use a single router
(i.e. they can all run in the same port)
* support_cmd updated to support node routing (was only first node)
* Multi content support in router tunnel (application/octet-stream &
appliaction/json)
* Routing requests changed from using http forms to rest + query params
* REST query requests can now be made against erigon base port and
diagnostics with the same url format/params

---------

Co-authored-by: dvovk <vovk.dimon@gmail.com>
Co-authored-by: Mark Holt <mark@disributed.vision>
2023-09-25 16:24:17 +01:00
Alex Sharov
5641b52be0
evm: less defers in interpreter (#8179) 2023-09-25 08:53:04 +07:00
Alex Sharov
a22ab813af
evm: simplify addToAccessList methods (#8280) 2023-09-25 08:52:51 +07:00
Giulio rebuffo
75c42d15f5
Beacon API: added support octect-stream (#8282)
Added support for ssz response
2023-09-24 20:08:05 +02:00
Giulio rebuffo
a95914df26
Added blocks API and attestations API (#8279) 2023-09-24 01:44:26 +02:00
Alex Sharov
4bec348e62
better lint suggession (#8278) 2023-09-23 12:19:16 +07:00
Alex Sharov
71082b06ba
erigon-lib v1.0.0 release (#8277) 2023-09-23 10:28:08 +07:00
Alex Sharov
d5e64132e3
grafana version up (#8276) 2023-09-23 10:13:46 +07:00
Alex Sharov
87efdbd535
Update README.md (#8272) 2023-09-23 09:38:37 +07:00
a
de69dce19a
copy updates (#8275) 2023-09-22 21:09:26 +02:00
Giulio rebuffo
13720af42c
Caplin: Implemented internal tree for ValidatorSet (#8234) 2023-09-22 12:16:19 +02:00
ledgerwatch
ef1729214d
Fixes for bor snapshots (#8270) 2023-09-22 17:08:22 +07:00
lupin012
92446bfa66
Rpcdaemon: fixed few bugs in erigon_getLatestLogs (#8153)
doing some testing some bugs in the API implementation were found and
fixed

---------

Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2023-09-22 17:07:16 +07:00
Andrew Ashikhmin
e62e131a8e
Verify excessBlobGas (EIP-4844) (#8269) 2023-09-22 11:52:33 +02:00
Alex Sharov
75b0ba0c69
touch data when do warmup (#8268) 2023-09-22 14:36:54 +07:00
Alex Sharov
101815ffac
make Select64 inlinable (#8267) 2023-09-22 14:16:57 +07:00