Commit Graph

14177 Commits

Author SHA1 Message Date
ucwong
d17ec0ea66
ethdb/memorydb: init map with known size (#27241)
ethdb:init map with known size
2023-05-11 10:13:25 +03:00
Delweng
c8b0afb2c4
ethclient: acquire the rpc.Client (#27246)
Signed-off-by: jsvisa <delweng@gmail.com>
2023-05-11 10:09:16 +03:00
Péter Szilágyi
2169fa343a
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-05-10 14:54:14 +03:00
ucwong
ae7db289b8
p2p: initialize maps with known size (#27229) 2023-05-10 10:52:26 +02:00
Seungbae Yu
a742943c78
node: fix typos in comments (#27236) 2023-05-10 10:42:55 +02:00
ucwong
0fb1be0930
event: initialize maps with known size (#27233)
event: initialize maps with known size
2023-05-09 15:29:32 -04:00
Guillaume Ballet
c62da24dce
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-05-09 03:57:42 -04:00
ucwong
c798507642
miner: initialize maps with capacity (#27228)
* miner : initialize maps with known size

* miner:some reverts
2023-05-09 03:24:43 -04:00
rjl493456442
5021d36d35
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-05-09 10:11:04 +03:00
ucwong
81d328a73e
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-05-08 05:38:50 -04:00
joohhnnn
7ac08ba4e0
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-05-08 10:01:14 +03:00
ucwong
cc8d40c65f
core/state: initialize maps with known size (#27222)
* core/state : fix map size avoid resizing

* core/state : fixed size
2023-05-08 09:59:14 +03:00
sjlee1125
604e215d1b
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-05-05 08:59:13 -04:00
ucwong
ba09403113
core/txpool : fix map size avoid resizing (#27221) 2023-05-05 12:33:01 +03:00
rjl493456442
79a57d49cb
eth/downloader: fix error aggregator (#27217) 2023-05-05 08:55:32 +03:00
s7v7nislands
ffda2c64c4
rpc: use atomic types (#27214)
rpc: use atomic type
2023-05-04 04:54:45 -04:00
Péter Szilágyi
dde2da0efb
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-05-03 12:58:39 +03:00
Marius van der Wijden
ac3418def6
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-05-02 14:27:37 +02:00
David Dzhalaev
29c33d9bab
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-05-02 04:57:07 -04:00
Guillaume Ballet
7f6c045e0d
core: remove unused ContractCode method from BlockChain (#27186) 2023-05-02 04:56:08 -04:00
Martin Holst Swende
7d1ebe51b7
p2p/discover: fix lint nit (#27206) 2023-05-02 04:36:11 -04:00
ucwong
a9d7cdaf6e
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-05-02 04:32:27 -04:00
Sina Mahmoodi
ae66009640
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-05-02 04:28:43 -04:00
chirag-bgh
52c246fac3
eth/gasprice: fix typo (#27202) 2023-05-02 04:24:35 -04:00
ucwong
a865e28f28
p2p/discover : typo (#27193) 2023-04-28 21:34:08 +03:00
ucwong
c387186f88
eth/ethconfig: go fmt (#27194) 2023-04-28 21:33:14 +03:00
Felix Lange
47cdea5ac5
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-04-28 11:03:43 +02:00
Delweng
8f373227ac
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-04-27 06:57:29 -04:00
Péter Szilágyi
66c0c4e517
cmd, eth, les: replace Shanghai override flag with Cancun (#27171) 2023-04-26 18:17:37 +03:00
Stephen Guo
306d17749c
light: use atomic type (#27169)
* light: use atomic type

* light: use a suitable name for the stopped switch in LightChain
2023-04-26 04:21:47 -04:00
Stephen Guo
25f9977f2d
les: use atomic type (#27168) 2023-04-26 04:19:56 -04:00
Roberto Bayardo
f8aa623536
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-04-26 02:37:11 -04:00
rjl493456442
5d3f5805d5
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-04-26 09:01:54 +03:00
Sina Mahmoodi
b1113aa07e
eth: fix crash on querying finalized block (#27162)
eth: fix crash on querying nil finalized block
2023-04-25 09:15:43 -04:00
Sina Mahmoodi
2f98dd3838
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-04-25 14:02:54 +02:00
Martin Holst Swende
9a12cc99de
cmd/geth: remove DAO fork test (#27161)
* cmd/geth: fix test to not use explicit db

* cmd/geth: remove dao-test
2023-04-25 07:27:28 -04:00
Exca-DK
f8f95346f9
p2p/discover: add traffic metrics (#27008)
Co-authored-by: Exca-DK <dev@DESKTOP-RI45P4J.localdomain>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2023-04-25 12:12:34 +02:00
s7v7nislands
f541cad272
eth: use new atomic types (#27137) 2023-04-25 12:06:50 +02:00
rjl493456442
bbcb5ea37b
core, trie: rework trie database (#26813)
* core, trie: rework trie database

* trie: fix comment
2023-04-24 10:38:52 +03:00
Péter Szilágyi
1e556d220c
all: remove notion of trusted checkpoints in the post-merge world (#27147)
* all: remove notion of trusted checkpoints in the post-merge world

* light: remove unused function

* eth/ethconfig, les: remove unused config option

* les: make linter happy

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2023-04-24 09:37:10 +03:00
Péter Szilágyi
d3ece3a07c
cmd/utils, node: switch to Pebble as the default db if none exists (#27136)
* cmd/utils, node: switch to Pebble as the default db if none exists

* node: fall back to LevelDB on platforms not supporting Pebble

* core/rawdb, node: default to Pebble at the node level

* cmd/geth: fix some tests explicitly using leveldb

* ethdb/pebble: allow double closes, makes tests simpler
2023-04-21 19:24:18 +03:00
Péter Szilágyi
bbc565ab05
core/types, params: add blob transaction type, RLP encoded for now (#27049)
* core/types, params: add blob transaction type, RLP encoded for now

* all: integrate Cancun (and timestamp based forks) into MakeSigner

* core/types: fix 2 back-and-forth type refactors

* core: fix review comment

* core/types: swap blob tx type id to 0x03
2023-04-21 12:52:02 +03:00
Martin Holst Swende
4ab4e4f3aa
params: begin v1.11.7 release cycle 2023-04-20 20:16:04 +02:00
Martin Holst Swende
ea9e62ca3d
params: go-ethereum v1.11.6 stable 2023-04-20 20:14:51 +02:00
rjl493456442
99f81d2724
all: refactor trie API (#26995)
In this PR, all TryXXX(e.g. TryGet) APIs of trie are renamed to XXX(e.g. Get) with an error returned.

The original XXX(e.g. Get) APIs are renamed to MustXXX(e.g. MustGet) and does not return any error -- they print a log output. A future PR will change the behaviour to panic on errorrs.
2023-04-20 06:57:24 -04:00
s7v7nislands
ae93e0b484
metrics: use atomic type (#27121) 2023-04-20 03:36:54 -04:00
Alex Beregszaszi
3f7afc3f57
core/vm: order opcodes properly (#27113) 2023-04-20 02:52:00 -04:00
Adrian Sutton
f2df2b1981
cmd/geth: rename --vmodule to --log.vmodule (#27071)
renames `--vmodule` to `--log.vmodule`, and prints a warning if the old form is used.
2023-04-19 07:18:02 -04:00
Martin Holst Swende
2b0a34bea6
cmd/devp2p: make crawler-route53-updater less verbose (#27116)
Follow-up to #26697, makes the crawler less verbose on route53-based scenarios.

It also changes the loglevel from debug to info on Updates, which are typically the root, and can be interesting to see.
2023-04-19 06:46:56 -04:00
s7v7nislands
3768b00747
consensus/ethash: use atomic type (#27068) 2023-04-18 14:54:06 +02:00