Commit graph

2601 commits

Author SHA1 Message Date
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
fearlessfe
29ec4025dc feat: state storage 2024-09-21 00:17:23 +08:00
Rafael Sampaio
2755aeec54 Reorder of Close() calls in closePortalRpcServer 2024-09-18 19:22:21 -03:00
Rafael Sampaio
145865d3c3 Improves function name 2024-09-18 18:06:56 -03:00
Rafael Sampaio
d6a2dd3ec6 Transformation of closePortalRpcServer a method of Client to form a centralized management object 2024-09-18 18:04:30 -03:00
Rafael Sampaio
2e8d67992a Refactor of main to allow graceful shutdown of database, server, UDPv5 and networks 2024-09-17 20:09:41 -03:00
fearlessfe
df86d197c1 feat: change state network dep 2024-09-17 11:06:43 +08:00
fearlseefe
f00c767e54 feat: add validate AccountTrieNode 2024-09-17 11:06:43 +08:00
Rafael Sampaio
26b40a9534 minimal eth namespace (RPC-API) with endpoints eth_chainId and eth_gtBlockByHash 2024-09-17 11:06:28 +08:00
fearlessfe
bf40a752b1 feat: add state api 2024-09-12 18:15:32 +08:00
fearlessfe
d4d644c13c feat: refactor protocolId 2024-08-28 23:46:52 +08:00
Chen Kai
3fe80adec2
Merge branch 'ethereum:master' into portal 2024-08-17 14:07:49 +08:00
Felix Lange
c35684709c
eth/ethconfig: remove LES server config (#30298) 2024-08-15 11:42:39 +02:00
lightclient
33a13b6f21
p2p/simulations: remove packages (#30250)
Looking at the history of these packages over the past several years, there
haven't been any meaningful contributions or usages:
https://github.com/ethereum/go-ethereum/commits/master/p2p/simulations?before=de6d5976794a9ed3b626d4eba57bf7f0806fb970+35

Almost all of the commits are part of larger refactors or low-hanging-fruit contributions.
Seems like it's not providing much value and taking up team + contributor time.
2024-08-12 10:36:48 +02:00
Martin HS
83e70aa3d0
cmd/evm: fix evm basefee (#30281)
fixes #30279 -- previously we did not use the basefee from the genesis, and instead the defaults were used from `runtime.go/setDefaults`-function
2024-08-08 18:58:08 +02:00
lightclient
142c94d628
cmd/evm: don't overwrite sender account (#30259)
Fixes #30254 

It seems like the removed CreateAccount call is very old and not needed anymore.
After removing it, setting a sender that does not exist in the state doesn't seem to cause
an issue.
2024-08-02 17:49:01 +02:00
Felix Lange
e4675771ed
internal/debug: remove memsize (#30253)
Removing because memsize will very likely be broken by Go 1.23. See
https://github.com/fjl/memsize/issues/4
2024-08-02 06:44:03 +02:00
Chen Kai
7b8ce855f7
Merge branch 'ethereum:master' into portal 2024-07-25 13:23:02 +08:00
yukionfire
4dfc75deef
beacon/types, cmd/devp2p, p2p/enr: clean up uses of fmt.Errorf (#30182) 2024-07-25 00:32:58 +02:00
Chen Kai
5bf4c2b2a9
Merge branch 'ethereum:master' into portal 2024-07-24 22:22:46 +08:00
minh-bq
35b4183caa
cmd/utils: allow configurating blob pool from flags (#30203)
Currently, we have 3 flags to configure blob pool. However, we don't
read these flags and set the blob pool configuration in eth config
accordingly. This commit adds a function to check if these flags are
provided and set blob pool configuration based on them.
2024-07-23 14:44:01 +02:00
Chen Kai
3816cc97e3
Merge branch 'ethereum:master' into portal 2024-07-17 21:45:57 +08:00
rjl493456442
f59d013e40
core/rawdb, triedb, cmd: create an isolated disk namespace for verkle (#30105)
* core, triedb/pathdb, cmd: define verkle state ancient store

* core/rawdb, triedb: add verkle namespace in pathdb
2024-07-16 16:17:58 +03:00
Chen Kai
839a7877a8
Merge branch 'ethereum:master' into portal 2024-07-16 18:05:47 +08:00
zhiqiangxu
71210b0630
all: simplify tests using t.TempDir() (#30150) 2024-07-15 15:26:58 +02:00
Jeremy Schlatter
169aa91449
cmd/utils: fix typo in flag description (#30127) 2024-07-15 11:36:21 +02:00
Chen Kai
9624e6f4c0
Merge branch 'ethereum:master' into portal 2024-06-29 20:20:18 +08:00
gitglorythegreat
06f1d077d3
all: replace division with right shift if possible (#29911) 2024-06-28 18:08:31 +02:00
maskpp
4939c25341
cmd/evm/internal/t8ntool: log writeTraceResult error message (#30038) 2024-06-28 18:05:57 +02:00
jwasinger
ed8fd0ac09
all: stateless witness builder and (self-)cross validator (#29719)
* all: add stateless verifications

* all: simplify witness and integrate it into live geth

---------

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2024-06-25 14:48:08 +03:00
lightclient
d8ea7ac2b0
cmd/blsync: use debug.Setup for logging configuration (#30065) 2024-06-25 11:14:12 +02:00
Chen Kai
98047b22a3
Merge branch 'ethereum:master' into portal 2024-06-19 19:22:49 +08:00
Ha DANG
67a862db9d
cmd/geth, ethdb/pebble: improve database statistic (#29948)
* cmd/geth, ethdb/pebble: polish method naming and code comment

* implement db stat for pebble

* cmd, core, ethdb, internal, trie: remove db property selector

* cmd, core, ethdb: fix function description

---------

Co-authored-by: prpeh <prpeh@proton.me>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2024-06-19 14:47:17 +08:00
Chen Kai
f8c05e17eb feat:add default bootnodes
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-06-18 19:51:30 +08:00
Chen Kai
6088495691 fix:merge geth p2p change
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-06-17 20:28:49 +08:00
Chen Kai
4641a25656 fix:change nat default any
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-06-13 15:45:35 +08:00
Chen Kai
6795c90755 feat:rm get internal ip
Signed-off-by: Chen Kai <281165273grape@gmail.com>
2024-06-13 13:37:40 +08:00
fearlessfe
42e6f336a4 feat: change document 2024-06-12 11:02:05 +08:00
bugmaker9371
caa066dcb0
cmd/devp2p: fix log output (#29972) 2024-06-11 16:27:35 +03:00
jwasinger
85587d5ef2
cmd, core: prefetch reads too from tries if requested (#29807)
* cmd/utils, consensus/beacon, core/state: when configured via stub  flag: prefetch all reads from account/storage tries, terminate prefetcher synchronously.

* cmd, core/state: fix nil panic, fix error handling, prefetch nosnap too

* core/state: expand prefetcher metrics for reads and writes separately

* cmd/utils, eth: fix noop collect witness flag

---------

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2024-06-11 11:10:07 +03:00
Ha DANG
1098d148a5
cmd/geth: remove unused param (#29952) 2024-06-08 13:04:16 +02:00
kukuru909
deaf10982c
cmd/clef, cmd/evm: fix markdown issues in README (#29954) 2024-06-08 13:00:53 +02:00
Gealber Morales
4405f18519
cmd/evm/internal/t8ntool: remove unused parameter (#29930) 2024-06-07 20:04:18 +08:00
Felix Lange
bc6569462d
p2p: use netip.Addr where possible (#29891)
enode.Node was recently changed to store a cache of endpoint information. The IP address in the cache is a netip.Addr. I chose that type over net.IP because it is just better. netip.Addr is meant to be used as a value type. Copying it does not allocate, it can be compared with ==, and can be used as a map key.

This PR changes most uses of Node.IP() into Node.IPAddr(), which returns the cached value directly without allocating.
While there are still some public APIs left where net.IP is used, I have converted all code used internally by p2p/discover to the new types. So this does change some public Go API, but hopefully not APIs any external code actually uses.

There weren't supposed to be any semantic differences resulting from this refactoring, however it does introduce one: In package p2p/netutil we treated the 0.0.0.0/8 network (addresses 0.x.y.z) as LAN, but netip.Addr.IsPrivate() doesn't. The treatment of this particular IP address range is controversial, with some software supporting it and others not. IANA lists it as special-purpose and invalid as a destination for a long time, so I don't know why I put it into the LAN list. It has now been marked as special in p2p/netutil as well.
2024-06-05 19:31:04 +02:00
fearlessfe
1ed713ad1e feat: nat 2024-06-05 12:53:19 +08:00
HAOYUatHZ
50405e29b7
cmd/evm/internal/t8ntool: fix a typo (#29887)
* i8ntool: fix a typo

* cmd/evm/internal/t8ntool: fix typo typo

---------

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2024-06-03 15:31:23 +03:00
hattizai
2f06c1e854
cmd/devp2p: fix node.TCP -> node.UDP (#29879) 2024-05-29 15:55:51 +02:00
Felix Lange
94a8b296e4
p2p/discover: refactor node and endpoint representation (#29844)
Here we clean up internal uses of type discover.node, converting most code to use
enode.Node instead. The discover.node type used to be the canonical representation of
network hosts before ENR was introduced. Most code worked with *node to avoid conversions
when interacting with Table methods. Since *node also contains internal state of Table and
is a mutable type, using *node outside of Table code is prone to data races. It's also
cleaner not having to wrap/unwrap *enode.Node all the time.

discover.node has been renamed to tableNode to clarify its purpose.

While here, we also change most uses of net.UDPAddr into netip.AddrPort. While this is
technically a separate refactoring from the *node -> *enode.Node change, it is more
convenient because *enode.Node handles IP addresses as netip.Addr. The switch to package
netip in discovery would've happened very soon anyway.

The change to netip.AddrPort stops at certain interface points. For example, since package
p2p/netutil has not been converted to use netip.Addr yet, we still have to convert to
net.IP/net.UDPAddr in a few places.
2024-05-29 15:02:26 +02:00