Commit graph

15940 commits

Author SHA1 Message Date
Chen Kai
80ef312cb4
Merge branch 'ethereum:master' into portal 2024-10-23 23:59:22 +08:00
thinkAfCod
7ce7980bd5 fix: go.sum updated by go mod tidy 2024-10-23 23:59:03 +08:00
thinkAfCod
a75e981c5b fix: replace assert to require 2024-10-23 23:59:03 +08:00
thinkAfCod
b44ca3c190 fix: upgrade utp-go 2024-10-23 23:59:03 +08:00
Fredrik Svantes
3e567b8b29
docs: update security policy (#30606)
previous key expired 2023-07-27, the new one expires 2026-02-22:

pub   rsa4096 2016-11-11 [SC] [expires: 2026-02-22]
      AE96ED969E479B0084F3E17FE88D3334FA5F6A0A
uid Ethereum Foundation Security Team <security@ethereum.org>
uid Ethereum Foundation Bug Bounty <bounty@ethereum.org>
sub   rsa4096 2016-11-11 [E] [expires: 2026-02-22]
2024-10-23 15:12:56 +02:00
Chen Kai
8563ce1d52 add wait discv5 table 2024-10-23 16:52:52 +08:00
Shude Li
f8f5609b8e
eth/tracers/internal/tracertest: add missing Random to call context (#30652)
Fixes a configuration issue in a test-helper, so that we can do call tracing-tests post-merge
2024-10-23 08:33:14 +02:00
jwasinger
478012ab23
all: remove TerminalTotalDifficultyPassed (#30609)
rebased https://github.com/ethereum/go-ethereum/pull/29766 . The
downstream branch appears to have been deleted and I don't have perms to
push to that fork.

`TerminalTotalDifficultyPassed` is removed. `TerminalTotalDifficulty`
must now be non-nil, and it is expected that networks are already
merged: we can only import PoW/Clique chains, not produce blocks on
them.

---------

Co-authored-by: stevemilk <wangpeculiar@gmail.com>
2024-10-23 08:26:18 +02:00
kevaundray
74461aecf6
crypto, tests/fuzzers: add gnark bn254 precompile methods for fuzzing (#30585)
Makes the gnark precompile methods more amenable to fuzzing
2024-10-23 08:11:25 +02:00
Martin HS
459bb4a647
core/state: move state log mechanism to a separate layer (#30569)
This PR moves the logging/tracing-facilities out of `*state.StateDB`,
in to a wrapping struct which implements `vm.StateDB` instead.

In most places, it is a pretty straight-forward change: 
- First, hoisting the invocations from state objects up to the statedb. 
- Then making the mutation-methods simply return the previous value, so
that the external logging layer could log everything.

Some internal code uses the direct object-accessors to mutate the state,
particularly in testing and in setting up state overrides, which means
that these changes are unobservable for the hooked layer. Thus, configuring
the overrides are not necessarily part of the API we want to publish.

The trickiest part about the layering is that when the selfdestructs are
finally deleted during `Finalise`, there's the possibility that someone
sent some ether to it, which is burnt at that point, and thus needs to
be logged. The hooked layer reaches into the inner layer to figure out
these events.

In package `vm`, the conversion from `state.StateDB + hooks` into a
hooked `vm.StateDB` is performed where needed.

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2024-10-23 08:03:36 +02:00
thinkAfCod
cfbffc571f fix: cache id and addr in discv5
revert
2024-10-23 11:29:29 +08:00
thinkAfCod
d34a772ac3 fix: check lint 2024-10-23 11:29:29 +08:00
thinkAfCod
81477ca08b fix: not cache nil node 2024-10-23 11:29:29 +08:00
thinkAfCod
12182b4afe fix: test case modify 2024-10-23 11:29:29 +08:00
thinkAfCod
c997bb0321 fix: log packet nonce 2024-10-23 11:29:29 +08:00
thinkAfCod
d28ff8ff6d fix: cache node 2024-10-23 11:29:29 +08:00
rafaelss
95c2637065
Merge pull request #203 from r4f4ss/metrics_ethstats
[WIP] Metrics implementation
2024-10-21 21:05:23 -04:00
rafaelss
49351666c5
Merge branch 'optimism-java:portal' into metrics_ethstats 2024-10-21 16:41:59 -04:00
Chen Kai
5d315f8d32
Merge branch 'ethereum:master' into portal 2024-10-21 22:11:24 +08:00
Péter Szilágyi
a5fe7353cf
common: drop BigMin and BigMax, they pollute our dep graph (#30645)
Way back we've added `common.math.BigMin` and `common.math.BigMax`.
These were kind of cute helpers, but unfortunate ones, because package
all over out codebase added dependencies to this package just to avoid
having to write out 3 lines of code.

Because of this, we've also started having package name clashes with the
stdlib `math`, which got solves even more badly by moving some helpers
over ***from*** the stdlib into our custom lib (e.g. MaxUint64). The
latter ones were nuked out in a previous PR and this PR nukes out BigMin
and BigMax, inlining them at all call sites.

As we're transitioning to uint256, if need be, we can add a min and max
to that.
2024-10-21 12:45:33 +03:00
Péter Szilágyi
31a6418d77
consensus/clique, miner: remove clique -> accounts dependency (#30642)
Clique currently depends on the `accounts` package. This was a bit of a
big cannon even in the past, just to pass a signer "account" to the
Clique block producer. Either way, nowadays Geth does not support clique
mining any more, so by removing that bit of functionality from our code,
we can also break this dependency.

Clique should ideally be further torn out, but this at least gets us one
step closer to cleanups.
2024-10-21 09:24:28 +03:00
Martin HS
e4dbd5f685
eth/tracers/js: avoid compiling js bigint when not needed (#30640)
While looking at some mem profiles from `evm` runs, I noticed that
`goja` compilation of the bigint library was present. The bigint library
compilation happens in a package `init`, whenever the package
`eth/tracers/js` is loaded. This PR changes it to load lazily when
needed.

It becomes slightly faster with this change, and slightly less alloc:y. 

Non-scientific benchmark with 100 executions: 
```
time for i in {1..100}; do ./evm --code 6040 run; done;
 ```

current `master`:

```
real    0m6.634s
user    0m5.213s
sys     0m2.277s
```
Without compiling bigint
```
real    0m5.802s
user    0m4.191s
sys     0m1.965s
```
2024-10-20 19:36:51 +03:00
Péter Szilágyi
dac54e31a7
build, internal, version: break ci.go/version->common dependency (#30638)
This PR tries to break the ci.go to common dependency by moving the
version number out of params.
2024-10-20 19:28:39 +03:00
Péter Szilágyi
5c3b792e61 common/math: sigh, keep deleting dead code 2024-10-20 15:43:39 +03:00
Péter Szilágyi
9015a05f31
common/math: delete some further dead code (#30639) 2024-10-20 15:38:31 +03:00
Péter Szilágyi
bb527b949a
build: get rid of ci.go -> common direct dependency (#30637) 2024-10-20 14:54:06 +03:00
Péter Szilágyi
48d05c43c9
all: get rid of custom MaxUint64 and MaxUint64 (#30636) 2024-10-20 14:41:51 +03:00
Péter Szilágyi
babd5d8026
core/state: fix runaway alloc caused by prefetcher heap escape (#30629)
Co-authored-by: lightclient <lightclient@protonmail.com>
2024-10-20 13:25:15 +03:00
fearlessfe
df4e0d2032 fix: test error 2024-10-19 20:00:03 +08:00
fearlessfe
4587ceb69d fix: rpc method error in state network 2024-10-19 20:00:03 +08:00
rjl493456442
b6c62d5887
core, trie, triedb: minor changes from snapshot integration (#30599)
This change ports some non-important changes from https://github.com/ethereum/go-ethereum/pull/30159, including interface renaming and some trivial refactorings.
2024-10-18 17:06:31 +02:00
Péter Szilágyi
3ff73d46b3
build: reenable building arm64 concurrently (#30626) 2024-10-18 14:49:27 +03:00
Péter Szilágyi
9891f02d48
gitignore: get rid of some relics (#30623)
Clean out some ancient stuff from git ignore.
2024-10-18 12:02:32 +03:00
Péter Szilágyi
f32f8686cd
swarm: nuke this leftover (#30622)
Swarm moved out more than 5 years ago, time to let it go.
2024-10-18 11:34:46 +03:00
Rafael Sampaio
9d046eab42 improves metric names 2024-10-18 02:11:13 -03:00
rafaelss
c9fe01e500
Merge branch 'optimism-java:portal' into metrics_ethstats 2024-10-18 00:42:42 -04:00
fearlseefe
86c1b7d12e feat: lint error 2024-10-18 12:38:45 +08:00
fearlessfe
8baf51752b feat: rpc api change 2024-10-18 12:38:45 +08:00
Rafael Sampaio
c9ddfbf290 content validation metrics 2024-10-18 00:19:22 -03:00
Chen Kai
2be69a1ace
Merge branch 'ethereum:master' into portal 2024-10-18 11:03:14 +08:00
Rafael Sampaio
e85b17cf37 utp protocol metrics 2024-10-17 23:21:04 -03:00
Rafael Sampaio
efa2e9002a refactor: portal protocol metrics 2024-10-17 21:46:22 -03:00
Rafael Sampaio
d1b5606b00 metric storage_capacity 2024-10-17 18:41:12 -03:00
Péter Szilágyi
afea3bd49c
beacon/engine, core/txpool, eth/catalyst: add engine_getBlobsV1 API (#30537) 2024-10-17 19:27:35 +03:00
Rafael Sampaio
c5d13e4b74 metric radius rate 2024-10-17 12:02:47 -03:00
Rafael Sampaio
9b9d666dc4 portal_protocol.go metrics 2024-10-17 10:45:44 -03:00
lightclient
e26468f6f6
beacon/engine,eth/catalyst: hex marshal requests in engine api (#30603)
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-10-17 10:05:17 +02:00
lightclient
1da34a37ec
miner: send full request when resolving full payload (#30615)
Fixes an issue missed in #30576 where we send empty requests for a full
payload being resolved, causing hash mismatch later on when we get the
payload back via `NewPayload`.
2024-10-17 10:04:20 +02:00
Chen Kai
c5236fc9a9
Merge branch 'ethereum:master' into portal 2024-10-17 14:40:34 +08:00
Sina M
978ca5fc5e
eth/tracers: various fixes (#30540)
Breaking changes:

- The ChainConfig was exposed to tracers via VMContext passed in
`OnTxStart`. This is unnecessary specially looking through the lens of
live tracers as chain config remains the same throughout the lifetime of
the program. It was there so that native API-invoked tracers could
access it. So instead we moved it to the constructor of API tracers.

Non-breaking:

- Change the default config of the tracers to be `{}` instead of nil.
This way an extra nil check can be avoided.

Refactoring:

- Rename `supply` struct to `supplyTracer`.
- Un-export some hook definitions.
2024-10-17 06:51:47 +02:00