Commit graph

15897 commits

Author SHA1 Message Date
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
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
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
rafaelss
b8a8f39f2b
Merge pull request #198 from r4f4ss/log_format
Add flag to format logs
2024-10-16 14:58:26 -04:00
Marius van der Wijden
18a591811f
core: reduce peak memory usage during reorg (#30600)
~~Opening this as a draft to have a discussion.~~ Pressed the wrong
button
I had [a previous PR
](https://github.com/ethereum/go-ethereum/pull/24616)a long time ago
which reduced the peak memory used during reorgs by not accumulating all
transactions and logs.
This PR reduces the peak memory further by not storing the blocks in
memory.
However this means we need to pull the blocks back up from storage
multiple times during the reorg.
I collected the following numbers on peak memory usage: 

// Master: BenchmarkReorg-8 10000 899591 ns/op 820154 B/op 1440
allocs/op 1549443072 bytes of heap used
// WithoutOldChain: BenchmarkReorg-8 10000 1147281 ns/op 943163 B/op
1564 allocs/op 1163870208 bytes of heap used
// WithoutNewChain: BenchmarkReorg-8 10000 1018922 ns/op 943580 B/op
1564 allocs/op 1171890176 bytes of heap used

Each block contains a transaction with ~50k bytes and we're doing a 10k
block reorg, so the chain should be ~500MB in size

---------

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2024-10-16 19:46:40 +03:00
fearlseefe
e5b5bede46 docs: update readme 2024-10-16 22:41:08 +08:00
Péter Szilágyi
368e16f39d
core, eth, ethstats: simplify chain head events (#30601) 2024-10-16 10:32:58 +03:00
Rafael Sampaio
33843613e0 code cleanup and improved variable names 2024-10-15 17:41:29 -03:00
Rafael Sampaio
eca301a9b1 move logformat flag to portal network namespace 2024-10-15 16:29:45 -03:00
Rafael Sampaio
1865b12357 add flag to format logs 2024-10-15 16:21:05 -03:00
rjl493456442
15bf90ebc5
core, ethdb/pebble: run pebble in non-sync mode (#30573)
Implements https://github.com/ethereum/go-ethereum/issues/29819
2024-10-15 18:10:03 +03:00
Péter Szilágyi
a44905763e
ethdb/pebble: switch to increasing level sizes (#30602) 2024-10-15 17:00:14 +03:00
Roman Krasiuk
4c4219e405
beacon/engine: omit null witness field from payload envelope (#30597)
## Description

Omit null `witness` field from payload envelope.

## Motivation

Currently, JSON encoded payload types always include `"witness": null`,
which, I believe, is not intentional.
2024-10-15 11:51:20 +03:00
Alex Gartner
30ce17386b
crypto: use decred secp256k1 directly (#30595)
Use `github.com/decred/dcrd/dcrec/secp256k1/v4` directly rather than
`github.com/btcsuite/btcd/btcec/v2` which is just a wrapper around the
underlying decred library. Inspired by
https://github.com/cosmos/cosmos-sdk/pull/15018

`github.com/btcsuite/btcd/btcec/v2` has a very annoying breaking change
when upgrading from `v2.3.3` to `v2.3.4`. The easiest way to workaround
this is to just remove the wrapper.

Would be very nice if you could backport this to the release branches.

References:
- https://github.com/btcsuite/btcd/issues/2221
- https://github.com/cometbft/cometbft/pull/4294
- https://github.com/cometbft/cometbft/pull/3728
- https://github.com/zeta-chain/node/pull/2934
2024-10-15 11:49:08 +03:00
jwasinger
4b9c7821b9
internal/ethapi: refactor TxArgs.setCancunFeeDefaults (#30541)
calculating a reasonable tx blob fee cap (`max_blob_fee_per_gas *
total_blob_gas`) only depends on the excess blob gas of the parent
header. The parent header is assumed to be correct, so the method should
not be able to fail and return an error.
2024-10-15 10:02:02 +02:00
Felix Lange
add5709cb5
beacon/engine: strip type byte in requests (#30576)
This change brings geth into compliance with the current engine API
specification for the Prague fork. I have moved the assignment of
ExecutionPayloadEnvelope.Requests into BlockToExecutableData to ensure
there is a single place where the type is removed.

While doing so, I noticed that handling of requests in the miner was not
quite correct for the empty payload. It would return `nil` requests for
the empty payload even for blocks after the Prague fork. To fix this, I
have added the emptyRequests field in miner.Payload.
2024-10-14 21:43:35 +02:00
Martin HS
5adc314817
build: update to golangci-lint 1.61.0 (#30587)
Changelog: https://golangci-lint.run/product/changelog/#1610 

Removes `exportloopref` (no longer needed), replaces it with
`copyloopvar` which is basically the opposite.

Also adds: 
- `durationcheck`
- `gocheckcompilerdirectives`
- `reassign`
- `mirror`
- `tenv`

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2024-10-14 19:25:22 +02:00
Martin HS
f4dc7530b1
trie: concurrent commit (#30545)
This change makes the trie commit operation concurrent, if the number of changes exceed 100. 

Co-authored-by: stevemilk <wangpeculiar@gmail.com>
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2024-10-14 13:32:15 +02:00
Chen Kai
60951973dc
Merge branch 'ethereum:master' into portal 2024-10-14 13:58:54 +08:00
Felix Lange
16f64098b9
core: enable EIP-2935 in chain maker (#30575) 2024-10-13 18:51:51 +02:00
lightclient
2246d66135
cmd/evm: fixup issues with requests in t8n (#30584)
This fixes a few issues missed in #29052:

* `requests` must be hex encoded, so added a helper to marshal.
* The statedb was committed too early and so the result of the system
calls was lost.
* For devnet-4 we need to pull off the type byte prefix from the request
data.
2024-10-13 18:47:51 +02:00
Chen Kai
dbd0f6f831
Merge branch 'ethereum:master' into portal 2024-10-12 20:12:59 +08:00
Hteev Oli
fad7e74a1b
build: add support for ubuntu 24.10 (#30580) 2024-10-12 12:25:58 +03:00
Chen Kai
db300a3a56
Merge branch 'ethereum:master' into portal 2024-10-12 15:07:26 +08:00
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
Felix Lange
3a5313f3f3
all: implement EIP-7002 & EIP-7251 (#30571)
This is a redo of #29052 based on newer specs. Here we implement EIPs
scheduled for the Prague fork:

- EIP-7002: Execution layer triggerable withdrawals
- EIP-7251: Increase the MAX_EFFECTIVE_BALANCE

Co-authored-by: lightclient <lightclient@protonmail.com>
2024-10-11 21:36:13 +02: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