Commit graph

14200 commits

Author SHA1 Message Date
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
John Chase
b373df4b25 core/state/pruner: remove unused error-return (#27273) 2023-11-10 11:09:46 -06:00
Martin Holst Swende
9064a57b8c core/state/snapshot: check difflayer staleness early (#27255)
This PR adds a staleness-check to AccountRLP, before checking the bloom-filter and potentially going directly into the disklayer.

---------

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2023-11-10 11:09:46 -06:00
Marius van der Wijden
625cbea86b tests/fuzzers/bn256: add PairingCheck fuzzer (#27252)
* tests/fuzzers/bn256: scale gnark result by constant

* tests/fuzzers/bn256: scale gnark result by constant
2023-11-10 11:09:46 -06:00
Delweng
539b529e0d internal/ethapi: minor refactor in block serialization (#27268) 2023-11-10 11:09:46 -06:00
joohhnnn
a0c2037a67 core/asm: remove unused return value (#27272) 2023-11-10 11:09:46 -06:00
oseau
aff04e0ac3 rpc: websocket should respect the "HTTP_PROXY" by default (#27264)
rpc: the default dialer for websocket should respect the proxy environment variables like "HTTP_PROXY"
2023-11-10 11:09:46 -06:00
Justin Traglia
43972327d0 crypto/kzg4844: upgrade c-kzg-4844 to v0.2.0 (#27257)
Upgrade c-kzg-4844 to v0.2.0
2023-11-10 11:09:46 -06:00
Péter Szilágyi
cd548dc9eb core/types: un-ssz blob txs, add json marshalling and tweaks (#27256) 2023-11-10 11:09:46 -06:00
makcandrov
aab776474a internal/ethapi: remove unused err-return (#27240) 2023-11-10 11:09:46 -06:00
zhiqiangxu
4f615dec62 internal/ethapi: make EstimateGas use latest block by default (#24363)
* EstimateGas should use LatestBlockNumber by default

* graphql: default to use latest for gas estimation

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
Exca-DK
dd2f5b3bae metrics: use sync.map in registry (#27159) 2023-11-10 11:09:46 -06:00
rjl493456442
8f91128563 all: new empty trie with types.EmptyRootHash instead of null (#27230) 2023-11-10 11:09:46 -06:00
Guillaume Ballet
74fb652210 core/state: unexport NodeIterator (#27239) 2023-11-10 11:09:46 -06:00
ucwong
7f60d823ee ethdb/memorydb: init map with known size (#27241)
ethdb:init map with known size
2023-11-10 11:09:46 -06:00
Delweng
5ac6bd2dc6 ethclient: acquire the rpc.Client (#27246)
Signed-off-by: jsvisa <delweng@gmail.com>
2023-11-10 11:09:46 -06:00
Péter Szilágyi
ff65508746 crypto/kzg4844: pull in the C and Go libs for KZG cryptography (#27155)
* cryto/kzg4844: pull in the C and Go libs for KZG cryptography

* go.mod: pull in the KZG libraries

* crypto/kzg4844: add basic becnhmarks for ballpark numbers

* cmd, crypto: integrate both CKZG and GoKZG all the time, add flag

* cmd/utils, crypto/kzg4844: run library init on startup

* crypto/kzg4844: make linter happy

* crypto/kzg4844: push missing file

* crypto/kzg4844: fully disable CKZG but leave in the sources

* build, crypto/kzg4844, internal: link CKZG by default and with portable mode

* crypto/kzg4844: drop verifying the trusted setup in gokzg

* internal/build: yolo until it works?

* cmd/utils: make flag description friendlier

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

* crypto/ckzg: no need for double availability check

* build: tiny flag cleanup nitpick

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
ucwong
a7cc4baf15 p2p: initialize maps with known size (#27229) 2023-11-10 11:09:46 -06:00
Seungbae Yu
01cd3578b0 node: fix typos in comments (#27236) 2023-11-10 11:09:46 -06:00
ucwong
64222b6a45 event: initialize maps with known size (#27233)
event: initialize maps with known size
2023-11-10 11:09:46 -06:00
Guillaume Ballet
f9652a36d9 cmd/utils: report the blocknumber when block import fails (#27213)
When block import fails, the error displays the number of the first block past the import batch, not the number of the failing block. This change fixes this problem by identifying which blocks fails and reporting its number.
2023-11-10 11:09:46 -06:00
ucwong
182fc72b0e miner: initialize maps with capacity (#27228)
* miner : initialize maps with known size

* miner:some reverts
2023-11-10 11:09:46 -06:00
rjl493456442
7e555fb2ac all: port boring changes from pbss (#27176)
* all: port boring changes from pbss

* core, trie: address comments from martin

* trie: minor fixes

* core/rawdb: update comment

* core, eth, tests, trie: address comments

* tests, trie: add extra check when update trie database

* trie/triedb/hashdb: degrade the error to warning
2023-11-10 11:09:46 -06:00
ucwong
b9733e9216 log: report error when ctx key is non-string (#27226)
* log/format.go : invalid string cast fix

* log: some polish

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
joohhnnn
b420d668cc cmd/geth: rename variable 'extapi' (#27223)
rename parameter

In this case, the naming of "extapi" might create some confusion. Although it represents an External Signer Backend, its name could be mistaken for an API. In reality, it is a backend instance used for communicating with external signers. A better naming choice could be "extBackend" or "externalBackend" to more accurately describe that it is a backend instance rather than an API.
2023-11-10 11:09:46 -06:00
ucwong
73ef7f14f6 core/state: initialize maps with known size (#27222)
* core/state : fix map size avoid resizing

* core/state : fixed size
2023-11-10 11:09:46 -06:00
sjlee1125
c2057f0d2c eth/tracers: add txHash field on txTraceResult (#27183)
This PR modifies the interface for the results of `debug_traceBlock` and `debug_traceCall` by adding the `txHash`, allowing users to identify which transaction's trace result corresponds to. 

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
ucwong
cd43de777d core/txpool : fix map size avoid resizing (#27221) 2023-11-10 11:09:46 -06:00
rjl493456442
0b42d42091 eth/downloader: fix error aggregator (#27217) 2023-11-10 11:09:46 -06:00
s7v7nislands
f4c2de61f0 rpc: use atomic types (#27214)
rpc: use atomic type
2023-11-10 11:09:46 -06:00
Péter Szilágyi
3eb53061af all: remove ethash pow, only retain shims needed for consensus and tests (#27178)
* all: remove ethash pow, only retain shims needed for consensus and tests

* all: thank you linter

* all: disallow launching Geth in legacy PoW mode

* cmd/env/internal/t8ntool: remove dangling ethash flag
2023-11-10 11:09:46 -06:00
Marius van der Wijden
5b6fa976c7 accounts/abi: resolve name conflict for methods starting with a number (#26999)
This adds logic to prepend 'M' or 'E' to Solidity identifiers when they would
otherwise violate Go identifier naming rules.

Closes #26972

---------

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
David Dzhalaev
50383d6956 graphql, internal: fix typos in comments (#27184)
* ✏️ Fix typos

* ️ Revert changes

* Update internal/web3ext/web3ext.go

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
Guillaume Ballet
317d990522 core: remove unused ContractCode method from BlockChain (#27186) 2023-11-10 11:09:46 -06:00
Martin Holst Swende
9618a5dc1a p2p/discover: fix lint nit (#27206) 2023-11-10 11:09:46 -06:00
ucwong
2984cb3ae0 core/types: go generate (#27196)
Fixes a discrepancy between source and generated files, which was introduced when ExcessDataGas was added in https://github.com/ethereum/go-ethereum/pull/27046.
2023-11-10 11:09:46 -06:00
Sina Mahmoodi
1c66a6b59d internal/ethapi: add block overrides to eth_call (#26414)
Adds an optional config parameter to eth_call which allows users to override block context fields (same functionality that was added to traceCall in #24871)

---------

Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
chirag-bgh
fc0c58e592 eth/gasprice: fix typo (#27202) 2023-11-10 11:09:46 -06:00
ucwong
abb423b3c4 p2p/discover : typo (#27193) 2023-11-10 11:09:46 -06:00
ucwong
92c24c1ffe eth/ethconfig: go fmt (#27194) 2023-11-10 11:09:46 -06:00
Felix Lange
631062c694 p2p/discover: concurrent TALKREQ handling (#27112)
This changes TALKREQ message processing to run the handler on separate goroutine,
instead of running on the main discv5 dispatcher goroutine. It's better this way because
it allows the handler to perform blocking actions.

I'm also adding a new method TalkRequestToID here. The method allows implementing
a request flow where one node A sends TALKREQ to another node B, and node B later
sends a TALKREQ back. With TalkRequestToID, node B does not need the ENR of A to
send its request.
2023-11-10 11:09:46 -06:00