Martin Holst Swende
1e1865b73f
core: implement background trie prefetcher
...
Squashed from the following commits:
core/state: lazily init snapshot storage map
core/state: fix flawed meter on storage reads
core/state: make statedb/stateobjects reuse a hasher
core/blockchain, core/state: implement new trie prefetcher
core: make trie prefetcher deliver tries to statedb
core/state: refactor trie_prefetcher, export storage tries
blockchain: re-enable the next-block-prefetcher
state: remove panics in trie prefetcher
core/state/trie_prefetcher: address some review concerns
sq
2021-01-21 01:46:38 +02:00
Martin Holst Swende
93a89b2681
go.mod: use github.com/holiman/bloomfilter/v2 ( #22044 )
...
* deps: use improved bloom filter implementation
* eth/handler, trie: use 4 keys for syncbloom + minor fixes
* eth/protocols, trie: revert change on syncbloom method signature
2021-01-12 17:39:31 +01:00
meowsbits
23f837c388
cmd/utils: avoid making console preloads absolute ( #22109 )
...
Resolves https://github.com/etclabscore/core-geth/issues/273
jsre.JSRE already handles establishing preload
file paths relative to the 'assets' path (aka docroot),
where it joins the assets dir and the file path if relative,
or uses the file path only if absolute.
The duplication of this logic by MakeConsolePreloads
caused preloaded files to have paths which contained
duplicate references to the assets dir path.
Date: 2020-12-30 08:25:01-06:00
Signed-off-by: meows <b5c6@protonmail.com>
2021-01-12 15:50:11 +01:00
rene
984e752ce5
eth: return error from eth_chainID during sync before EIP-155 activates ( #21686 )
...
This changes the chainID RPC method to return an error when EIP-155 is not yet
active at the current block height. It used to simply return zero in this case, but
that's confusing.
2021-01-12 10:52:13 +01:00
rene
39b3b8ffb4
graphql: fix issue with unmarshalling int32 into Long
type #22153
2021-01-11 14:55:42 +01:00
Marius van der Wijden
49c2816d54
eth: improve log message ( #22146 )
...
* eth: fixed typos
* eth: fixed log message
2021-01-11 12:53:13 +01:00
Péter Szilágyi
79e2174e4d
Merge pull request #22157 from karalabe/prque-tests
...
common/prque: pull in tests and benchmarks from upstream
2021-01-11 10:52:46 +02:00
Péter Szilágyi
ab5e3f400f
common/prque: pull in tests and benchmarks from upstream
2021-01-11 10:31:03 +02:00
gary rong
5a1b384352
core: persist bad blocks ( #21827 )
...
* core: persist bad blocks
* core, eth, internal: address comments
* core/rawdb: add badblocks to inspector
* core, eth: update
* internal: revert
* core, eth: only save 10 bad blocks
* core/rawdb: address comments
* core/rawdb: fix
* core: address comments
2021-01-10 12:54:15 +01:00
Chris Ziogas
89030ec0b4
eth/downloader: fix race condition in tests ( #22140 )
...
* downloader: fix race condition in tests
* eth/downloader: fix race condition in tests
* Revert "downloader: fix race condition in tests"
This reverts commit 108033ebc6985de83791d375b6e6647a77d28d5a.
2021-01-09 17:29:19 +01:00
Marius van der Wijden
889f5645b5
ethclient: better test suite for ethclient package ( #22127 )
...
This commit extends the ethclient test suite and increases code coverage of the ethclient
package from ~15% to >55%. These tests act as early smoke tests to signal issues in the
RPC-interface. E.g. if a functionality like eth_chainId or eth_call breaks, the test
will break.
2021-01-08 21:29:25 +01:00
Martin Holst Swende
6b88ab75bc
cmd/faucet: fix nonce-gap problem ( #22145 )
...
* cmd/faucet: avoid encoding for each client
* cmd/faucet: fix flaw in clearing of txs, avoid sending more than necessary
* cmd/faucet: fix flaw in tx cropping
* cmd/faucet: revert change to not always send tx info
* cmd/faucet: review fixes
* cmd/faucet: revert #22018 , fix order in UI
* cmd/faucet: fix lock error
* cmd/faucet: revert json changes
* squashme
2021-01-08 12:17:15 +02:00
gary rong
165f53fc6e
les: remove transaction propagation limits ( #22125 )
2021-01-07 23:39:35 +01:00
Péter Szilágyi
d3952898c3
Merge pull request #22137 from karalabe/faucet-fb-fix
...
cmd/faucet: switch Facebook auth over to mobile site
2021-01-07 18:45:27 +02:00
Péter Szilágyi
3c6665e7d6
cmd/faucet: switch Facebook auth over to mobile site
2021-01-07 18:14:44 +02:00
Martin Holst Swende
4bb5c6ca7a
eth/protocols/snap: speed up hash checks ( #22023 )
...
* eth/protocols/snap: speed up hash checks
* eth/protocols/snap: nit fix
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-01-07 18:12:41 +02:00
Péter Szilágyi
38310f9022
Merge pull request #22136 from karalabe/faucet-websocket-fix
...
cmd/faucet: fix websocket race regression after switching to gorilla
2021-01-07 12:58:42 +02:00
Martin Holst Swende
58b9db5f7c
eth/protocols/snap: track reverts when peer rejects request ( #22016 )
...
* eth/protocols/snap: reschedule missed deliveries
* eth/protocols/snap: clarify log message
* eth/protocols/snap: revert failures async and update runloop
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2021-01-07 12:58:07 +02:00
Péter Szilágyi
44208d9258
cmd/faucet: fix websocket race regression after switching to gorilla
2021-01-07 10:23:50 +02:00
Péter Szilágyi
8bd8e1b24a
Merge pull request #22122 from karalabe/snapshot-polishes
...
cmd/utils, eth/downloader: minor snap nitpicks
2021-01-07 09:12:20 +02:00
Melvin Junhee Woo
d2e1b17f18
snapshot, trie: fixed typos, mostly in snapshot pkg ( #22133 )
2021-01-07 08:36:21 +02:00
rene
072fd96254
graphql: return decimal for estimateGas
and cumulativeGas
queries ( #22126 )
...
* estimateGas, cumulativeGas
* linted
* add test for estimateGas
2021-01-06 17:19:16 +01:00
Marius van der Wijden
d667ee2d10
crypto: fix ineffectual assignments ( #22124 )
...
* crypto/bls12381: fixed ineffectual assignment
* crypto/signify: fix ineffectual assignment
2021-01-06 13:06:44 +02:00
Péter Szilágyi
83d317cff9
cmd/utils, eth/downloader: minor snap nitpicks
2021-01-06 08:37:45 +02:00
jk-jeongkyun
618454214b
eth/downloader: enhanced test cases for downloader queue ( #22114 )
2021-01-05 14:56:01 +01:00
Marius van der Wijden
9ba306d47e
common/compiler: fix parsing of solc output with solidity v.0.8.0 ( #22092 )
...
Solidity 0.8.0 changes the way that output is marshalled. This patch allows to parse both
the legacy format used previously and the new format.
See also https://docs.soliditylang.org/en/breaking/080-breaking-changes.html#interface-changes
2021-01-05 14:48:22 +01:00
Marius van der Wijden
4714ce9430
cmd/geth: added --mainnet flag ( #21932 )
...
* cmd/geth: added --mainnet flag
* cmd/utils: set default genesis if --mainnet is specified
* cmd/utils: addressed comments
2021-01-05 14:31:23 +01:00
Antoine Toulme
eb2a1dfdd2
graphql: use a decimal representation for gas limit and gas used ( #21883 )
...
This changes the JSON encoding of blocks returned by the API
to have decimal instead of hexadecimal numbers. The spec wants
it this way.
Co-authored-by: Martin Holst Swende <martin@swende.se>
2021-01-05 11:22:32 +01:00
Guillaume Ballet
664903dc88
cmd/geth: usb is off by default ( #21984 )
2021-01-05 11:18:22 +01:00
Martin Holst Swende
9584f56b9d
miner: avoid sleeping in miner ( #22108 )
...
This PR removes a logic in the miner, which was originally intended to help temporary testnets based on ethash from "running off into the future". If the difficulty was low, and a few computers started mining several blocks per second, the ethash rules (which demand 1s delay between blocks) would push the blocktimes further and further away.
The solution was to make the miner sleep while this happened.
Nowadays, this problem is solved instead by PoA chains, and it's recommended to let testnets and devnets be based on clique instead. The existing logic is problematic, since it can cause stalls within the miner making it difficult for remote workers to submit work if the channel is blocked on a sleep.
Credits to Saar Tochner for reporting this via the bug bounty
2021-01-05 10:44:33 +01:00
Péter Szilágyi
6ada9f0f38
Merge pull request #22107 from karalabe/faucet-twitter
...
cmd: support v1.1 Twitter API in faucet, fix puppeth
2021-01-05 10:27:33 +02:00
Péter Szilágyi
e4571d8c12
cmd: support v1.1 Twitter API in faucet, fix puppeth
2021-01-04 14:13:21 +02:00
Suriyaa Sundararuban
1951e20d10
SECURITY.md: link to release page ( #22067 )
...
Add links to go-ethereum's GitHub release page.
Co-authored-by: Felix Lange <fjl@twurst.com>
2021-01-04 12:42:47 +01:00
rene
5c2a7ce2cc
node: rename startNetworking to openEndpoints ( #22105 )
2021-01-04 12:39:25 +01:00
Suriyaa Sundararuban
47820ef726
.github: Replace wiki links with new doc pages ( #22065 ) ( #22068 )
2021-01-04 11:58:51 +01:00
Vie
f83fc302a5
cmd/geth: update copyright year ( #22099 )
2021-01-04 11:52:23 +01:00
Melvin Junhee Woo
167ff563d1
core/state/snapshot: gethring -> gathering typo ( #22104 )
2021-01-04 10:07:43 +02:00
yumiel yoomee1313
0a3993c558
accounts/abi/bind: fix erroneous test ( #22053 )
...
closes #22049
2020-12-30 13:10:11 +01:00
ucwong
a425a47ddc
core/rawdb, eth/protocols : Method name typo fix ( #22026 )
2020-12-27 22:38:16 +01:00
Suriyaa Sundararuban
c17a7733df
docs: replace wiki links with new doc pages in readme.md ( #22065 ) ( #22066 )
2020-12-27 22:28:08 +01:00
jk-jeongkyun
653e8b9dd9
eth/downloader: remove unnecessary condition ( #22052 )
2020-12-27 22:26:42 +01:00
Suriyaa Sundararuban
ab0979f930
signer: docs - replace wiki links with new doc pages ( #22069 )
2020-12-27 22:18:57 +01:00
Suriyaa Sundararuban
0a09a39325
eth/filters: replace wiki links with new doc pages ( #22070 )
2020-12-27 22:09:05 +01:00
Suriyaa Sundararuban
2f8100615a
cmd/geth: replace wiki links with new doc pages ( #22071 )
2020-12-27 22:01:28 +01:00
Martin Holst Swende
b13e9c4e3d
tests/fuzzers: fix false positive in bitutil fuzzer ( #22076 )
2020-12-27 21:58:39 +01:00
Sina Mahmoodi
9c6b5b904a
eth, eth/tracers: include intrinsic gas in calltracer, expose for all tracers ( #22038 )
...
* eth/tracers: share tx gas price with js tracer
* eth/tracers: use `go generate`
* eth/tracers: try with another version of go-bindata
* eth/tracers: export txGas
* eth, eth/tracers: pass intrinsic gas to js tracers
eth/tracers: include tx gas in tracers usedGas
eth/tracers: fix prestate tracer's sender balance
eth/tracers: rm unnecessary import
eth/tracers: pass intrinsicGas separately to tracer
eth/tracers: fix tests broken by lack of txdata
eth, eth/tracers: minor fix
* eth/tracers: regenerate assets + unexport test-struct + add testcase
* eth/tracers: simplify tests + make table-driven
Co-authored-by: Guillaume Ballet <gballet@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-12-27 21:57:19 +01:00
Timo Tijhof
25c0bd9b43
README.md: update Travis badge ( #22079 )
...
The legacy dot-org URL was displaying a message about the repository
having migrated to the dot-com service, which now covers open-source
projects as well.
2020-12-27 18:56:50 +01:00
Martin Holst Swende
b9012a039b
common,crypto: move fuzzers out of core ( #22029 )
...
* common,crypto: move fuzzers out of core
* fuzzers: move vm fuzzer out from core
* fuzzing: rework cover package logic
* fuzzers: lint
2020-12-23 17:44:45 +01:00
Marius van der Wijden
158f72cc0c
internal/ethapi: restore net_version RPC method ( #22061 )
...
During the snap and eth refactor, the net_version rpc call was falsely deprecated.
This restores the net_version RPC handler as most eth2 nodes and other software
depend on it.
2020-12-23 13:43:22 +01:00
ucwong
61469cfeaf
eth/downloader: fix typo in comment ( #22019 )
2020-12-21 15:39:58 +01:00