Commit Graph

12441 Commits

Author SHA1 Message Date
Igor Mandrigin
9cc5690483 fix downloader tests 2020-08-15 20:32:50 +02:00
Igor Mandrigin
201524c33e fix node tests 2020-08-15 20:21:30 +02:00
Igor Mandrigin
43af021083 fix compilation of remote_reader 2020-08-15 20:00:25 +02:00
Igor Mandrigin
d6fe697ee1 fixups. make geth successful 2020-08-15 19:32:05 +02:00
Igor Mandrigin
9da7a7c608 fixez 2020-08-15 17:30:34 +02:00
Igor Mandrigin
b8a984a59e fixups 2020-08-14 18:03:20 +02:00
Igor Mandrigin
1b87c6aa85 fixups 2020-08-14 17:55:47 +02:00
Igor Mandrigin
3ba734f657 fixups 2020-08-14 17:43:48 +02:00
Igor Mandrigin
a06f7b2d9e fixups 2020-08-14 17:05:15 +02:00
Igor Mandrigin
cd5ebf17a2 remove to-merge 2020-08-14 16:50:04 +02:00
Péter Szilágyi
31cd3e7a92 params: update CHTs for v1.9.19 2020-08-14 16:49:50 +02:00
Martin Holst Swende
50c8f5349e tests: add Berlin-definition identical to YOLOv1 (#21435) 2020-08-14 16:49:42 +02:00
Péter Szilágyi
9248f48a6d ethstats: split read and write lock, otherwise they'll lock up 2020-08-14 16:49:25 +02:00
Martin Holst Swende
34a708e399 eth/downloader: allow all timers to exit
# Conflicts:
#	eth/downloader/statesync.go
2020-08-14 16:49:17 +02:00
Martin Holst Swende
168f6b1bcb eth/downloader: set deliverytime on drops and timeouts too
# Conflicts:
#	eth/downloader/statesync.go
2020-08-14 16:48:58 +02:00
gary rong
259417e9e2 les: close all connected les-server when shutdown (#21426)
* les: close all connected les-server when shutdown

* les: linter nitpick

Co-authored-by: Martin Holst Swende <martin@swende.se>
# Conflicts:
#	les/peer.go
#	les/server.go
#	les/server_handler.go
2020-08-14 16:48:31 +02:00
Martin Holst Swende
3c92222d6c ethstats: overwrite old errors 2020-08-14 16:48:08 +02:00
Péter Szilágyi
bfe9c2eba3 eth/downloader: save the correct delivery time for state sync
# Conflicts:
#	eth/downloader/statesync.go
2020-08-14 16:48:02 +02:00
Martin Holst Swende
63758607ee les: update checktime even if check fails
# Conflicts:
#	les/checkpointoracle/oracle.go
2020-08-14 16:47:11 +02:00
Péter Szilágyi
abb1eccdf8 cmd/utils: grant snapshot cache to trie if disabled (#21416)
* cmd/utils: grant snapshot cache to trie if disabled

* eth: fix up default non-mainnet cache distribution
# Conflicts:
#	cmd/utils/flags.go
#	eth/config.go
2020-08-14 16:43:48 +02:00
timcooijmans
9e79642dfe eth: use maxQueuedTxAnns for to limit the number of transactions announced (#21419) 2020-08-14 16:42:00 +02:00
rene
070ac53df0 cmd/geth: fixes db unavailability for chain commands (#21415)
* chaincmd should make config nodes instead of full nodes

* add documentation for using makeConfigNode instead of makeFullNode;

* add documentation to functions

* code style
# Conflicts:
#	cmd/geth/config.go
2020-08-14 16:40:47 +02:00
rene
c5b9e50bd5 cmd/geth: fix import / export issues related to DB unavailability (#21414)
* should fix import / export issues related to DB unavailability

* document reason for makeConfigNode

* fix comment

* comment consistency

* remove comments

* lint
2020-08-14 16:39:30 +02:00
rene
b03de86a5c downloader: add eth65 tests (#21383)
* eth65 tests

linted

* remove non-latest eth light tests
# Conflicts:
#	eth/downloader/downloader_test.go
2020-08-14 16:39:16 +02:00
Robert Zaremba
dbbfbf0ec2 core: use errors.Is for consensus errors check (#21095)
# Conflicts:
#	core/blockchain.go
2020-08-14 16:37:40 +02:00
Felix Lange
077ae224bd p2p/nat: limit UPNP request concurrency (#21390)
This adds a lock around requests because some routers can't handle
concurrent requests. Requests are also rate-limited.
 
The Map function request a new mapping exactly when the map timeout
occurs instead of 5 minutes earlier. This should prevent duplicate mappings.
2020-08-14 16:36:03 +02:00
Martin Holst Swende
9393ba7d8f core/vm: avoid map lookups for accessing jumpdest analysis
# Conflicts:
#	core/vm/contract.go
2020-08-14 16:35:53 +02:00
Martin Holst Swende
d29a3c86b4 ethstats: avoid concurrent write on websocket (#21404)
Fixes #21403
2020-08-14 16:34:38 +02:00
Hao Duan
44d9fba09a core: avoid modification of accountSet cache in tx_pool (#21159)
* core: avoid modification of accountSet cache in tx_pool

when runReorg, we may copy the dirtyAccounts' accountSet cache to promoteAddrs
in which accounts will be promoted, however, if we have reset request at the
same time, we may reuse promoteAddrs and modify the cache content which is
against the original intention of accountSet cache. So, we need to make a new
slice here to avoid modify accountSet cache.

* core: fix flatten condition + comment

Co-authored-by: Felix Lange <fjl@twurst.com>
2020-08-14 16:34:29 +02:00
Adam Schmideg
8e4c7d8e5e cmd/devp2p: print enode:// URL in enrdump (#21270)
Co-authored-by: Felix Lange <fjl@twurst.com>
2020-08-14 16:34:20 +02:00
Natsu Kagami
9471cc81a5 signer: EIP 712, parse bytes and bytesX as hex strings + correct padding (#21307)
* Handle hex strings for bytesX types

* Add tests for parseBytes

* Improve tests

* Return nil bytes if error is non-nil

* Right-pad instead of left-pad bytes

* More tests
2020-08-14 16:34:13 +02:00
rene
fe1bb62bad node: refactor package node (#21105)
This PR significantly changes the APIs for instantiating Ethereum nodes in
a Go program. The new APIs are not backwards-compatible, but we feel that
this is made up for by the much simpler way of registering services on
node.Node. You can find more information and rationale in the design
document: https://gist.github.com/renaynay/5bec2de19fde66f4d04c535fd24f0775.

There is also a new feature in Node's Go API: it is now possible to
register arbitrary handlers on the user-facing HTTP server. In geth, this
facility is used to enable GraphQL.

There is a single minor change relevant for geth users in this PR: The
GraphQL API is no longer available separately from the JSON-RPC HTTP
server. If you want GraphQL, you need to enable it using the
./geth --http --graphql flag combination.

The --graphql.port and --graphql.addr flags are no longer available.

# Conflicts:
#	cmd/faucet/faucet.go
#	cmd/geth/chaincmd.go
#	cmd/geth/config.go
#	cmd/geth/consolecmd.go
#	cmd/geth/main.go
#	cmd/utils/flags.go
#	cmd/wnode/main.go
#	core/rawdb/freezer.go
#	eth/api_backend.go
#	eth/backend.go
#	ethclient/ethclient_test.go
#	ethstats/ethstats.go
#	graphql/service.go
#	internal/ethapi/backend.go
#	les/api_backend.go
#	les/api_test.go
#	les/checkpointoracle/oracle.go
#	les/client.go
#	les/commons.go
#	les/server.go
#	miner/stresstest/stress_clique.go
#	miner/stresstest/stress_ethash.go
#	mobile/geth.go
#	node/api.go
#	node/node.go
#	node/node_example_test.go
#	node/node_test.go
#	node/rpcstack.go
#	node/rpcstack_test.go
#	node/service.go
#	node/service_test.go
#	node/utils_test.go
#	p2p/simulations/examples/ping-pong.go
#	p2p/testing/peerpool.go
#	p2p/testing/protocolsession.go
#	p2p/testing/protocoltester.go
#	whisper/mailserver/server_test.go
#	whisper/whisperv6/api_test.go
#	whisper/whisperv6/filter_test.go
#	whisper/whisperv6/whisper.go
#	whisper/whisperv6/whisper_test.go
2020-08-14 16:33:59 +02:00
Natsu Kagami
8d68d97cad signer/core: EIP-712 encoded data should not reject a Domain without a ChainId (#21306)
* Do not check for a non-nil ChainId

* Add encoding test
2020-08-12 12:44:35 +02:00
rene
c8a22675cb rpc: add SetHeader method to Client (#21392)
Resolves #20163

Co-authored-by: Felix Lange <fjl@twurst.com>
2020-08-12 12:44:28 +02:00
Felix Lange
130a41fcf9 rpc: remove silly use of ReadVarint in subscription ID generator (#21391)
Found by @protolambda
2020-08-12 12:44:18 +02:00
meowsbits
cc96d9c854 core/rawdb: convert some comments to godoc convention (#21384)
# Conflicts:
#	core/rawdb/freezer.go
2020-08-12 12:44:11 +02:00
ucwong
9cf277a175 core/bloombits: use single channel for shutdown (#20878)
This replaces the two-stage shutdown scheme with the one we
use almost everywhere else: a single quit channel signalling
termination.

Co-authored-by: Felix Lange <fjl@twurst.com>
2020-08-12 12:43:50 +02:00
Julian Y
6c794b8a83 build: use -trimpath flag when building executables (#21374)
* Disable symbol table and DWARF generation by default.
Trimpath if compiling with Go >= 1.13

* Set Go to minimum version 1.13. Revert debug symbol changes.
# Conflicts:
#	build/ci.go
2020-08-12 12:43:39 +02:00
rene
018cfd0b6d eth/downloader: remove eth62 (#21378)
* init

notes

removed some mentions of eth62, bumped protocol err too old to >=63

* remove sanity checks and bump supported protocol version up to 63

* remove 62 tests, still need to add 65

* remove 65 tests
# Conflicts:
#	eth/downloader/downloader_test.go
#	eth/downloader/peer.go
2020-08-12 12:42:36 +02:00
gary rong
2ea72daf4f les: fix unittest (#21382)
# Conflicts:
#	les/fetcher_test.go
2020-08-12 12:37:52 +02:00
Robert Zaremba
c0b3645c8d miner: refactor helper functions in worker.go (#21044)
This reduces complexity of some lengthy functions in worker.go,
making the code easier to read.
# Conflicts:
#	miner/worker.go
2020-08-12 12:36:09 +02:00
gary rong
09753dff15 les: implement new les fetcher (#20692)
* cmd, consensus, eth, les: implement light fetcher

* les: address comment

* les: address comment

* les: address comments

* les: check td after delivery

* les: add linearExpiredValue for error counter

* les: fix import

* les: fix dead lock

* les: order announces by td

* les: encapsulate invalid counter

* les: address comment

* les: add more checks during the delivery

* les: fix log

* eth, les: fix lint

* eth/fetcher: address comment
# Conflicts:
#	cmd/geth/retesteth.go
#	consensus/clique/clique.go
#	consensus/consensus.go
#	consensus/ethash/consensus.go
#	consensus/ethash/sealer.go
#	eth/fetcher/block_fetcher.go
#	eth/fetcher/block_fetcher_test.go
#	eth/handler.go
#	les/client.go
#	les/client_handler.go
#	les/clientpool.go
#	les/fetcher.go
#	les/odr_test.go
#	les/peer.go
#	les/server.go
#	les/server_handler.go
#	les/test_helper.go
#	les/utils/expiredvalue.go
#	les/utils/expiredvalue_test.go
2020-08-12 12:22:51 +02:00
Péter Szilágyi
0933e1621c core: API-less transaction time sorting
# Conflicts:
#	core/types/transaction.go
#	core/types/transaction_test.go
2020-08-12 12:05:10 +02:00
Hendrik Hofstadt
f8993938b4 core: sort txs at the same gas price by received time
# Conflicts:
#	core/types/transaction.go
#	core/types/transaction_test.go
2020-08-12 12:03:23 +02:00
gary rong
1bc2bef061 cmd, core, eth, light, trie: dump clean cache periodically (#20391)
* cmd, core, eth, light, trie: dump clean cache periodically

* eth: update config

* trie: minor fix

* core, trie: address comments

* eth: remove useless

* trie: print clean cache dump start too

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
# Conflicts:
#	core/blockchain.go
#	core/genesis.go
#	core/state/database.go
#	eth/api_tracer.go
#	eth/backend.go
#	eth/config.go
#	light/postprocess.go
#	trie/database.go
2020-08-12 12:01:13 +02:00
6543
9cd060045d signer/storage: fix a badly ordered error check (#21379)
# Conflicts:
#	cmd/faucet/faucet.html
2020-08-12 11:49:58 +02:00
Igor Mandrigin
7e506617f0 to-merge 2020-08-12 11:49:22 +02:00
Alex Sharov
16f09be0a8
add method .Last() (#909) 2020-08-12 10:49:52 +07:00
Alex Sharov
760fe0f0b6
DupSort of hash state (#896) 2020-08-12 09:57:55 +07:00
Evgeny Danilenko
3980fa7d45
Grps eth_sendTransaction (#882)
* implementation

* tidy gomod

* linters

* fix cmd test

* fix

* fix lint
2020-08-11 22:09:30 +01:00