Commit graph

15868 commits

Author SHA1 Message Date
Rafael Sampaio
bd15e1be1e move loglevel to debug (level 4) and remove duplicate log 2024-10-12 15:07:15 +08:00
Rafael Sampaio
e4813a1406 message of new node added to bucket [implements #191] 2024-10-12 15:07:15 +08:00
Chen Kai
8955d0b309 Revert "fix: utp send call to maintain nonce"
This reverts commit c6aa362ebb.
2024-10-11 23:39:11 +08:00
Chen Kai
3297426e1c
Merge branch 'ethereum:master' into portal 2024-10-11 22:16:35 +08:00
thinkAfCod
c6aa362ebb fix: utp send call to maintain nonce 2024-10-11 17:34:55 +08:00
rafaelss
c1ed669bb6
Merge pull request #183 from fearlessfe/hot-fix-key
fix: write key error
2024-10-10 14:37:56 -04:00
rafaelss
c5bba8324d
create directory before create file 2024-10-10 11:39:17 -03:00
Karol Chojnowski
16bf471151
core/tracing: add GetTransientState method to StateDB interface (#30531)
Allows live custom tracers to access contract transient storage through the StateDB interface.
2024-10-10 13:03:03 +02:00
Shude Li
5b393ac85a
eth/protocols/eth: remove Requests in block body (#30562)
Block no longer has Requests. This PR just removes some code that wasn't removed in #30425.
2024-10-10 10:47:40 +02:00
fearlseefe
7c23e82cd0 fix: lint err 2024-10-10 15:10:18 +08:00
fearlessfe
e1bfcb45d9 feat: offer json rpc change 2024-10-10 15:10:18 +08:00
Martin HS
58cf152e98
eth/catalyst, core/txpool/blobpool: make tests output less logs (#30563)
A couple of tests set the debug level to `TRACE` on stdout,
and all subsequent tests in the same package are also affected
by that, resulting in outputs of tens of megabytes. 

This PR removes such calls from two packages where it was prevalent.
This makes getting a summary of failing tests simpler, and possibly
reduces some strain from the CI pipeline.
2024-10-10 07:54:07 +02:00
Chen Kai
28d395dccc fix:fix not send challenge more than once
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-10-10 09:53:25 +08:00
easyfold
7942a6b5ad
eth/tracers: do system contract processing prior to parallel-tracing (#30520)
This fixes `debug_traceBlock` methods for JS tracers in that it correctly
applies the beacon block root processing to the state.
2024-10-09 14:45:14 +02:00
Chen Kai
a2be28094b
Merge branch 'ethereum:master' into portal 2024-10-09 18:32:58 +08:00
Chen Kai
076e33c53f fix:make only sent whoareyou challenges first time
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-10-09 18:32:47 +08:00
Felix Lange
2936b41514
all: implement flat deposit requests encoding (#30425)
This implements recent changes to EIP-7685, EIP-6110, and
execution-apis.

---------

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: Shude Li <islishude@gmail.com>
2024-10-09 12:24:58 +02:00
rafaelss
4605c46a53
Merge pull request #185 from r4f4ss/log_trace
Replace log trace strings to easily readable
2024-10-08 23:52:08 -04:00
Chen Kai
1446e66d30 Merge branch 'gethmaster' into selfportal 2024-10-09 10:36:11 +08:00
Rafael Sampaio
b4bbdced85 added missing '/' to strings 2024-10-08 19:29:30 -03:00
Rafael Sampaio
07c5d2fb83 replace trace log strings [implement #184] 2024-10-08 19:13:48 -03:00
asamuj
f8ac95e56f
log: remove unused parameter (#30432) 2024-10-08 13:30:07 +02:00
fearlessfe
fb7860e43f fix: write key error 2024-10-05 12:24:51 +08:00
Rafael Sampaio
d831ad6c25 reuse of geth flags and related code 2024-10-05 11:50:15 +08:00
Rafael Sampaio
8054d16b26 implementation of metrics influx, influxV2 and local web server 2024-10-05 11:50:15 +08:00
rafaelss
8e8f85a32d
Merge pull request #181 from r4f4ss/stun
Add stun server for ip discovery and flag stun
2024-10-04 23:25:39 -04:00
Rafael Sampaio
4549996a9b add test for function doPortMapping 2024-10-04 18:50:39 -03:00
Rafael Sampaio
120be2f1ee add portMapping to localNode creation 2024-10-04 16:43:56 -03:00
Marius Kjærstad
65e5ca7d81
build: upgrade -dlgo version to Go 1.23.2 (#30544)
New release: https://groups.google.com/g/golang-announce/c/NKEc8VT7Fz0
2024-10-04 13:53:06 +03:00
Rafael Sampaio
52c2bfb5b3 add stun server for ip discovery and flag stun 2024-10-03 23:44:13 -03:00
zhiqiangxu
84a80216c6
beacon/light: optimize lock usage in HeadTracker (#30485)
minimizes the time when the lock is held
2024-10-02 16:00:36 +02:00
Martin HS
56c4f2bfd4
core/vm, cmd/evm: implement eof validation (#30418)
The bulk of this PR is authored by @lightclient , in the original
EOF-work. More recently, the code has been picked up and reworked for the new EOF
specification, by @MariusVanDerWijden , in https://github.com/ethereum/go-ethereum/pull/29518, and also @shemnon has contributed with fixes.

This PR is an attempt to start eating the elephant one small bite at a
time, by selecting only the eof-validation as a standalone piece which
can be merged without interfering too much in the core stuff.

In this PR: 

- [x] Validation of eof containers, lifted from #29518, along with
test-vectors from consensus-tests and fuzzing, to ensure that the move
did not lose any functionality.
- [x] Definition of eof opcodes, which is a prerequisite for validation
- [x] Addition of `undefined` to a jumptable entry item. I'm not
super-happy with this, but for the moment it seems the least invasive
way to do it. A better way might be to go back and allowing nil-items or
nil execute-functions to denote "undefined".
- [x] benchmarks of eof validation speed 


---------

Co-authored-by: lightclient <lightclient@protonmail.com>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Danno Ferrin <danno.ferrin@shemnon.com>
2024-10-02 15:05:50 +02:00
Sina M
6416813cbe
internal/web3ext: rm unused modules (#30532)
Remove console extensions for already deleted API namespaces (les, vflux and ethash).
2024-10-01 18:27:25 +02:00
rjl493456442
eff0bed91b
core/rawdb: freezer index repair (#29792)
This pull request removes the `fsync` of index files in freezer.ModifyAncients function for 
performance gain.

Originally, fsync is added after each freezer write operation to ensure
the written data is truly transferred into disk. Unfortunately, it turns 
out `fsync` can be relatively slow, especially on
macOS (see https://github.com/ethereum/go-ethereum/issues/28754 for more
information). 

In this pull request, fsync for index file is removed as it turns out
index file can be recovered even after a unclean shutdown. But fsync for data file is still kept, as
we have no meaningful way to validate the data correctness after unclean shutdown.

---

**But why do we need the `fsync` in the first place?** 

As it's necessary for freezer to survive/recover after the machine crash
(e.g. power failure).
In linux, whenever the file write is performed, the file metadata update
and data update are
not necessarily performed at the same time. Typically, the metadata will
be flushed/journalled
ahead of the file data. Therefore, we make the pessimistic assumption
that the file is first
extended with invalid "garbage" data (normally zero bytes) and that
afterwards the correct
data replaces the garbage. 

We have observed that the index file of the freezer often contain
garbage entry with zero value
(filenumber = 0, offset = 0) after a machine power failure. It proves
that the index file is extended
without the data being flushed. And this corruption can destroy the
whole freezer data eventually.

Performing fsync after each write operation can reduce the time window
for data to be transferred
to the disk and ensure the correctness of the data in the disk to the
greatest extent.

---

**How can we maintain this guarantee without relying on fsync?**

Because the items in the index file are strictly in order, we can
leverage this characteristic to
detect the corruption and truncate them when freezer is opened.
Specifically these validation
rules are performed for each index file:

For two consecutive index items:

- If their file numbers are the same, then the offset of the latter one
MUST not be less than that of the former.
- If the file number of the latter one is equal to that of the former
plus one, then the offset of the latter one MUST not be 0.
- If their file numbers are not equal, and the latter's file number is
not equal to the former plus 1, the latter one is valid

And also, for the first non-head item, it must refer to the earliest
data file, or the next file if the
earliest file is not sufficient to place the first item(very special
case, only theoretical possible
in tests)

With these validation rules, we can detect the invalid item in index
file with greatest possibility.

--- 

But unfortunately, these scenarios are not covered and could still lead
to a freezer corruption if it occurs:

**All items in index file are in zero value**

It's impossible to distinguish if they are truly zero (e.g. all the data
entries maintained in freezer
are zero size) or just the garbage left by OS. In this case, these index
items will be kept by truncating
the entire data file, namely the freezer is corrupted.

However, we can consider that the probability of this situation
occurring is quite low, and even
if it occurs, the freezer can be considered to be close to an empty
state. Rerun the state sync
should be acceptable.

**Index file is integral while relative data file is corrupted**

It might be possible the data file is corrupted whose file size is
extended correctly with garbage
filled (e.g. zero bytes). In this case, it's impossible to detect the
corruption by index validation.

We can either choose to `fsync` the data file, or blindly believe that
if index file is integral then
the data file could be integral with very high chance. In this pull
request, the first option is taken.
2024-10-01 18:16:16 +02:00
Martin HS
90970ed3cd
params: begin v1.14.12 release cycle (#30536)
params: begin v1.14.12 release cycle
2024-10-01 15:23:35 +02:00
Martin Holst Swende
096c4d266e
params: begin v1.14.12 release cycle 2024-10-01 15:21:30 +02:00
Martin Holst Swende
f14f13bac7
params: go-ethereum v1.14.11 stable 2024-10-01 15:14:30 +02:00
rafaelss
ee38628954
Merge pull request #178 from r4f4ss/save_private_key
Save/load private key to file "clientKey"
2024-10-01 09:03:54 -03:00
Sina M
40fd887df6
internal/ethapi: remove td field from block (#30386)
implement https://github.com/ethereum/execution-apis/pull/570
2024-10-01 11:36:56 +02:00
Ng Wei Han
db6ae7fa12
cmd/geth: remove deprecated lightchaindata db (#30527)
This PR removes the dependencies on `lightchaindata` db as the light
protocol has been deprecated and removed from the codebase.
2024-09-30 19:32:39 +03:00
Rafael Sampaio
fffa3c75e1 removal of execution permission of clientKey file 2024-09-30 11:43:42 -03:00
Martin HS
e67d5f8c44
eth/catalyst: use setcanonical instead of sethead in simulated fork (#30465)
Fixes https://github.com/ethereum/go-ethereum/issues/30448
2024-09-30 14:46:39 +02:00
Martin HS
cfe25c7a3b
build: use buildx to build multi-platform docker images (#30530) 2024-09-30 15:39:53 +03:00
minh-bq
0a21cb4d21
core/txpool/blobpool: use types.Sender instead of signer.Sender (#30473)
Use types.Sender(signer, tx) to utilize the transaction's sender cache
and avoid repeated address recover.
2024-09-30 12:06:10 +03:00
Felix Lange
6b61b54dc7
p2p/discover: add config option for disabling FINDNODE liveness check (#30512)
This is for fixing Prysm integration tests.
2024-09-30 10:56:14 +02:00
Chen Kai
80d0a8bc17 Merge branch 'gethmaster' into selfportal 2024-09-30 15:01:29 +08:00
Rafael Sampaio
4256da483a removal of log of private key (security) 2024-09-29 14:19:05 -03:00
Rafael Sampaio
c587eaa7ea fixes config tests and add client key test 2024-09-29 12:34:04 -03:00
Rafael Sampaio
bd268e0e73 write/load private key to file clientKey 2024-09-29 12:32:40 -03:00
Péter Szilágyi
283be23817 params: begin v1.14.11 release cycle 2024-09-27 14:13:45 +03:00