Commit Graph

4593 Commits

Author SHA1 Message Date
Alex Sharov
417a437584
Break dependency of ethcfg package to core/consensus/etc... move genesis struct to 'types' package (#7206) 2023-03-29 07:27:06 +00:00
racytech
975e38a800
eip-4844: NewEVMBlockContext now expects excessDataGas (#7203)
Small change in core.NewEVMBlockContext and now it expects
excessDataGas. This will be used in state transition to compute data fee
for eip-4844 data blobs. The logic that computes it will be added in the
next PRs.
2023-03-29 06:39:36 +00:00
Andrew Ashikhmin
b85d22b46d
log BLS verification failure (#7196) 2023-03-28 11:34:25 +00:00
Giulio rebuffo
ab3a1d2ce5
Remove propagation of lightclient updates (#7192) 2023-03-27 22:42:40 +00:00
racytech
70bc7f7a25
eip-4844: small additions and modified gaspool (#7190)
This PR contains very small EIP-4844 additions. GasPool is modified and
now it is a struct with 2 fields "gas" and "dataGas" (blobs are priced
in dataGas). ExcessDataGas block header field added. ExcessDataGas
needed to compute the data gas price. EIP-4844 helper functions are
added as well.
2023-03-27 21:39:15 +00:00
Giulio rebuffo
540af96ef7
removed --el.enabled (#7187) 2023-03-27 10:12:31 +00:00
Giulio rebuffo
628f52dd6c
Added reverse beacon changeset for beacon state rewind (#7185)
Added changesets for beacon chain to implement memory efficient fork
choice
2023-03-26 22:25:08 +00:00
alex.sharov
5ddb86d5fd clean 2023-03-26 11:13:30 +07:00
alex.sharov
19cf48affb prevent infinity unwind when no --unwind.every flag set 2023-03-26 10:52:31 +07:00
alex.sharov
3913a99341 integration temporal db 2023-03-26 10:36:23 +07:00
Alex Sharov
cff73b8aec
add constant kv.Unlim=-1 (#7183) 2023-03-26 03:18:04 +00:00
Alex Sharov
201572c6f5
enable more linters #954 (#7179) 2023-03-25 05:13:27 +00:00
Alex Sharov
7a51a29991
e3: DomainGetAsOf, DomainRange (#7177) 2023-03-25 03:51:43 +00:00
Max Revitt
bedc3548bb
fix(release): http-https redirect working (#7176) 2023-03-25 03:37:58 +00:00
Giulio rebuffo
25999def30
Fixed storage for download (#7175) 2023-03-24 14:11:24 +00:00
a
d3c790c166
add eth_getFilterLogs to docs (#7171)
add eth_getFilterLogs to docs
2023-03-24 04:03:01 +00:00
alex.sharov
89571074c1 panic in trace_adhoc 2023-03-24 10:10:41 +07:00
Alex Sharov
9001f668a7
go 1.19 atomics (#7164) 2023-03-23 05:11:28 +00:00
alex.sharov
b9b0950c70 test simplify 2023-03-23 10:31:43 +07:00
Jason Yellick
a09541c82c
Add eth_getProof support for historical blocks (#7115)
This PR starts with a few small commits of code cleanup. Reviewed
separately they should hopefully obviously be functionally no-ops. I'm
happy to strip these out and submit them separately if desired.

The final commit is to add support for older blocks as a parameter to
eth_getProof. In order to compute proofs, the function leverages the
staged sync unwinding code to bring the hashed state table back to its
historic state, as well as to build a list of trie nodes which need to
be invalidated/re-computed in the trie computation. Because these
operations could be expensive for very old blocks, it limits the
distance proofs are allowed from the head. It also adds some additional
checks for correctness, as well as tests which verify the
implementation.

This was discussed a bit on Discord in the db-format topic.

---------

Co-authored-by: Jason Yellick <jason@enya.ai>
2023-03-23 03:22:33 +00:00
Alex Sharov
af4d2c22a9
--txpool.commit.every panic handling (#7163) 2023-03-23 03:18:36 +00:00
Alex Sharov
223fcd178c
e3: domain range api simplify (#7158) 2023-03-22 07:36:03 +00:00
Alex Sharov
753a680cbd
e3: union limit (#7156) 2023-03-22 06:38:04 +00:00
Alex Sharov
28c1b1d50d
e4: to use serializev3 (#7154) 2023-03-22 04:53:49 +00:00
Temirlan
4e5dce1365
add flag txpool.commit_every (#7062)
Adds flag _--txpool.commit_every_ to control how often transactions
should be committed to the storage

[Related Issue](https://github.com/ledgerwatch/erigon/issues/7002)
2023-03-22 03:53:47 +00:00
Andrew Ashikhmin
56a3844656
Drop Default from GenesisBlock* functions (#7147)
Small cosmetic changes and clean-ups
2023-03-20 15:44:22 +00:00
Giulio rebuffo
97e17678ca
fixed fork consensus spec test (#7143) 2023-03-20 15:25:52 +00:00
Giulio rebuffo
6005bdd8b2
removed stream handler (#7142) 2023-03-19 23:15:34 +00:00
Giulio rebuffo
fb00d714b5
added tests for ssz_static in consensus tests and fixed beacon blocks encoding (#7141) 2023-03-19 22:47:27 +00:00
Giulio rebuffo
b129a9415e
Update go deps (#7138) 2023-03-19 20:13:53 +00:00
Giulio rebuffo
fc10aef874
removed database functionality from lightclient (#7135) 2023-03-18 20:27:37 +00:00
Giulio rebuffo
35a0ba571d
Banning peers sending bad gossip (#7134) 2023-03-18 19:45:53 +00:00
Giulio rebuffo
77a8cf9d5b
refactored sentinel gossip and only connect to nimbus now (#7127) 2023-03-17 21:51:19 +00:00
Giulio rebuffo
36828fbb08
Added tool for processing for all mainnet beacon blocks (#7095) 2023-03-17 12:37:51 +00:00
alex.sharov
e4b2072a16 --rpc.returndata.limit 2023-03-17 11:21:14 +07:00
Max Revitt
82217f5411
fix(release): download page https redirect (#7120)
Updated initial traefik config so the http -> https redirect on
download.erigon.sh will work.
2023-03-17 03:29:09 +00:00
awskii
7cee93aa10
E4 metrics upd (#7122) 2023-03-17 00:38:38 +00:00
Max Revitt
87c958b5c1
fix(release): run download page update separately (#7112)
Checksum not working as the file isn't available in the assets when run
in the same job.
2023-03-16 03:40:42 +00:00
Alex Sharov
157a380be7
e3: history no auto-increment (#7097) 2023-03-15 08:03:57 +00:00
hexoscott
4f91dff773
fix for reading yaml/toml config in cmd/integration (#7101) 2023-03-14 08:33:59 +00:00
Victor Shyba
158fb2b606
Optimize memory buffer, simplify set32, use sha256-simd (#7060)
Hi,

I'm syncing Gnosis on a Celeron N5100 to get familiar with the codebase.
In the process I managed to optimize some things from profiling.
Since I'm not yet on the project Discord, I decided to open this PR as a
suggestion. This pass all tests here and gave me a nice boost for that
platform, although I didn't have time to benchmark it yet.

* reuse VM Memory objects with sync.Pool. It starts with 4k as `evmone`
[code
suggested](0897edb001/lib/evmone/execution_state.hpp (L49))
as a good value.
* set32 simplification: mostly cosmetic
* sha256-simd: Celeron has SHA instructions. We should probably do the
same for torrent later, but this already helped as it is very CPU bound
on such a low end processor. Maybe that helps ARM as well.
2023-03-14 07:17:04 +00:00
hexoscott
efd541028c
read metrics config from yaml file (#7089) 2023-03-14 00:07:05 +00:00
Jason Yellick
b21569ccc5
Backfill eth getproof tests (#7092)
This PR adds missing tests for eth_getProof and does some mild
refactoring with switching from strings to more strict types. It's
likely best/most easily reviewed commit by commit.

Note, the tests include quite a number of helper types and functions for
doing the proof validation. This is largely because unlike Geth,
Erigon's approach to trie computations only requires serializing the
trie nodes, not deserializing them. Consequently, it wasn't obvious how
to leverage the existing trie code for doing deserialization and proof
checks. I checked on Discord, but, there were no suggestions. Of course,
any feedback is welcome and I'd be happy to remove this code if it can
be avoided.

Additionally, I've opted to change the interface type for `GetProof` to
use a `common.Hash` for the storage keys instead of a `string`. I
_think_ this should be fairly safe, as until very recently it was
unimplemented. That being said, since it's an interface, it has the
potential to break other consumers, anyone who was generating mocks
against it etc. There's additionally a `GetStorageAt` that follows the
same parameter. I'd be happy to submit a PR modifying this one as well
if desired.

Also, as a small note, there is test code for checking storage proofs,
but, storage proofs aren't currently supported by the implementation. My
hope is to add storage proofs and historic proofs in a followup PR.

---------

Co-authored-by: Jason Yellick <jason@enya.ai>
2023-03-14 00:04:52 +00:00
Giulio rebuffo
bc546c72da
Added hard fork transition support to Erigon-CL. (#7088) 2023-03-13 12:10:36 +00:00
Alex Sharov
f2d99f9d85
e3: split "changed keys" iterator to simplify (#7086) 2023-03-13 08:06:50 +00:00
hexoscott
9f6b842d03
check for free messages when calling trace_transaction (#7073)
Gateway reported an issue with a trace returning an odd result, similar
to the recent problem we'd seen with gnosis. I found that
debug_traceTransaction worked fine so found where the differences were.
trace_transaction wasn't checking for service transactions so the trace
failed around fees when it shouldn't.

A number of code paths use callManyTransactions so they should all now
check for service messages where needed.
2023-03-13 07:36:40 +00:00
Alex Sharov
f432cde16b
e3: reconst: run workers in errgroup (#7071) 2023-03-13 04:04:49 +00:00
Alex Sharov
a44e0afbd6
Downloader main loop wait on close (#7082) 2023-03-13 02:12:30 +00:00
Kevin Ingersoll
ec071b4195
fix typo in eth_call error (#7084)
Spotted this typo when poking at Cloudflare's public gateway and mapped
it back here 🙈
2023-03-13 02:12:08 +00:00
Giulio rebuffo
dbf1225cb2
Added partial SSZ library (#7083)
Implements SSZ encode/decoding and hashtreeroot for simple list-lacking
data structures. does not account offset case.
2023-03-12 14:41:53 +00:00