Commit graph

14192 commits

Author SHA1 Message Date
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
Delweng
59a8a24331 cmd/geth: make account commands not require datadir lock (#27084)
Makes the `geth account ... ` commands usable even if a geth-process is already executing, since the account commands do not read the chaindata, it was not required for those to use the same locking mechanism. 

---
Signed-off-by: jsvisa <delweng@gmail.com>
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
Péter Szilágyi
d3286a75b0 cmd, eth, les: replace Shanghai override flag with Cancun (#27171) 2023-11-10 11:09:46 -06:00
Stephen Guo
422f4b40de light: use atomic type (#27169)
* light: use atomic type

* light: use a suitable name for the stopped switch in LightChain
2023-11-10 11:09:46 -06:00
Stephen Guo
8e0e89b0f8 les: use atomic type (#27168) 2023-11-10 11:09:46 -06:00
Roberto Bayardo
398ed490b3 core/types: fix discrepancy in receipt.EffectiveGasPrice json encoding tags (#27114)
Regenerate receipt json code to remove omit empty. Previously, there was a discrepancy between the generated code and the source. 

---------

Co-authored-by: lightclient@protonmail.com <lightclient@protonmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2023-11-10 11:09:46 -06:00
rjl493456442
6e18eaded0 trie: add node type common package (#27160)
* trie: add node type common package

In trie/types package, a few node wrappers are defined, which will be used
in both trie package, trie/snap package, etc. Therefore, a standalone common
package is created to put these stuffs.

* trie: rename trie/types to trie/trienode
2023-11-10 11:09:46 -06:00
Sina Mahmoodi
ca3b65288a eth: fix crash on querying finalized block (#27162)
eth: fix crash on querying nil finalized block
2023-11-10 11:09:46 -06:00
Sina Mahmoodi
c22816373a graphql: encode Long values as hex (#26894)
This is a breaking GraphQL API change. All numeric values are now encoded as
hex strings. The motivation for this change is matching JSON-RPC outputs more
closely.

Numbers in query parameters are accepted as both decimal integers and hex strings.
2023-11-10 11:09:46 -06:00