Commit graph

14240 commits

Author SHA1 Message Date
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
Sina Mahmoodi
db3e1179e2 graphql: upgrade UI to v2 (#27294)
Upgrades  graphiql to v2.4.4. The interface has become much nicer, and there are extra features like tabs, history, dark mode etc.

This change also now uses golang embed to bundle the resources.

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
Delweng
cebac05d4c rpc, internal/cmdtest: increase timeout in tests (#27083)
This change gives the cmd-tests have a bit more time to finish before getting forcibly torn down.
2023-11-10 11:09:46 -06:00
Felix Lange
33ddc579ab beacon/types: auto-generate SyncCommittee marshaling methods (#27296) 2023-11-10 11:09:46 -06:00
Shude Li
066d94d37a cmd/utils: do not check free disk space in dev mode (#27281) 2023-11-10 11:09:46 -06:00
Martin Holst Swende
98ab75d695 ethdb/pebble: prevent shutdown-panic (#27238)
One difference between pebble and leveldb is that the latter returns error when performing Get on a closed database, the former does a panic. This may be triggered during shutdown (see #27237)

This PR changes the pebble driver so we check that the db is not closed already, for several operations. It also adds tests to the db test-suite, so the previously implicit assumption of "not panic:ing at ops on closed database" is covered by tests.
2023-11-10 11:09:46 -06:00
Péter Szilágyi
b953419e4c all: tie timestamp based forks to the passage of London (#27279) 2023-11-10 11:09:46 -06:00
Shude Li
5768de6259 go.mod: usegopkg.in/yaml.v3 instead of github.com/go-yaml/yaml (#27295) 2023-11-10 11:09:46 -06:00
Felföldi Zsolt
867efd5102 beacon/types: add beacon chain data types (#27292)
* beacon/types: add beacon chain data types

* beacon/merkle: added comments

* go.mod: cleanups

---------

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2023-11-10 11:09:46 -06:00
Felix Lange
1142f55b9d go.mod: upgrade gencodec (#27288) 2023-11-10 11:09:46 -06:00
Stephen Guo
b91df06aa1 rpc: more accurate checking of handler method signatures (#27287)
This changes the RPC server to ignore methods using *context.Context as parameter
and *error as return value type. Methods with such types would crash the server when
called.
2023-11-10 11:09:46 -06:00
Alex Mylonas
0c076b96f9 internal/ethapi: make NewAccount return EIP-55 format (#26973)
This change implements returning the address as EIP-55 encoded when creating a new account.
2023-11-10 11:09:46 -06:00