Commit Graph

14020 Commits

Author SHA1 Message Date
protolambda
90711efb0a
node, rpc: add JWT auth support in client (#24911)
This adds a generic mechanism for 'dial options' in the RPC client,
and also implements a specific dial option for the JWT authentication
mechanism used by the engine API. Some real tests for the server-side
authentication handling are also added.

Co-authored-by: Joshua Gutow <jgutow@optimism.io>
Co-authored-by: Felix Lange <fjl@twurst.com>
2022-09-02 17:40:41 +02:00
Martin Holst Swende
7f2890a9be
eth/fetcher: throttle peers which deliver many invalid transactions (#25573)
Co-authored-by: Felix Lange <fjl@twurst.com>
2022-09-02 17:28:33 +02:00
Sina Mahmoodi
d6a12bc7b8
eth/tracers/js: fill in log.refund field (#25661)
For some reason, an accessor method for this field exists in JS, but
the value was never actually assigned.
2022-09-02 17:08:25 +02:00
xternet
198fa956f4
README.md: improve grammar (#25646)
Co-authored-by: Felix Lange <fjl@twurst.com>
2022-09-02 16:58:20 +02:00
Jakub Freebit
d2027accdc
mobile: register filter APIs (#25642)
This fixes a regression introduced in PR #25459.
2022-09-02 16:53:58 +02:00
Péter Szilágyi
511bf8f188
Merge pull request #25651 from holiman/fix_snapqueue
eth/protocols/snap: fix problems due to idle-but-busy peers
2022-09-01 12:38:34 +03:00
rjl493456442
d46184c969
core/state: filter out nil trie for copy (#25575) 2022-09-01 09:34:32 +02:00
Martin Holst Swende
d79bd2f0f6
trie: better error reporting (#25645) 2022-09-01 08:41:10 +02:00
Marius van der Wijden
95a2c221d4
eth/catalyst: prevent division by zero (#25654)
eth/catalyst: prevent diff by zero
2022-08-31 21:29:39 +03:00
rjl493456442
3f79afb599
trie: cleanup stateTrie (#25640)
It's a trivial PR to hide the error log when the trie node is not found in the database. The idea for this change is for all TryXXX functions, the error is already returned and we don't need to fire a log explicitly.

Recently there are a few tickets #25613 #25589 reporting that the trie nodes are missing because of debug.SetHead. The root cause is after resetting, the chain rewinds to a historical point and re-imports the blocks on top.

Since the node is already synced and started to accept transactions previously, these transactions are still kept in the txpool and verified by txpool with a live state. This live state is constructed based on the live trie database, which is changed fast by node referencing and de-referencing.

Unfortunately, when we construct a live state(like the state in txpool), we don't reference the state we have. The blockchain will garbage collect the intermediate version nodes in another thread which leads the broken live state.

The best solution for this is to forcibly obtain a reference for all live states we create and call release function once it's used up. But it might end up with more junks persisted into disk. Will try to find an elegant solution later in the following PR.
2022-08-31 18:18:18 +02:00
Martin Holst Swende
dafa40e7a7
eth/protocols/snap: fix problems due to idle-but-busy peers 2022-08-31 17:58:18 +02:00
aaronbuchwald
3d68bb03c3
trie: fix grammar in comment (#25648) 2022-08-31 16:26:39 +02:00
Sina Mahmoodi
8cfcb41e57
graphql: return correct logs for tx (#25612)
* graphql: fix tx logs

* minor

* Use optimized search for selecting tx logs
2022-08-31 16:14:53 +02:00
Jakub Freebit
279afd7947
mobile: close node on error (#25643) 2022-08-31 13:31:16 +03:00
Martin Holst Swende
362256ebff
eth/catalyst: adjust eta for themerge (#25601)
* eth/catalyst: adjust eta for themerge

* squash

* squash

* eth/catalyst: address review concerns
2022-08-31 13:28:35 +03:00
rjl493456442
d10c280309
all: move genesis initialization to blockchain (#25523)
* all: move genesis initialization to blockchain

* core: add one more check

* core: fix tests
2022-08-30 18:22:28 +02:00
Felix Lange
2b6df280de
node: fix regression in TestJWT (#25635) 2022-08-30 16:41:09 +02:00
Seungbae Yu
7813b675f5
node: change JWT error status to 401 Unauthorized (#25629) 2022-08-30 15:25:02 +02:00
Rachel Bousfield
8df8eb4e7a
ethclient: add 'finalized' and 'safe' block number support (#25580) 2022-08-30 14:56:39 +02:00
Marius Kjærstad
44b36a0cdd
docs: specify execution client (#25566)
Co-authored-by: Felix Lange <fjl@twurst.com>
2022-08-30 14:48:04 +02:00
uji
6d882a51e0
build: fix ignored errors (#25591) 2022-08-30 14:40:15 +02:00
Sina Mahmoodi
6e6b5087f1
cmd/geth: fix legacy receipt detection for empty db (#25609) 2022-08-30 14:38:35 +02:00
Abirdcfly
c394c308e6
all: remove duplicate word in comments (#25618)
Signed-off-by: Abirdcfly <fp544037857@gmail.com>

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-08-29 11:16:34 +03:00
xinbenlv
f03c37b73e
accounts/abi/bind: add const for tx fee elasticity multiplier (#25504)
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2022-08-25 10:59:50 +02:00
lightclient
70e1e65b1d
internal/ethapi: rename debug getters to match spec (#25176)
Some small fixes to get the existing debug methods to conform to the spec. Mainly dropping the encoding information from the method name as it should be deduced from the debug context and allowing the method to be invoked by either block number or block hash. It also adds the method debug_getTransaction which returns the raw tx bytes by tx hash. This is pretty much equivalent to the eth_getRawTransactionByHash method.
2022-08-25 10:41:37 +02:00
Felix Lange
6c40aed146 params: begin go-ethereum v1.11 release cycle 2022-08-25 10:37:04 +02:00
Péter Szilágyi
57896d6fbe
params: begin v1.10.24 release cycle 2022-08-24 12:11:17 +03:00
Péter Szilágyi
d901d85377
params: release Geth v1.10.23 2022-08-24 12:09:02 +03:00
Péter Szilágyi
4c114af502
Merge pull request #25582 from holiman/err_handling
consensus/beacon: don't ignore errors
2022-08-23 22:26:33 +03:00
Péter Szilágyi
9ed10b9e48
Merge pull request #25581 from karalabe/triedb-fix-flush-order
core/state, trie: fix trie flush order for proper pruning
2022-08-23 22:13:33 +03:00
Martin Holst Swende
45a660a4f2
consensus/beacon: don't ignore errors 2022-08-23 20:48:50 +02:00
Péter Szilágyi
5758d1fb11
core/state, trie: fix trie flush order for proper pruning 2022-08-23 21:17:12 +03:00
Péter Szilágyi
81bd998353
core, eth/downloader: handle spurious junk bodies from racey rollbacks (#25578)
* eth/downloader: handle junkbodies/receipts in the beacon sync

* core: check for header presence when checking for blocks
2022-08-23 14:02:51 +03:00
Felix Lange
6d711f0c00 params: begin v1.10.23 release cycle 2022-08-22 10:39:52 +02:00
Felix Lange
2de49b04e5 params: release go-ethereum v1.10.22 2022-08-22 10:36:39 +02:00
Péter Szilágyi
395f3d4bf6
eth/catalyst: warn less frequently if no beacon client is available (#25569)
* eth/catalyst: warn less frequently if no beacon client is available

* eth/catalyst: tweak warning frequency a bit

* eth/catalyst: some more tweaks

* Update api.go

Co-authored-by: Felix Lange <fjl@twurst.com>
2022-08-22 11:27:39 +03:00
Péter Szilágyi
02418c2fa9
Revert "eth/fetcher: don't spend too much time on transaction inclusion" (#25567)
Revert "eth/fetcher: don't spend too much time on transaction inclusion (#25524)"

This reverts commit 0ce494b60c.
2022-08-22 10:14:56 +03:00
Martin Holst Swende
0ce494b60c
eth/fetcher: don't spend too much time on transaction inclusion (#25524)
* eth/fetcher: introduce some lag in tx fetching

* eth/fetcher: change conditions a bit

* eth/fetcher: use per-batch quota check

* eth/fetcher: fix some comments

* eth/fetcher: address review concerns

* eth/fetcher: fix panic + add warn log

* eth/fetcher: fix log

* eth/fetcher: fix log

* cmd/devp2p/internal/ethtest: fix ignorign tx announcements from prev. tests

* cmd/devp2p/internal/ethtest: fix TestLargeTxRequest

This increases the number of tx relay messages the test waits for. Since
go-ethereum now processes incoming txs in smaller batches, the
announcement messages it sends are also smaller.

Co-authored-by: Felix Lange <fjl@twurst.com>
2022-08-19 16:59:36 +03:00
Felix Lange
ac7ad811b4
internal/ethapi: fix build regression (#25555) 2022-08-19 14:48:49 +02:00
zhiqiangxu
0865880626
accounts/abi: fix set function (#25477)
* accounts/abi: fix set function

* don't break things

* update test
2022-08-19 12:15:04 +02:00
Sina Mahmoodi
36874b63a1
eth/filters: add global block logs cache (#25459)
This adds a cache for block logs which is shared by all filters. The cache
size of is configurable using the `--cache.blocklogs` flag.

Co-authored-by: Felix Lange <fjl@twurst.com>
2022-08-19 11:14:59 +02:00
Marius van der Wijden
77308cd6fc
consensus/beacon: check ttd reached on pos blocks (#25552)
* consensus/beacon: check ttd reached on pos blocks

* consensus/beacon: check ttd reached on pos blocks

* consensus/beacon: check ttd reached on pos blocks
2022-08-19 11:37:53 +03:00
Justin Traglia
9762ddf8b0
cmd/geth: parse uint64 value with ParseUint instead of Atoi (#25545)
Parse uint64 value with ParseUint instead of Atoi
2022-08-19 09:03:45 +03:00
Justin Traglia
656dc8cc00
eth, les: unlock downloader peerSet if there's an error (#25546)
Unlock peerSet if there's an error in the downloader
2022-08-19 09:02:47 +03:00
ucwong
32e8490615
accounts/abi/bind/backends: typo fix (#25549) 2022-08-19 09:01:43 +03:00
ucwong
fa1305f8bf
internal/ethapi: fix comment typo (#25548) 2022-08-19 09:01:09 +03:00
Justin Traglia
2c5648d891
all: fix some typos (#25551)
* Fix some typos

* Fix some mistakes

* Revert 4byte.json

* Fix an incorrect fix

* Change files to fails
2022-08-19 09:00:21 +03:00
rjl493456442
a1b8892384
trie: improve node rlp decoding performance (#25357)
This avoids copying the input []byte while decoding trie nodes. In most
cases, particularly when the input slice is provided by the underlying
database, this optimization is safe to use.

For cases where the origin of the input slice is unclear, the copying version
is retained. The new code performs better even when the input must be
copied, because it is now only copied once in decodeNode.
2022-08-19 00:39:47 +02:00
Justin Traglia
cce7f08438
rlp/rlpgen: fix error handling when target type not found (#25547)
typ will be nil when lookupStructType returns an error. cfg.Type should be used instead.
2022-08-19 00:34:57 +02:00
Guillaume Ballet
23ac8df153
cmd. core: save preimages on genesis creation (#25538)
force preimage dump for genesis
2022-08-18 13:28:06 +02:00