Commit Graph

15048 Commits

Author SHA1 Message Date
Bin 57308beecf
go.mod: update golang.org/x/crypto from v0.17.0 to v0.21.0 (#29228) 2024-03-14 00:25:42 +01:00
Martin HS f3d18d64bf
tests, appveyor: only execute one in four permutations on CI (#29220)
tests, appveyor: only execute one in four permutations when flag -short is used

Also enable -short flag on all appveyor builds (also ubuntu)
2024-03-13 18:12:23 +01:00
rjl493456442 c170fa277c
core: improve chain rewinding mechanism (#29196)
* core: improve chain rewinding mechanism

* core: address comment

* core: periodically print progress log

* core: address comments

* core: fix comment

* core: fix rewinding in path

* core: fix beyondRoot condition

* core: polish code

* core: polish code

* core: extend code comment

* core: stop rewinding if chain is gapped or genesis is reached

* core: fix broken tests
2024-03-13 13:39:30 +02:00
Justin Dhillon b80643b737
accounts/usbwallet, common/bitutil: fix broken links in docs (#29078)
fixes some links in documentation
2024-03-13 07:54:40 +01:00
Martin HS d5bacfa4de
crypto/kz4844: pass blobs by ref (#29050)
This change makes use of the following underlying changes to the kzg-libraries in order to avoid passing large things on the stack:

- c-kzg: https://github.com/ethereum/c-kzg-4844/pull/393 and
- go-kzg: https://github.com/crate-crypto/go-kzg-4844/pull/63
2024-03-13 07:51:46 +01:00
Sina M eff424cc30
eth/tracers: fix concurrency issue for JS-tracing a block (#29238)
This change fixes a concurrency-issue where JS-tracers were accessing the block-ctx GetHash function in a in parallel, which is not safe.
2024-03-13 07:40:02 +01:00
Felix Lange 758fce71fa
p2p: fix race in dialScheduler (#29235)
Co-authored-by: Stefan <stefan@starflinger.eu>
2024-03-12 19:23:24 +01:00
Marius van der Wijden 6c76b813df
miner: add additional log (#29193)
Adds a debug level log if the payload building failed for whatever reason
2024-03-12 14:29:35 +01:00
Aaron Chen 4bd55a064c
common/math: copy result in Exp (#29233)
common/math: does not change base parameter
2024-03-12 13:05:31 +01:00
Shiming Zhang 99bbbc0277
internal/build, rpc: add missing HTTP response body Close() calls (#29223)
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-03-12 12:12:37 +01:00
Bin 89cefe240f
cmd: use package filepath over path for file system operations (#29227)
Package filepath implements utility routines for manipulating filename paths in a way compatible with the target operating system-defined file paths.

Package path implements utility routines for manipulating slash-separated paths.

The path package should only be used for paths separated by forward slashes, such as the paths in URLs
2024-03-12 10:00:34 +01:00
San Ye 4e1116f9c5
crypto/bn256/cloudflare: fix noescape-directive (#29222) 2024-03-12 09:49:53 +01:00
guangwu ebf9e11af2
beacon/light/request: fix typos (#29216) 2024-03-11 11:17:16 +01:00
Sina Mahmoodi fa4ade8ecb
core: fix deprecation comment for GenesisAccount (#29218)
core: fix deprecation comment
2024-03-11 12:05:48 +02:00
Lee Bousfield 00c21128ef
core/txpool/blobpool: return ErrAlreadyKnown for duplicate txs (#29210)
Signed-off-by: Lee Bousfield <ljbousfield@gmail.com>
2024-03-11 12:05:17 +02:00
Péter Szilágyi b393ad8d29
cmd, core, metrics: always report expensive metrics (#29191)
* cmd, core, metrics: always report expensive metrics

* core, metrics: report block processing metrics as resetting timer

* metrics: update reporter tests
2024-03-11 10:06:57 +02:00
Kero 3dc549b3d7
p2p/simulations/adapters: fix error messages in TestTCPPipeBidirections (#29207) 2024-03-10 20:01:26 +01:00
Haotian e31709db65
console: fix the wrong error msg of datadir testcase (#29183) 2024-03-08 12:15:52 +01:00
colin d35c8f0c25
ethclient/gethclient: add blob transaction fields in toCallArg (#29198) 2024-03-08 12:13:46 +01:00
Sebastian Stammler c41105ce80
log: add Handler getter to Logger interface (#28793)
log: Add Handler getter to Logger interface
2024-03-08 00:01:31 +01:00
hyhnet cd490608e3
all: fix typos in comments (#29186) 2024-03-07 22:56:19 +01:00
cuinix 3bebabbd03
accounts: remove redundant string conversion (#29184) 2024-03-07 22:25:08 +01:00
Felföldi Zsolt aadcb88675
cmd/blsync, beacon/light: beacon chain light client (#28822)
Here we add a beacon chain light client for use by geth.

Geth can now be configured to run against a beacon chain API endpoint,
without pointing a CL to it. To set this up, use the `--beacon.api` flag. Information
provided by the beacon chain is verified, i.e. geth does not blindly trust the beacon
API endpoint in this mode. The root of trust are the beacon chain 'sync committees'.

The configured beacon API endpoint must provide light client data. At this time, only
Lodestar and Nimbus provide the necessary APIs.

There is also a standalone tool, cmd/blsync, which uses the beacon chain light client
to drive any EL implementation via its engine API.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2024-03-06 17:50:22 +01:00
Marius van der Wijden d8e0807da2
miner: refactor the miner, make the pending block on demand (#28623)
* miner: untangle miner

* miner: use common.hash instead of *types.header

* cmd/geth: deprecate --mine

* eth: get rid of most miner api

* console: get rid of coinbase in welcome message

* miner/stress: get rid of the miner stress test

* eth: get rid of miner.setEtherbase

* ethstats: remove miner and hashrate flags

* ethstats: remove miner and hashrate flags

* cmd: rename pendingBlockProducer to miner.pending.feeRecipient flag

* miner: use pendingFeeRecipient instead of etherbase

* miner: add mutex to protect the pending block

* miner: add mutex to protect the pending block

* eth: get rid of etherbase mentions

* miner: no need to lock the coinbase

* eth, miner: fix linter

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2024-03-06 14:45:03 +02:00
Delweng 6e379b6fc7
eth/tracers: prestate tracer add blob fee (#29168)
* eth/tracers: prestate balance add blob fee

Signed-off-by: jsvisa <delweng@gmail.com>

* eth/tracers: prestate test support blob tx

Signed-off-by: jsvisa <delweng@gmail.com>

* eth/tracers: add prestate blob tx test

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2024-03-06 14:36:12 +02:00
Undefinedor a90fe84971
accounts: remove deprecated function NewPlaintextKeyStore (#29171) 2024-03-06 11:55:44 +01:00
Martin HS e73f55365c
accounts/usbwallet: update hid library (#29176) 2024-03-06 12:31:50 +02:00
Andrei Kostakov a000acb611
rpc: add more test cases for arg types (#29006) 2024-03-06 10:53:12 +01:00
Martin HS 899bb88a4b
accounts/usbwallet: revert #28945 (#29175) 2024-03-06 11:32:17 +02:00
Tom 588c5480fd
internal/ethapi: delete needless error check (#29127) 2024-03-06 13:23:35 +08:00
Devon Bear 66e1a6ef49
go.mod: bump pebble db to official release (#29038)
bump pebble
2024-03-05 16:15:02 +02:00
Péter Szilágyi f4d53133f6
consensus, cmd, core, eth: remove support for non-merge mode of operation (#29169)
* eth: drop support for forward sync triggers and head block packets

* consensus, eth: enforce always merged network

* eth: fix tx looper startup and shutdown

* cmd, core: fix some tests

* core: remove notion of future blocks

* core, eth: drop unused methods and types
2024-03-05 16:13:28 +02:00
Marius van der Wijden 9a0fa8093c
node: remove test which doesn't do a lot (#29159)
* node: fix test if directory already exists

* node: remove test
2024-03-05 14:52:44 +01:00
zhiqiangxu 9e129efd7b
core: remove useless assignments (#29065) 2024-03-05 14:48:27 +01:00
cui a970295956
rlp: using unsafe.Slice instead of SliceHeader (#29067)
Co-authored-by: Felix Lange <fjl@twurst.com>
2024-03-05 14:45:17 +01:00
Undefinedor a6d6e8ac41
rpc: remove deprecated method "Notifier.Closed" (#29162) 2024-03-05 14:44:23 +01:00
Delweng dfa6c5e9c8
internal/jsre: format blob fields from hexdecimal to int (#29166)
* internal/jsre: format receipt.{blobGasPrice,blobGasUsed} to int

Signed-off-by: jsvisa <delweng@gmail.com>

* internal/jsre: format tx.maxFeePerBlobGas to int

Signed-off-by: jsvisa <delweng@gmail.com>

* internal/jsre: format blob* in block

Signed-off-by: jsvisa <delweng@gmail.com>

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2024-03-05 15:37:26 +02:00
Martin HS 96bf23f1ea
accounts/usbwallet: use updated hid (only) library (#28945)
* accounts/usbwallet: use updated hid (only) library

* deps: update karalabe/hid
2024-03-05 14:32:47 +01:00
rjl493456442 7b81cf6362
core/state, trie/triedb/pathdb: remove storage incomplete flag (#28940)
As SELF-DESTRUCT opcode is disabled in the cancun fork(unless the
account is created within the same transaction, nothing to delete
in this case). The account will only be deleted in the following
cases:

- The account is created within the same transaction. In this case
the original storage was empty.

- The account is empty(zero nonce, zero balance, zero code) and
is touched within the transaction. Fortunately this kind of accounts
are not-existent on ethereum-mainnet.

All in all, after cancun, we are pretty sure there is no large contract
deletion and we don't need this mechanism for oom protection.
2024-03-05 14:31:55 +01:00
buddho e199319fd6
rlp: remove a moot todo (#29154) 2024-03-05 10:47:56 +01:00
zhiqiangxu d89d7ebdec
core: initialize `gasRemaining` with `=` instead of `+=` (#29149)
initialize gasRemaining with = instead of +=
2024-03-05 09:47:58 +01:00
Vie 9b3ceb2137
core/types: reuse signtx (#29152)
* core/types: reuse signtx

* core/types: inline signtx
2024-03-05 09:33:52 +02:00
Domino Valdano 5d5b384efd
.mailmap: remove invalid email address (#29163) 2024-03-04 21:58:25 +01:00
Andrei Silviu Dragnea 19607d1a10
eth/tracers: Fix prestateTracer pre nonce on contract creation (#29099)
The prestateTracer was reporting an inaccurate nonce for the contract being created in
post EIP-158 transactions. Correct nonce is 0, due to the issue nonce was being reported as 1.
2024-03-04 20:21:43 +01:00
rjl493456442 ca473b81cb
core: use finalized block as the chain freeze indicator (#28683)
* core: use finalized block as the chain freeze indicator

* core/rawdb: use max(finality, head-90k) as chain freezing threshold

* core/rawdb: fix tests

* core/rawdb: fix lint

* core/rawdb: address comments from peter

* core/rawdb: fix typo
2024-03-04 16:25:53 +02:00
Felix Lange a97d622588
cmd/devp2p: fix commandHasFlag (#29091)
It got broken in some update of the cli library, and thus bootnodes weren't 
being configured automatically for some of the discovery commands.
2024-03-04 14:07:41 +01:00
psogv0308 35cebc1687
triedb/pathdb: changed the test code to check for verifying state (#29150)
Co-authored-by: this-is-iron <iron@superblock.co>
2024-03-04 11:03:53 +01:00
buddho 679a27a2b3
all: use EmptyUncleHash, EmptyCodeHash instead of raw value (#29134) 2024-03-04 10:31:18 +01:00
cui 5a1e8a6547
core: delete unused ErrMaxInitCodeSizeExceeded (#29062) 2024-03-04 10:30:15 +01:00
yzb b408b3e5fe
accounts/abi: delete duplicate error check (#29136) 2024-03-04 10:24:24 +01:00