Commit graph

14251 commits

Author SHA1 Message Date
jwasinger
a3f24fb625 miner: log number of withdrawals in block upon payload update (#27457) 2023-11-10 11:09:46 -06:00
Delweng
dc18557d73 eth/filters: reuse handleLogs method for removed logs (#27438) 2023-11-10 11:09:46 -06:00
KAI
bfc46a4913 accounts/keystore: handle error for invalid key in DecryptKey (#27432)
Co-authored-by: KAI <kaili@coinsummer.io>
Co-authored-by: Felix Lange <fjl@twurst.com>
2023-11-10 11:09:46 -06:00
Stephen Guo
5e0fadb357 rlp: use identical receiver names for encBuffer methods (#27430) 2023-11-10 11:09:46 -06:00
Sina Mahmoodi
19aebbdd1b graphql: implement withdrawals (EIP-4895) (#27072)
implements withdrawals in graphql as per https://github.com/ethereum/execution-apis/pull/400
2023-11-10 11:09:46 -06:00
Delweng
6d231bbe66 eth,core: add api debug_getTrieFlushInterval (#27303)
* core,eth: add api debug_getTrieFlushInterval

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

* eth/api_debug: comment of SetTrieFlushInterval

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

* Apply suggestions from code review

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
Péter Szilágyi
4b555c7682 core/txpool: make transaction validation reusable across packages (pools) (#27429)
* core/txpool: abstraction prep work for secondary pools (blob pool)

* core/txpool: leave subpool concepts to a followup pr

* les: fix tests using hard coded errors

* core/txpool: use bitmaps instead of maps for tx type filtering
2023-11-10 11:09:46 -06:00
Paul Lange
abd1ff83d0 les: remove unused var AdvertiseProtocolVersions (#27405) 2023-11-10 11:09:46 -06:00
Daniel Katzan
210e688a5c core/txpool: fix minor flaw in isGapped check (#27404)
This fix a minor implementation issue with the newly introduced isGapped function and it is described in ticket: https://github.com/ethereum/go-ethereum/issues/27401
2023-11-10 11:09:46 -06:00
Martin Holst Swende
df5a104045 cmd/evm: make evm blocktest output logs if so instructed (#27396)
* cmd/evm: make evm blocktest output logs if so instructed

* Apply suggestions from code review

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

---------

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2023-11-10 11:09:46 -06:00
rjl493456442
1b82886dec core/state/snapshot, core/types, eth: move account definition to type (#27323)
* core/state/snapshot, core/types, eth: move account definition to type

* core, eth: revert snapshot Account API change
2023-11-10 11:09:46 -06:00
Marius van der Wijden
45907213fb core: 4844 opcode and precompile (#27356)
* core: crypto: implement BLOBHASH and pointEval precompile

* core: crypto: fixed nitpicks, moved precompile return value

* core/vm: fix review comments
2023-11-10 11:09:46 -06:00
rjl493456442
f60b50e6d3 core/state: clear out cached state data when reset occurs (#27376)
* core/state: remove cached snap data if reset occurs

* core/state: address comment from peter

* core/state: skip revert in case data is nil
2023-11-10 11:09:46 -06:00
John Chase
8d91a3e6be graphql: simplify tx resolve (#27285) 2023-11-10 11:09:46 -06:00
Péter Szilágyi
0968b3d498 eth/downloader: drop beacon head updates if the syncer is restarting (#27397)
* eth/downloader: drop beacon head updates if the syncer is restarting

* eth/donwloader: v2 of the goroutine spike preventer
2023-11-10 11:09:46 -06:00
Péter Szilágyi
17332a110e all: remove the Rinkeby testnet (#27406) 2023-11-10 11:09:46 -06:00
rjl493456442
68dea627c4 core/state: mark account as dirty when resetObject occurs (#27339)
This changes the journal logic to mark the state object dirty immediately when it
is reset. 

We're mostly adding this change to appease the fuzzer. Marking it dirty immediately
makes no difference in practice because accounts will always be modified by EVM
right after creation.
2023-11-10 11:09:46 -06:00
jin
d7bb325997 internal/web3ext: fix parameter count of miner_start (#27400) 2023-11-10 11:09:46 -06:00
Guillaume Ballet
797c10068e core/state: move slot RLP encoding into the MPT implementation (#27000)
Continuing with a series of PRs to make the Trie interface more generic, this PR moves
the RLP encoding of storage slots inside the StateTrie and light.Trie implementations,
as other types of tries don't use RLP.
2023-11-10 11:09:46 -06:00
Felix Lange
c51cd2d8f8 p2p/discover: add Table configuration and Nodes method (#27387)
* p2p/discover: remove ReadRandomNodes

Even though it's public, this method is not callable by code outside of
package p2p/discover because one can't get a valid instance of Table.

* p2p/discover: add Table.Nodes

* p2p/discover: make Table settings configurable

In unit tests and externally developed cmd/devp2p test runs, it can be
useful to tune the timer intervals used by Table.
2023-11-10 11:09:46 -06:00
Péter Szilágyi
0eb3a6cdbb core, eth/downloader: validate blobtx.To at serialization time (#27393) 2023-11-10 11:09:46 -06:00
Péter Szilágyi
b606e38770 core, eth/downloader, params: validate blob tx bodies (#27392) 2023-11-10 11:09:46 -06:00
Péter Szilágyi
6083a3b66d consensus, core, eth/downloader, params: 4844 chain validation (#27382) 2023-11-10 11:09:46 -06:00
ucwong
ca434495ac go.mod: golang.org/x upgrade (#27299)
go.mod:golang upgrade
2023-11-10 11:09:46 -06:00
rjl493456442
f768ce56b9 miner: suspend miner if node is syncing (#27218)
Drop the notions of uncles, and disables activities while syncing

-  Disable activities (e.g. generate pending state) while node is syncing,
-  Disable empty block submission (but empty block is still kept for payload building),
-  Drop uncle notion since (ethash is already deprecated)
2023-11-10 11:09:46 -06:00
James Prestwich
4fb4311887 internal/ethapi: prevent unnecessary resource usage in eth_getProof implementation (#27310)
Deserialize hex keys early to shortcut on invalid input, and re-use the account storageTrie for each proof for each proof in the account, preventing repeated deep-copying of the trie.

Closes #27308

 --------

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
2023-11-10 11:09:46 -06:00
Seungbae Yu
b2a95a215a event: move type fixation logic into Feed.init (#27249)
This is a minor optimization/refactoring of Feed.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-11-10 11:09:46 -06:00
ucwong
c56e60b850 les, eth: fix typo in comment (#27369) 2023-11-10 11:09:46 -06:00
jwasinger
52775d5cd3 eth: make debug_StorageRangeAt take a block hash or number (#27328)
eth: make StorageRangeAt take a block hash or number

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
2023-11-10 11:09:46 -06:00
Guillaume Ballet
0ab863d79f core/types: remove superfluous todo-comment (#27383) 2023-11-10 11:09:46 -06:00
Delweng
978944eb7c internal/ethapi: add more testcases for block/header rpc (#27325)
Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
2023-11-10 11:09:46 -06:00
Delweng
6d43377103 eth: split api.go into namespace based files (#27263)
This change splits up the multiple API functions / namespaces currently defined in the eth package into different per-namespace files.
2023-11-10 11:09:46 -06:00
Delweng
49ed215ed2 internal/ethapi: don't return header size from rpc (#27347)
RPC methods `eth_getHeaderBy*` returned a size value which was meant for internal
processes. Please instead use `size` field returned by `eth_getBlockBy*` if you're interested
in the RLP encoded storage size of the block.

Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
f875ab9886 eth/filters: retrieve logs in async (#27135)
This change implements async log retrievals via feeding logs in channels, instead of returning slices. This is a first step to implement #15063.  

---------

Signed-off-by: jsvisa <delweng@gmail.com>
Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Sina Mahmoodi <1591639+s1na@users.noreply.github.com>
2023-11-10 11:09:46 -06:00
Delweng
f090ea82ad accounts: replace noarg fmt.Errorf with errors.New (#27331)
* accounts: replace noarg fmt.Errorf with errors.New

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

* accounts: go autoimport

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

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
a8091f2c34 core,console: replace noarg fmt.Errorf with errors.New (#27332)
* core: replace noarg fmt.Errorf with errors.New

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

* console: replace noarg fmt.Errorf with errors.New

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

* core: go autoimport

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

* core: dry

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

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Martin Holst Swende
861a6a44c8 params: begin v1.12.1 release cycle 2023-11-10 11:09:46 -06:00
Martin Holst Swende
adf8562aad params: go-ethereum v1.12.0 stable 2023-11-10 11:09:46 -06:00
Martin Holst Swende
a968f04a4f ethdb/pebble: fix NewBatchWithSize to set db (#27350) 2023-11-10 11:09:46 -06:00
Delweng
6fa241497f eth,consensus: replace noarg fmt.Errorf with errors.New (#27330)
* eth: replace noarg fmt.Errorf with errors.New

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

* consensus: replace noarg fmt.Errorf with errors.New

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

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
7db2b7162b internal,tests: replace noarg fmt.Errorf with errors.New (#27335)
* internal: replace noarg fmt.Errorf with errors.New

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

* tests: replace noarg fmt.Errorf with errors.New

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

* tests: go autoimport

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

* tests: go autoimport

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

---------

Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
b508825275 les, signer, light: replace noarg fmt.Errorf with errors.New (#27336)
Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
b6ede5588c crypto: replace noarg fmt.Errorf with errors.New (#27333)
Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
5d27acd684 ethclient,event: replace noarg fmt.Errorf with errors.New (#27334)
Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Delweng
13b2b9f14a cmd: use errrors.New instead of empty fmt.Errorf (#27329)
Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Martin Holst Swende
c27eb1239b rpc: change BlockNumber constant values to match ethclient (#27219)
ethclient accepts certain negative block number values as specifiers for the "pending",
"safe" and "finalized" block. In case of "pending", the value accepted by ethclient (-1)
did not match rpc.PendingBlockNumber (-2).

This wasn't really a problem, but other values accepted by ethclient did match the
definitions in package rpc, and it's weird to have this one special case where they don't.

To fix it, we decided to change the values of the constants rather than changing ethclient.
The constant values are not otherwise significant. This is a breaking API change, but we
believe not a dangerous one.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
2023-11-10 11:09:46 -06:00
Martin Holst Swende
e87d418e98 cmd/evm: make batched state-test execution possible (#27318)
implements the ability to run several state-tests in one instance. By not providing a statetest path to the `evm statetest` command, the path(s) will instead be read from `stdin`.
2023-11-10 11:09:46 -06:00
Park Changwan
8686762eb9 core/state: do not ignore null addr while iterative dump (#27320)
fixes bug which caused the zero-address to be ignored during an iterative state-dump.

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
minh-bq
5216317d21 eth/tracers: fix flatCallTracer crasher (#27304)
FlatCallTracer had a crasher when it was passed `onlyTopCall: true` as config.
This PR ignores config fields inherited from the normal call tracer.
2023-11-10 11:09:46 -06:00
Chawin Aiemvaravutigul
c6b8a40978 accounts/abi: add ErrorById (#27277)
Adds `ErrorById` lookup
2023-11-10 11:09:46 -06:00