Commit Graph

13270 Commits

Author SHA1 Message Date
meowsbits
b82525b79b 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-03-09 10:33:36 +01:00
rene
a12aeca94b 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-03-09 10:33:28 +01:00
rene
8af432b89e graphql: fix issue with unmarshalling int32 into Long type #22153 2021-03-09 10:33:20 +01:00
Marius van der Wijden
993d973de4 eth: improve log message (#22146)
* eth: fixed typos

* eth: fixed log message
2021-03-09 10:32:29 +01:00
Péter Szilágyi
7b7969408d common/prque: pull in tests and benchmarks from upstream 2021-03-09 10:32:21 +01:00
gary rong
df56644121 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
# Conflicts:
#	core/blockchain.go
#	core/rawdb/accessors_chain_test.go
#	core/rawdb/database.go
#	core/rawdb/schema.go
2021-03-09 10:31:26 +01:00
Chris Ziogas
07503e3d11 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-03-09 10:26:12 +01:00
Marius van der Wijden
867df20910 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.
# Conflicts:
#	ethclient/ethclient_test.go
2021-03-09 10:26:10 +01:00
Martin Holst Swende
332d481ebe 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
# Conflicts:
#	cmd/faucet/faucet.go
#	cmd/faucet/faucet.html
2021-03-09 10:24:39 +01:00
gary rong
83471766f3 les: remove transaction propagation limits (#22125)
# Conflicts:
#	les/txrelay.go
2021-03-09 10:24:22 +01:00
Péter Szilágyi
736a88c9c1 cmd/faucet: switch Facebook auth over to mobile site
# Conflicts:
#	cmd/faucet/faucet.go
2021-03-09 10:24:05 +01:00
Martin Holst Swende
ec6741bab0 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-03-09 10:23:30 +01:00
Martin Holst Swende
b128d8aeea 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-03-09 10:23:19 +01:00
Péter Szilágyi
608b052481 cmd/faucet: fix websocket race regression after switching to gorilla
# Conflicts:
#	cmd/faucet/faucet.go
2021-03-09 10:23:07 +01:00
Melvin Junhee Woo
deb2dff0bc snapshot, trie: fixed typos, mostly in snapshot pkg (#22133)
# Conflicts:
#	core/state/snapshot/conversion.go
#	core/state/snapshot/difflayer.go
#	core/state/snapshot/difflayer_test.go
#	core/state/snapshot/disklayer.go
#	core/state/snapshot/disklayer_test.go
#	core/state/snapshot/iterator.go
#	core/state/snapshot/iterator_binary.go
#	core/state/snapshot/iterator_fast.go
#	core/state/snapshot/snapshot.go
#	turbo/trie/database.go
2021-03-09 10:22:48 +01:00
rene
49f677bc1d graphql: return decimal for estimateGas and cumulativeGas queries (#22126)
* estimateGas, cumulativeGas
* linted
* add test for estimateGas
2021-03-09 10:22:24 +01:00
Marius van der Wijden
9f29fe3ea3 crypto: fix ineffectual assignments (#22124)
* crypto/bls12381: fixed ineffectual assignment

* crypto/signify: fix ineffectual assignment
2021-03-09 10:22:15 +01:00
Péter Szilágyi
a50f261e87 cmd/utils, eth/downloader: minor snap nitpicks 2021-03-09 10:22:04 +01:00
jk-jeongkyun
18852aa9b3 eth/downloader: enhanced test cases for downloader queue (#22114)
# Conflicts:
#	eth/downloader/queue_test.go
2021-03-09 10:21:52 +01:00
Marius van der Wijden
8d6f77a735 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-03-09 10:18:03 +01:00
Marius van der Wijden
78213e6c0e cmd/geth: added --mainnet flag (#21932)
* cmd/geth: added --mainnet flag

* cmd/utils: set default genesis if --mainnet is specified

* cmd/utils: addressed comments
# Conflicts:
#	cmd/geth/chaincmd.go
#	cmd/geth/main.go
#	cmd/geth/usage.go
#	cmd/utils/flags.go
2021-03-09 10:17:55 +01:00
Antoine Toulme
886d2a4780 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>
# Conflicts:
#	graphql/graphql_test.go
2021-03-09 10:17:02 +01:00
Guillaume Ballet
f50f13d70c cmd/geth: usb is off by default (#21984)
# Conflicts:
#	cmd/geth/main.go
#	cmd/geth/usage.go
2021-03-09 10:16:32 +01:00
Martin Holst Swende
20413ad716 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
# Conflicts:
#	miner/worker.go
2021-03-09 10:15:27 +01:00
Péter Szilágyi
7b9565fe10 cmd: support v1.1 Twitter API in faucet, fix puppeth
# Conflicts:
#	cmd/faucet/faucet.go
2021-03-09 10:14:38 +01:00
Suriyaa Sundararuban
9e08f7759f 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-03-09 10:14:23 +01:00
rene
b734ae5e54 node: rename startNetworking to openEndpoints (#22105) 2021-03-09 10:14:13 +01:00
Vie
767a37fbeb cmd/geth: update copyright year (#22099)
# Conflicts:
#	cmd/geth/main.go
2021-03-09 10:14:06 +01:00
Melvin Junhee Woo
0699dae18a core/state/snapshot: gethring -> gathering typo (#22104)
# Conflicts:
#	core/state/snapshot/generate.go
2021-03-09 10:13:46 +01:00
yumiel yoomee1313
830b77785c accounts/abi/bind: fix erroneous test (#22053)
closes #22049
2021-03-09 10:13:28 +01:00
ucwong
c288146cdc core/rawdb, eth/protocols : Method name typo fix (#22026)
# Conflicts:
#	core/rawdb/accessors_snapshot.go
2021-03-09 10:13:21 +01:00
Suriyaa Sundararuban
225c409584 docs: replace wiki links with new doc pages in readme.md (#22065) (#22066)
# Conflicts:
#	README.md
2021-03-09 10:12:59 +01:00
jk-jeongkyun
b3e18e483d eth/downloader: remove unnecessary condition (#22052) 2021-03-09 10:12:43 +01:00
Suriyaa Sundararuban
f9493d9cc3 signer: docs - replace wiki links with new doc pages (#22069) 2021-03-09 10:12:35 +01:00
Suriyaa Sundararuban
320d7d9130 eth/filters: replace wiki links with new doc pages (#22070) 2021-03-09 10:12:26 +01:00
Suriyaa Sundararuban
6a49a3aa94 cmd/geth: replace wiki links with new doc pages (#22071)
# Conflicts:
#	cmd/geth/consolecmd.go
2021-03-09 10:12:18 +01:00
Martin Holst Swende
1b967fc04a tests/fuzzers: fix false positive in bitutil fuzzer (#22076) 2021-03-09 10:12:04 +01:00
Sina Mahmoodi
0907f5badc 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>
# Conflicts:
#	eth/tracers/tracer.go
#	eth/tracers/tracer_test.go
2021-03-09 10:11:49 +01:00
Timo Tijhof
5e3d81b51f 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.
# Conflicts:
#	README.md
2021-03-09 10:06:20 +01:00
Martin Holst Swende
5d418f317b 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
2021-03-09 10:06:00 +01:00
Marius van der Wijden
9c22ecdeb8 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.
# Conflicts:
#	eth/backend.go
#	les/client.go
2021-03-09 10:05:52 +01:00
ucwong
cf4c99c435 eth/downloader: fix typo in comment (#22019)
# Conflicts:
#	eth/downloader/modes.go
2021-03-09 10:04:57 +01:00
ucwong
193e8c98c7 eth/download/statesync : optimize to avoid a copy in state sync hashing (#22035)
* eth/download/statesync : state hash sum optimized

* go fmt with blank in imports

* keccak read arg fix
# Conflicts:
#	eth/downloader/statesync.go
2021-03-09 10:04:35 +01:00
Marius van der Wijden
97ddda04d8 cmd/faucet: sort requests by newest first (#22018)
# Conflicts:
#	cmd/faucet/faucet.go
2021-03-09 10:04:17 +01:00
Felföldi Zsolt
717e68a4a3 les: les/4 minimalistic version (#21909)
* les: allow tx unindexing in les/4 light server mode

* les: minor fixes

* les: more small fixes

* les: add meaningful constants for recentTxIndex handshake field
# Conflicts:
#	cmd/utils/flags.go
#	les/odr_requests.go
#	les/peer.go
#	les/protocol.go
2021-03-09 10:03:58 +01:00
Martin Holst Swende
7fc779e29f eth, core: speed up some tests (#22000) 2021-03-09 10:03:01 +01:00
Mr-Leshiy
8e872c1188 eth/protocols/eth: remove magic numbers in test (#21999) 2021-03-09 10:02:53 +01:00
Marius van der Wijden
e9386f34f6 cmd/geth: fixed parallelization flaw in account import test (#22002)
# Conflicts:
#	cmd/geth/accountcmd_test.go
2021-03-09 10:02:45 +01:00
Péter Szilágyi
693459073e core, eth: split eth package, implement snap protocol (#21482)
This commit splits the eth package, separating the handling of eth and snap protocols. It also includes the capability to run snap sync (https://github.com/ethereum/devp2p/blob/master/caps/snap.md) , but does not enable it by default.

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Martin Holst Swende <martin@swende.se>
# Conflicts:
#	cmd/geth/misccmd.go
#	cmd/utils/flags.go
#	core/blockchain.go
#	core/blockchain_snapshot_test.go
#	core/forkid/forkid.go
#	core/rawdb/accessors_snapshot.go
#	core/rawdb/schema.go
#	core/state/snapshot/generate.go
#	core/state/statedb.go
#	eth/api_test.go
#	eth/backend.go
#	eth/downloader/downloader.go
#	eth/downloader/downloader_test.go
#	eth/downloader/modes.go
#	eth/downloader/queue.go
#	eth/downloader/statesync.go
#	eth/gen_config.go
#	eth/handler.go
#	eth/handler_test.go
#	eth/helper_test.go
#	eth/peer.go
#	eth/protocol.go
#	eth/protocol_test.go
#	eth/sync.go
#	eth/sync_test.go
#	ethstats/ethstats.go
#	les/client.go
#	les/enr_entry.go
#	les/handler_test.go
#	les/peer.go
#	les/server_handler.go
#	tests/block_test_util.go
#	trie/proof.go
#	trie/proof_test.go
#	trie/trie.go
#	turbo/trie/notary.go
#	turbo/trie/sync_bloom.go
2021-03-08 17:07:38 +01:00
Shiming
2dfac7aedb cmd/abigen: clarify abigen alias flag usage (#21875)
* doc: clarify abigen alias flag usage

update the `abigen --alias` flag help info, give an example to make it more clear

related issue: https://github.com/ethereum/go-ethereum/issues/21846

* Update cmd/abigen/main.go

Co-authored-by: ligi <ligi@ligi.de>

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: ligi <ligi@ligi.de>
2021-03-08 14:39:15 +01:00