Commit Graph

13081 Commits

Author SHA1 Message Date
c0d17bca52 graphql: check header first in blocks query (#24190)
Fixes #24167

New behaviour is that the endpoint returns results only for available
blocks without returning an error when it doesn't find a block. Note we
skip any block after a non-existent block.

This adds a header fetch for every block in range (even if header
is not needed). Alternatively, we could do the check in every field's
resolver method to avoid this overhead.
2022-01-05 16:11:46 +01:00
66a908c5e8 core/rawdb: fix double-lock causing hang (#24189)
Fixes #24159

Co-authored-by: Felix Lange <fjl@twurst.com>
2022-01-04 19:02:37 +01:00
d0bd5017ed accounts: correct comment (#24186)
Change two instances of the word `calulcated` to `calculated`.
2022-01-04 17:24:28 +02:00
98be5f9a72 trie: fix spelling mistake (#24185)
mispelled words in comments: th enext
2022-01-04 17:23:52 +02:00
356bbe343a core/asm: change order of items in stringtokenTypes (#24153)
This orders the items in slice definition same as the enum values.
2021-12-26 14:58:17 +01:00
dddf73abbd params: begin v1.10.15 release cycle 2021-12-23 11:23:07 +01:00
11a3a35097 params: release go-ethereum v1.10.14 stable v1.10.14 2021-12-23 11:21:45 +01:00
3f2e96cf95 cmd/geth: add missing sepolia testnet flag checks (#24147) 2021-12-22 17:51:57 +01:00
980b7682b4 core/types: document JSON field name equivalents of DynamicFeeTx (#24143) 2021-12-22 15:32:17 +01:00
b8edc04ce3 build: upgrade -dlgo version to Go 1.17.5 (#24144) 2021-12-22 15:31:41 +01:00
99be62a9b1 accounts/abi: avoid unnecessary alloc (#24128) 2021-12-20 10:25:46 +01:00
8bbf83e7a4 core: ignore basefee when comparing with pool gasprice in txpool (#24080)
This reverts commit 9489853321.
2021-12-17 15:44:57 +01:00
2295640ebd eth/catalyst: implement kintsugi-spec v3 (#24067) 2021-12-17 15:38:58 +01:00
f5f5c0855a tests/solidity/contracts: fix typo in OpCodes.sol (#24123) 2021-12-17 15:19:34 +01:00
ada9c774e9 eth, les: update unclean shutdown markers regularly (#24077)
Fixes #22580

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-12-17 15:18:51 +01:00
3e47e38a4e core/vm: Make INVALID a defined opcode (#24017)
* core/vm: Define 0xfe opcode as INVALID

* core/vm: Remove opInvalid as opUndefined handles it

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
2021-12-17 13:44:05 +01:00
81ec6b1d4c core/vm: reverse bit order in bytes of code bitmap (#24120)
* core/vm: reverse bit order in bytes of code bitmap

This bit order is more natural for bit manipulation operations and we
can eliminate some small number of CPU instructions.

* core/vm: drop lookup table
2021-12-17 10:32:00 +01:00
bc6bf1e193 README: remove mentions of snap sync (#24122) 2021-12-16 11:50:05 +01:00
0ba0b81e54 rpc: fix time key collision for logger with json output (#24112)
The "t" key overrides the log message time in JSON output.

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-12-15 15:30:54 +01:00
fc01a7ce8e les/vflux/client, p2p/nodestate: fix data races (#24058)
Fixes #23848
2021-12-14 11:34:50 +01:00
155795be99 core/vm: avoid memory expansion check for trivial ops (#24048) 2021-12-14 11:30:20 +01:00
adec878c1d core/rawdb: fix error message fields in ReadLogs (#24104) 2021-12-14 11:11:05 +01:00
b3b8b268eb consensus: define MaxGasLimit as a const in params (#24092)
* consensus: use the maxGasLimit constant to check the header.GasLimit to avoid creating new variables repeatedly

* consensus: check the header.GasLimit by the public constant MaxGasLimit

* consensus: check the header.GasLimit by the constant MaxGasLimit
2021-12-14 10:17:25 +01:00
72c2c0ae7e cmd/geth, console: support interrupting the js console (#23387)
Previously, Ctrl-C (SIGINT) was ignored during JS execution, so it was not
possible to get out of infinite loops in the console. With this change,
Ctrl-C now interrupts JS.

Fixes #23344

Co-authored-by: Sina Mahmoodi <itz.s1na@gmail.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-12-11 16:51:05 +01:00
ae8ff2661d core/vm: remove unused code (IsStaticJump) (#24085) 2021-12-09 13:55:06 +01:00
db03faa10d core, eth: improve delivery speed on header requests (#23105)
This PR reduces the amount of work we do when answering header queries, e.g. when a peer
is syncing from us.

For some items, e.g block bodies, when we read the rlp-data from database, we plug it
directly into the response package. We didn't do that for headers, but instead read
headers-rlp, decode to types.Header, and re-encode to rlp. This PR changes that to keep it
in RLP-form as much as possible. When a node is syncing from us, it typically requests 192
contiguous headers. On master it has the following effect:

- For headers not in ancient: 2 db lookups. One for translating hash->number (even though
  the request is by number), and another for reading by hash (this latter one is sometimes
  cached).
  
- For headers in ancient: 1 file lookup/syscall for translating hash->number (even though
  the request is by number), and another for reading the header itself. After this, it
  also performes a hashing of the header, to ensure that the hash is what it expected. In
  this PR, I instead move the logic for "give me a sequence of blocks" into the lower
  layers, where the database can determine how and what to read from leveldb and/or
  ancients.

There are basically four types of requests; three of them are improved this way. The
fourth, by hash going backwards, is more tricky to optimize. However, since we know that
the gap is 0, we can look up by the parentHash, and stlil shave off all the number->hash
lookups.

The gapped collection can be optimized similarly, as a follow-up, at least in three out of
four cases.

Co-authored-by: Felix Lange <fjl@twurst.com>
2021-12-07 17:50:58 +01:00
7f7877a023 miner: update pending block even after the PoS transition (#24075) 2021-12-07 10:42:09 +01:00
d78590560d eth/filters: remove unused field 'chaindb' in PublicFilterAPI (#24072) 2021-12-07 02:36:01 +01:00
cc87cbd70a security policy: updated pgp key (#24069) 2021-12-06 13:46:19 +01:00
acb0f7a67b p2p/simulations: improve README language (#24051) 2021-12-06 12:25:42 +01:00
a25906e4c0 Merge pull request #24066 from holiman/no_no_recursion
core/vm: remove no-recursion option from config
2021-12-06 12:47:25 +02:00
69686fa328 core, core/rawdb: fix transaction indexing (#24024)
This PR fixes a special corner case in transaction indexing.

When the chain is rewound by SetHead to a historical point which is even lower than the transaction indexes tail, then system will report Failed to decode block body error all the time, because the relevant blocks are already deleted.

In order to avoid this "non-critical-but-annoying" issue, we can recap the indexing target to head+1(to is excluded, so it means indexing transactions from 0 to head).
2021-12-06 11:26:03 +01:00
a95675d50f core/vm: remove no-recursion option from config 2021-12-06 09:55:50 +01:00
619a3e7085 signer/core: move EIP-712 types to package apitypes (#24029)
Fixes #23972
2021-12-05 14:31:41 +01:00
93f196c4b0 eth/catalyst: implement kintsugi spec v1.0.0-alpha.4 (#23984)
This PR implements the new kintsugi specification which can be found here: https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.4/src/engine/specification.md
2021-12-03 16:26:28 +01:00
46f701ca93 readme: use correct link for web3.js docs (#24046)
Previous link leads to incorrect (more recent) version of web3.js docs.

go-ethereum uses v0.20.1. The docs for 0.2x.x have been archived at this Github link.
2021-12-03 13:34:18 +01:00
cca482b4b1 Merge pull request #24047 from karalabe/delete-dead-sync-bloom
core, eth, les, trie: remove the sync bloom, used by fast sync
2021-12-03 13:55:17 +02:00
58d1988349 core, eth, les, trie: remove the sync bloom, used by fast sync 2021-12-03 12:32:41 +02:00
b02fe5317f core/vm: move interpreter interruption check to jump instructions (#24026)
* core/vm: Remove interpreter loop interruption check

* core/vm: Unit test for interpreter loop interruption

* core/vm: Check for interpreter loop abort on every jump
2021-12-03 11:10:26 +01:00
9331fe28e8 core/vm: fill gaps in jump table with opUndefined (#24031) 2021-12-03 11:04:54 +01:00
a0f7771962 core/vm: remove stack.pushN (#24040) 2021-12-03 10:16:49 +01:00
5e78fc034b Merge pull request #24032 from karalabe/downloader-response-preprocess
eth: pre-process downloader responses on the peer reader thread
2021-12-03 10:34:25 +02:00
85064ed09b all: fix 'the the' in comments (#24036) 2021-12-02 15:42:09 +01:00
b45931cc4a accounts/abi/bind: correctly handle structs used only as constructor params (#23940)
The `structs` map is populated by iterating over all methods except the constructor, which results in a nil-pointer dereference.

I've first reproduced the problem with a new test and then implemented the fix.

Co-authored-by: Arran Schlosberg <me@arranschlosberg.com>
2021-12-02 13:53:10 +01:00
8fbe0b9b68 p2p/enr: reduce allocation in Record.encode (#24034) 2021-12-02 10:55:01 +01:00
c893488349 eth: pre-process downloader responses on the peer reader thread 2021-12-01 20:18:12 +02:00
721c5723c0 eth/tracers/js: add support for REVERT/SELFDESTRUCT in evmdis_tracer (#24016)
* eth/tracers: Add support for REVERT in evmdis_tracer

* evm/tracers: Fix evmdis_tracer to use SELFDESTRUCT instead of SUICIDE

* eth/tracers: Regenerate tracer library
2021-12-01 10:34:52 +01:00
2be129b5cf core/vm: rename opSuicide to opSelfdestruct (#24022)
The opcode was renamed in the codebase in 2017, but the functions were kept unchanged.
2021-12-01 10:33:29 +01:00
9393d1fb5d core/vm: Move interpreter.ReadOnly check into the opcode implementations (#23970)
* core/vm: Move interpreter.ReadOnly check into the opcode implementations

Also remove the same check from the interpreter inner loop.

* core/vm: Remove obsolete operation.writes flag

* core/vm: Capture fault states in logger

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

* core/vm: Remove panic added for testing

Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-12-01 10:21:21 +01:00
1988b47e02 tests/fuzzzers. eth/protocols/snap: add snap protocol fuzzers (#23957) 2021-12-01 10:17:18 +01:00