Commit Graph

12423 Commits

Author SHA1 Message Date
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
ledgerwatch
6f88e4058f
Fix (#908) 2020-08-11 20:48:37 +01:00
Alex Sharov
6de7eb1bec
correct_thread_lock_on_non_managed_tx (#905) 2020-08-11 18:53:47 +07:00
Alex Sharov
7addf34f64
fix wrong merge (#907) 2020-08-11 18:24:39 +07:00
Alex Sharov
088bb58023
Migrations validation: duplicate names and commit call (#902) 2020-08-11 18:23:41 +07:00
Alex Sharov
3899f2defe
recover_from_hashstate_stage_interruption (#903) 2020-08-11 17:41:06 +07:00
Alex Sharov
6df97dec22
save progress (#886) 2020-08-11 17:36:29 +07:00
Alex Sharov
e89ad5d6aa
sub tx support (#895) 2020-08-11 17:35:59 +07:00
Alex Sharov
695f8f8904
allow multi-rollback (#904) 2020-08-11 17:35:19 +07:00
ledgerwatch
381f721f01
Update skip analysis block number for mainnet (#906) 2020-08-11 11:23:07 +01:00
alex.sharov
94c3b4bb05 gitignore python tmp files 2020-08-11 09:28:14 +07:00
Alex Sharov
d9d9e14f45
change bucket type to string (#894) 2020-08-11 06:55:32 +07:00
Alex Sharov
7a1b892022
remove .SeekTo() method (#901) 2020-08-11 06:41:15 +07:00
Alex Sharov
091819a51c
adopt --metrics.addr flag in integration (#889) 2020-08-11 06:38:34 +07:00
Alex Sharov
6c0ff33366
integration: clear unwind stack (#890) 2020-08-11 06:38:19 +07:00
Giulio rebuffo
057894994d
add blockhashes stage (#862)
* add blockhashes stage

* unwindOrder specified

* fixed typo

* added common.copybytes

* fixed little typo

* better progress

* better progress

* refactoring with etl

* added blockhashes to disabled stages in cmd/integration

* added migraations

* fixed go.mod

* better migrations

* rename unwind

* simplified migrations

* added onloadcommit
2020-08-10 18:46:06 +01:00
Alex Sharov
81c487803e
add python docs (#900) 2020-08-10 16:36:46 +07:00
Alex Sharov
5c75003456
fix migration idempotency (#898) 2020-08-10 16:16:14 +07:00
Alex Sharov
115cc7d736
use transactional putter (#893) 2020-08-10 14:28:38 +07:00