Commit Graph

14126 Commits

Author SHA1 Message Date
Delweng
5e4d726e2a
params: remove EIP150Hash from chainconfig (#27087)
The EIP150Hash was an idea where, after the fork, we hardcoded the forked hash as an extra defensive mechanism. It wasn't really used, since forks weren't contentious and for all the various testnets and private networks it's been a hassle to have around. 

This change removes that config field. 

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-04-18 03:49:09 -04:00
Anusha
cb66eba85a
core: fix comment to reflect function name (#27070) 2023-04-17 11:02:31 -04:00
Taeguk Kwon
bedf2856d1
signer/core: rename testdata files (#27063)
Sets a meaningful name on test-files
2023-04-17 10:36:47 -04:00
noel
8fe807c8f2
cmd/devp2p: fix erroneous log output in crawler (#27089)
cmd/devp2p: fix log of ignored recent nodes counter
2023-04-17 10:29:27 -04:00
Parithosh Jayanthi
5aa5295cf9
params: new sepolia bootnodes (#27099)
New sepolia bootnodes managed by EF devops
2023-04-17 04:15:25 -04:00
Péter Szilágyi
4a9fa31450
Merge pull request #27051 from sandakersmann/master
build: upgrade -dlgo version to Go 1.20.3
2023-04-08 17:13:55 +03:00
rjl493456442
b946b7a13b
core, miner: drop transactions from the same sender when error occurs (#27038)
This PR unifies the error handling in miner. 

Whenever an error occur while applying a transaction, the transaction should be regarded as invalid and all following transactions from the same sender not executable because of the nonce restriction. The only exception is the `nonceTooLow` error which is handled separately.
2023-04-05 07:09:25 -04:00
Marius van der Wijden
230df98e4d
core/txpool: disallow future churn by remote txs (#26907)
Prior to this change, it was possible that transactions are erroneously deemed as 'future' although they are in fact 'pending', causing them to be dropped due to 'future' not being allowed to replace 'pending'. 

This change fixes that, by doing a more in-depth inspection of the queue.
2023-04-05 04:59:32 -04:00
Marius Kjærstad
9d37102134
build: upgrade -dlgo version to Go 1.20.3 2023-04-04 22:24:30 +02:00
s7v7nislands
2adce0b066
eth/tracers: use atomic type (#27031)
Use the new atomic types in package eth/tracers

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2023-04-04 12:34:52 -04:00
Exca-DK
b4dcd1a391
metrics: make gauge_float64 and counter_float64 lock free (#27025)
Makes the float-gauges lock-free

name                      old time/op  new time/op  delta
CounterFloat64Parallel-8  1.45µs ±10%  0.85µs ± 6%  -41.65%  (p=0.008 n=5+5)

---------

Co-authored-by: Exca-DK <dev@DESKTOP-RI45P4J.localdomain>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-04-04 09:53:44 -04:00
Martin Holst Swende
ab1a404b01
all: remove debug-field from vm config (#27048)
This PR removes the Debug field from vmconfig, making it so that if a tracer is set, debug=true is implied.

---------

Co-authored-by: 0xTylerHolmes <tyler@ethereum.org>
Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
2023-04-04 09:50:13 -04:00
Delweng
0b76eb3708
eth/tracers: report correct gasLimit in call tracers (#27029)
This includes a semantic change to the `callTracer` as well as `flatCallTracer`.
The value of field `gas` in the **first** call frame will change as follows:

- It previously contained gas available after initial deductions (i.e. tx costs)
- It will now contain the full tx gasLimit value

Signed-off-by: jsvisa <delweng@gmail.com>
2023-04-04 12:34:23 +02:00
Péter Szilágyi
d2cf49327f
consensus/misc, params: add EIP-4844 blobfee conversions (#27041)
* consensus/misc, params: add EIP-4844 blobfee conversions

* consensus/misc: pull in fakeExponential test cases

* consensus/misc: reuse bigints

* consensus/misc: nit renames, additional larger testcase

---------

Co-authored-by: Roberto Bayardo <bayardo@alum.mit.edu>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-04-04 11:25:28 +03:00
Péter Szilágyi
91faf2c559
consensus, core/typer: add 4844 excessDataGas to header, tie it to Cancun (#27046) 2023-04-04 10:02:50 +03:00
joohhnnn
9b1a82c600
core/vm: clarify comment (#27045) 2023-04-04 02:59:40 -04:00
s7v7nislands
db18293c32
eth/downloader: use atomic types (#27030)
* eth/downloader: use atomic type

* Update eth/downloader/downloader_test.go

Co-authored-by: Martin Holst Swende <martin@swende.se>

* Update eth/downloader/downloader_test.go

Co-authored-by: Martin Holst Swende <martin@swende.se>

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-04-03 22:48:10 +03:00
Martin Holst Swende
beda6c41ad
core/txpool: move some validation to outside of mutex (#27006)
Currently, most of transaction validation while holding the txpool mutex: one exception being an early-on signature check. 

This PR changes that, so that we do all non-stateful checks before we entering the mutex area. This means they can be performed in parallel, and to enable that, certain fields have been made atomic bools and uint64.
2023-04-03 07:16:57 -04:00
Martin Holst Swende
a25dd8064e
test/fuzzers: fuzz rlp handling of big.Int and uint256.Int (#26917)
test/fuzzers: fuzz rlp handling of big.Lnt and uint256.Int
2023-04-03 05:42:34 -04:00
rjl493456442
94457cce07
cmd, miner, signer: avoid panic if keystore is not available (#27039)
* cmd, miner, singer: avoid panic if keystore is not available

* cmd/geth: print warning instead of panic
2023-04-03 05:08:06 -04:00
sudeep
7076ae00aa
cmd/geth: enable log rotation (#26843)
This change enables log rotation, which can be activated using the flag --log.rotate. Additional parameters that can be given are: 

  - log.maxsize to set maximum size before files are rotated,
  - log.maxbackups to set how many files are retailed, 
  - log.maxage to configure max age of rotated files, 
  - log.compress whether to compress rotated files

The way to configure location of the logfile(s) is left unchanged, via the `log.logfile` parameter.  

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-04-03 05:05:36 -04:00
lightclient
2c5798464e
common: delete MakeName (#27023)
common,p2p: remove unused function MakeName
2023-04-03 03:51:31 -04:00
ucwong
dc2f4b9304
go.mod : update snappy (#27027) 2023-04-03 03:35:13 -04:00
Guruprasad Kamath
bed07cd590
cmd/evm: use correct parent number for t8n base fee calculation (#27032)
Currently the t8n tool uses the same block number for the current block and its parent while calculating the base fee. This causes incorrect base fee calculation for the london fork block. This commit sets the parent block number to be one less than the current block number
2023-04-03 03:33:17 -04:00
aaronbuchwald
00a73fbcce
accounts/abi/bind: handle UnpackLog with zero topics (#26920)
Adds error handling for the case that UnpackLog or UnpackLogIntoMap is called with a log that has zero topics.

---------

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2023-03-31 02:35:29 -04:00
s7v7nislands
b92d0ea3bb
miner: use atomic type (#27013)
Use the new typed atomics in the miner package
2023-03-31 02:32:47 -04:00
openex
d0fbb10658
eth/catalyst: improve consensus heartbeat (#26896)
improve the heartbeat function that is no longer suitable in the current situation

Co-authored-by: “openex27” <“openexkevin@gmail.com”>
2023-03-30 15:09:35 -04:00
rjl493456442
9ce047452e
common: fix json marshaller MixedcaseAddress (#26998)
Fix the json marshaller of MixedcaseAddress
2023-03-30 15:04:28 -04:00
s7v7nislands
50317bdace
ethdb/pebble: use atomic type (#27014) 2023-03-30 15:02:14 -04:00
Adrian Sutton
2d1492821d
cmd/geth: Add --log.format cli param (#27001)
Removes the new --log.logfmt directive and hides --log.json, replacing both with log.format=(json|logfmt|terminal). The hidden log.json option is still respected if log.format is not specified for backwards compatibility.

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-03-30 09:24:48 -04:00
Sina Mahmoodi
62fb7d3f85
graphql: revert storage access regression (#27007) 2023-03-30 06:57:49 -04:00
s7v7nislands
949cee2fe3
core: use atomic type (#27011) 2023-03-30 06:53:32 -04:00
Guillaume Ballet
a03490c6b2
remove @gballet as a GraphQL codeowner (#27012) 2023-03-30 04:58:23 -04:00
David Murdoch
7ca4f60a1a
docs: update outdated DeriveSha docs comment (#26968) 2023-03-28 08:59:37 -04:00
Adrian Sutton
56c1f98f8a
internal/debug: add log.logfmt flag to set logging to use logfmt (#26970) 2023-03-28 15:37:40 +03:00
jwasinger
fd94b4fcfa
eth/tracers/native: prevent panic for LOG edge-cases (#26848)
This PR fixes OOM panic in the callTracer as well as panicing on
opcode validation errors (e.g. stack underflow) in callTracer and
prestateTracer.

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-03-28 11:46:53 +02:00
Sina Mahmoodi
a236e03d00
graphql: fix data races (#26965)
Fixes multiple data races caused by the fact that resolving fields are done concurrently by the graphql library. It also enforces caching at the stateobject level for account fields.
2023-03-28 03:08:10 -04:00
s7v7nislands
fb8a3aaf1e
core/state: use atomic.Bool (#26992) 2023-03-28 03:06:50 -04:00
s7v7nislands
79532a25b1
core/bloombits: use atomic type (#26993) 2023-03-28 03:05:29 -04:00
s7v7nislands
881fed032c
core/vm: use atomic.Bool (#26951)
Make use of new atomic types
---------

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-03-27 09:40:20 -04:00
Delweng
117530b0e6
metrics/librato: ensure resp.body closed (#26969)
This change ensures that we call Close on a http response body, in various places in the source code (mostly tests)
2023-03-27 07:44:41 -04:00
Guillaume Ballet
41f89ca944
core/state, trie: remove Try prefix in Trie accessors (#26975)
This change renames StateTrie methods to remove the Try* prefix. 

We added the Trie methods with prefix 'Try' a long time ago, working
around the problem that most existing methods of Trie did not return the
database error. This weird naming convention has persisted until now.

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2023-03-27 10:48:46 +02:00
norwnd
df383addee
ethclient: ensure returned subscription is nil on error (#26976) 2023-03-25 22:38:43 +01:00
ucwong
792d893ed0
rlp/rlpgen: print want/expect output string if mismatch (#26932)
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2023-03-24 14:17:39 +01:00
Martin Holst Swende
0137bd69c5
go.mod: update golang.org/x/tools (#26960) 2023-03-24 12:39:20 +01:00
aaronbuchwald
b1acaf47aa
eth/gasprice: change feehistory input type from int to uint64 (#26922)
Change input param type from int to uint64
2023-03-23 16:12:37 -04:00
Martin Holst Swende
f6c3a534a4
metrics/influxdb: use smaller dependency and reuse code between v1 and v2 reporters (#26963)
This change switches to use the smaller influxdata/influxdb1-client package instead of depending on the whole infuxdb package. The new smaller client is very similar to the influxdb-v2 client, which made it possible to refactor the two reporters to reuse code a lot more.
2023-03-23 15:12:32 -04:00
turboboost55
7dc100714d
metrics: add cpu counters (#26796)
This PR adds counter metrics for the CPU system and the Geth process.
Currently the only metrics available for these items are gauges. Gauges are
fine when the consumer scrapes metrics data at the same interval as Geth
produces new values (every 3 seconds), but it is likely that most consumers
will not scrape that often. Intervals of 10, 15, or maybe even 30 seconds
are probably more common.

So the problem is, how does the consumer estimate what the CPU was doing in
between scrapes. With a counter, it's easy ... you just subtract two
successive values and divide by the time to get a nice, accurate average.
But with a gauge, you can't do that. A gauge reading is an instantaneous
picture of what was happening at that moment, but it gives you no idea
about what was going on between scrapes. Taking an average of values is
meaningless.
2023-03-23 14:13:50 +01:00
Guillaume Ballet
8990c92aea
core/state: add account address to Trie slot accessors (#26934)
This changes the Trie interface to add the plain account address as a
parameter to all storage-related methods.

After the introduction of the TryAccount* functions, TryGet, TryUpdate and
TryDelete are now only meant to read an account's storage. In their current
form, they assume that an account storage is stored in a separate trie, and
that the hashing of the slot is independent of its account's address.

The proposed structure for a stateless storage breaks these two
assumptions: the hashing of a slot key requires the address and all slots
and accounts are stored in a single trie.

This PR therefore adds an address parameter to the interface. It is ignored
in the MPT version, so this change has no functional impact, however it
will reduce the diff size when merging verkle trees.
2023-03-23 11:52:22 +01:00
lightclient
37ecff0967
cmd/evm, tests: record preimages if dump is expected (#26955)
With #25287 we made it so that preimages were not recorded by default. This had the side effect that the evm command is no longer able to dump state since it does a preimage lookup to determine the address represented by a key.

This change enables the recording of preimages when the dump command is given.
2023-03-23 05:15:40 -04:00