Commit Graph

13607 Commits

Author SHA1 Message Date
alex.sharov
673854a33e add mdbX_drop cli tool 2021-03-14 16:52:14 +07:00
alex.sharov
379db39382 add mdbX_drop cli tool 2021-03-14 16:24:59 +07:00
alex.sharov
d899c2ed9e add mdbX_drop cli tool 2021-03-14 16:22:32 +07:00
Alexey Sharp
519b19f8aa Compilation fixes 2021-03-14 08:00:37 +00:00
Alex Sharov
3f305673aa
Trie: add invariant - first level of trie must be in DB (to ensure having 100% trie structure in trie_account table) (#1522) 2021-03-13 09:30:54 +07:00
Péter Szilágyi
a0cb39c462 params: release Geth v1.10.1
# Conflicts:
#	params/version.go
2021-03-12 16:14:55 +01:00
Martin Holst Swende
626fb623c1 tests: update reference tests with 2315 removed from Berlin
# Conflicts:
#	tests/testdata
2021-03-12 16:14:33 +01:00
Péter Szilágyi
f40af4fa03 build: add support for Ubuntu Hirsute Hippo
# Conflicts:
#	build/ci.go
2021-03-12 16:13:12 +01:00
Péter Szilágyi
2daf634660 build: fix PPA failure due to updated debsrc
# Conflicts:
#	build/ci.go
2021-03-12 16:12:54 +01:00
Péter Szilágyi
7f776be26e Revert "core/forkid, params: unset Berlin fork number (#22413)"
This reverts commit ba999105ef89473cfe39e5e53354f7099e67a290.
2021-03-12 16:12:40 +01:00
Felix Lange
c4c9d8174d params: begin v1.10.1 release cycle
# Conflicts:
#	params/version.go
2021-03-12 16:12:32 +01:00
Felix Lange
e6355917ca params: release geth 1.10.0 stable
# Conflicts:
#	params/version.go
2021-03-12 16:12:19 +01:00
Marius van der Wijden
b0a80872fb tests: update to latest tests (#22290)
This updates the consensus tests to commit 31d6630 and
adds support for access list transactions in the test runner.

Co-authored-by: Martin Holst Swende <martin@swende.se>
# Conflicts:
#	tests/block_test.go
#	tests/gen_sttransaction.go
#	tests/state_test_util.go
2021-03-12 16:12:04 +01:00
gary rong
81e1eb78c5 cmd: retire whisper flags (#22421)
* cmd: retire whisper flags

* cmd/geth: remove whisper configs
# Conflicts:
#	cmd/geth/config.go
#	cmd/geth/consolecmd.go
#	cmd/geth/main.go
#	cmd/geth/usage.go
#	cmd/utils/flags.go
2021-03-12 16:10:42 +01:00
Felföldi Zsolt
d6df27aa6c les: fix nodiscover option on the client side (#22422)
# Conflicts:
#	les/client.go
#	les/vflux/client/serverpool.go
#	les/vflux/client/serverpool_test.go
2021-03-12 16:09:33 +01:00
Péter Szilágyi
9ef50edea3 core/forkid, params: unset Berlin fork number (#22413) 2021-03-12 16:09:19 +01:00
gary rong
926bc2dd85 cmd/utils: fix txlookuplimit for archive node (#22419)
* cmd/utils: fix exclusive check for archive node

* cmd/utils: set the txlookuplimit to 0
# Conflicts:
#	cmd/utils/flags.go
2021-03-12 16:09:11 +01:00
gary rong
8e959c0d01 params: update chts (#22418) 2021-03-12 16:08:29 +01:00
Marius van der Wijden
68a41cdeb8 cmd/geth: put allowUnsecureTx flag in RPC section (#22412)
# Conflicts:
#	cmd/geth/usage.go
2021-03-12 16:08:22 +01:00
Péter Szilágyi
03eafd8580 core/vm/runtime: more unshipping
# Conflicts:
#	core/vm/runtime/runtime_test.go
2021-03-12 16:08:00 +01:00
Péter Szilágyi
d00a121246 core, eth: unship EIP 2315
# Conflicts:
#	core/vm/contract.go
#	core/vm/gen_structlog.go
#	core/vm/instructions.go
#	core/vm/instructions_test.go
#	core/vm/interpreter.go
#	core/vm/logger.go
#	core/vm/logger_json.go
#	core/vm/logger_test.go
#	core/vm/stack/stack.go
#	eth/tracers/tracer.go
#	eth/tracers/tracer_test.go
2021-03-12 16:05:37 +01:00
gary rong
a9fb6bd2b0 core/rawdb: fix the transaction indexer (#22395)
# Conflicts:
#	core/rawdb/chain_iterator.go
2021-03-12 15:53:21 +01:00
Felföldi Zsolt
e3f0782057 les: UDP pre-negotiation of available server capacity (#22183)
This PR implements the first one of the "lespay" UDP queries which
is already useful in itself: the capacity query. The server pool is making
use of this query by doing a cheap UDP query to determine whether it is
worth starting the more expensive TCP connection process.
# Conflicts:
#	les/client.go
#	les/clientpool.go
#	les/clientpool_test.go
#	les/enr_entry.go
#	les/server.go
#	les/vflux/client/serverpool.go
#	les/vflux/client/serverpool_test.go
#	les/vflux/server/balance.go
#	les/vflux/server/balance_test.go
#	les/vflux/server/prioritypool.go
#	les/vflux/server/prioritypool_test.go
#	p2p/nodestate/nodestate.go
2021-03-12 15:53:04 +01:00
Martin Holst Swende
d85afb7d20 core/state: fix eta calculation on pruning (#22386) 2021-03-12 15:52:25 +01:00
Marius van der Wijden
e052d8e268 accounts/keystore: use github.com/google/uuid (#22217)
This replaces the github.com/pborman/uuid dependency with
github.com/google/uuid because the former is only a wrapper for
the latter (since v1.0.0).

Co-authored-by: Felix Lange <fjl@twurst.com>
# Conflicts:
#	accounts/keystore/key.go
#	accounts/keystore/passphrase.go
#	accounts/keystore/presale.go
#	cmd/ethkey/generate.go
#	go.mod
#	go.sum
2021-03-12 15:52:15 +01:00
Felix Lange
e4fb882c98 rpc: add separate size limit for websocket (#22385)
This makes the WebSocket message size limit independent of the
limit used for HTTP requests. The new limit for WebSocket messages 
is 15MB.
2021-03-12 15:50:22 +01:00
Péter Szilágyi
d23002e76a all: define Berlin hard fork spec
# Conflicts:
#	cmd/geth/config.go
#	cmd/geth/main.go
#	core/genesis.go
#	core/state_transition.go
#	core/vm/evm.go
#	core/vm/interpreter.go
#	eth/backend.go
#	eth/ethconfig/config.go
#	les/client.go
#	light/txpool.go
#	tests/state_test_util.go
2021-03-12 15:50:09 +01:00
Felföldi Zsolt
d785b18d0f les: move server pool to les/vflux/client (#22377)
* les: move serverPool to les/vflux/client

* les: add metrics

* les: moved ValueTracker inside ServerPool

* les: protect against node registration before server pool is started

* les/vflux/client: fixed tests

* les: make peer registration safe
# Conflicts:
#	les/client.go
#	les/client_handler.go
#	les/peer.go
#	les/vflux/client/queueiterator_test.go
#	les/vflux/client/serverpool.go
#	les/vflux/client/serverpool_test.go
#	les/vflux/client/valuetracker.go
#	les/vflux/client/valuetracker_test.go
2021-03-12 15:41:13 +01:00
rene
ba494be5a9 cmd/devp2p: add eth66 test suite (#22363)
Co-authored-by: Martin Holst Swende <martin@swende.se>
# Conflicts:
#	go.mod
2021-03-12 15:40:44 +01:00
lightclient
50d975302d all: add support for EIP-2718, EIP-2930 transactions (#21502)
This adds support for EIP-2718 typed transactions as well as EIP-2930
access list transactions (tx type 1). These EIPs are scheduled for the
Berlin fork.

There very few changes to existing APIs in core/types, and several new APIs
to deal with access list transactions. In particular, there are two new
constructor functions for transactions: types.NewTx and types.SignNewTx.
Since the canonical encoding of typed transactions is not RLP-compatible,
Transaction now has new methods for encoding and decoding: MarshalBinary
and UnmarshalBinary.

The existing EIP-155 signer does not support the new transaction types.
All code dealing with transaction signatures should be updated to use the
newer EIP-2930 signer. To make this easier for future updates, we have
added new constructor functions for types.Signer: types.LatestSigner and
types.LatestSignerForChainID.

This change also adds support for the YoloV3 testnet.

Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: Ryan Schneider <ryanleeschneider@gmail.com>
# Conflicts:
#	accounts/abi/bind/backends/simulated.go
#	cmd/evm/internal/t8ntool/execution.go
#	cmd/evm/internal/t8ntool/transition.go
#	cmd/geth/main.go
#	cmd/geth/usage.go
#	core/bench_test.go
#	core/state/statedb.go
#	core/state_prefetcher.go
#	core/state_processor.go
#	core/state_transition.go
#	core/tx_pool.go
#	core/types/block.go
#	core/types/derive_sha.go
#	core/types/gen_tx_json.go
#	core/types/receipt.go
#	core/types/receipt_test.go
#	core/types/transaction.go
#	core/types/transaction_signing.go
#	core/types/transaction_test.go
#	ethclient/ethclient.go
#	ethclient/signer.go
#	graphql/graphql.go
#	internal/ethapi/api.go
#	internal/guide/guide_test.go
#	les/benchmark.go
#	les/odr_test.go
#	light/odr_test.go
#	light/txpool.go
#	miner/worker.go
#	miner/worker_test.go
#	signer/core/api.go
#	tests/state_test_util.go
#	trie/stacktrie_test.go
#	turbo/stages/blockchain_test.go
2021-03-12 15:40:24 +01:00
Alex Sharov
879112f347
TxDb: Walk method - to reuse cursors (#1548) 2021-03-12 16:27:04 +07:00
Alex Sharov
5ef9a3feb9
Trie: use APPEND when re-generating trie. Also including db-migration for PR#1535 (#1549) 2021-03-12 16:26:39 +07:00
alex.sharov
6fb19a815e add docker-compose udp port 2021-03-11 07:07:35 +07:00
gary rong
b83a20d3b7 les, light: improve txstatus retrieval (#22349)
Transaction unindexing will be enabled by default as of 1.10, which causes tx status retrieval will be broken without this PR.

This PR introduces a retry mechanism in TxStatus retrieval.
# Conflicts:
#	les/client.go
#	les/fetcher_test.go
#	les/handler_test.go
#	les/odr.go
#	les/odr_requests.go
#	les/odr_test.go
#	les/peer.go
#	les/pruner_test.go
#	les/request_test.go
#	les/sync_test.go
#	les/test_helper.go
#	les/ulc_test.go
#	light/odr.go
#	light/odr_util.go
2021-03-10 17:07:04 +01:00
gary rong
e602a34fb8 cmd, eth, les: enable serving light clients when non-synced (#22250)
This PR adds a more CLI flag, so that the les-server can serve light clients even the local node is not synced yet.

This functionality is needed in some testing environments(e.g. hive). After launching the les server, no more blocks will be imported so the node is always marked as "non-synced".
# Conflicts:
#	cmd/geth/main.go
#	cmd/geth/usage.go
#	cmd/utils/flags.go
#	eth/ethconfig/gen_config.go
#	les/server.go
2021-03-10 17:06:42 +01:00
Péter Szilágyi
901015daad eth/protocols/snap: lower abortion and resumption logs to debug 2021-03-10 17:03:46 +01:00
Péter Szilágyi
b172a8cdb6 travis: manually install Android since Travis is stale (#22373) 2021-03-10 17:03:02 +01:00
Péter Szilágyi
4b01f40066 travis: bump builders to Bionic 2021-03-10 17:02:51 +01:00
Péter Szilágyi
569d23ea59 travis: bump Android NDK version 2021-03-10 17:02:40 +01:00
Péter Szilágyi
9f87f5146d Dockerfile: bump to Go 1.16 base images
# Conflicts:
#	Dockerfile
#	Dockerfile.alltools
2021-03-10 17:02:11 +01:00
Péter Szilágyi
e767a6dbfd accounts/abi/bind: fix up Go mod files for Go 1.16
# Conflicts:
#	accounts/abi/bind/bind_test.go
2021-03-10 17:01:49 +01:00
Marius van der Wijden
96a424ee84 internal/ethapi: reject non-replay-protected txs over RPC (#22339)
This PR prevents users from submitting transactions without EIP-155 enabled. This behaviour can be overridden by specifying the flag --rpc.allow-unprotected-txs=true.
# Conflicts:
#	cmd/geth/main.go
#	eth/backend.go
#	les/api_backend.go
#	les/client.go
#	node/config.go
2021-03-10 17:00:47 +01:00
Martin Holst Swende
fc0778d1f9 cmd/geth: add db commands stats, compact, put, get, delete (#22014)
This PR introduces:

- db.put to put a value into the database
- db.get to read a value from the database
- db.delete to delete a value from the database
- db.stats to check compaction info from the database
- db.compact to trigger a db compaction

It also moves inspectdb to db.inspect.
# Conflicts:
#	cmd/geth/chaincmd.go
#	cmd/geth/main.go
#	cmd/utils/flags.go
#	core/rawdb/database.go
#	ethdb/leveldb/leveldb.go
2021-03-10 16:57:59 +01:00
gary rong
5aefc37618 les: clean up server handler (#22357)
# Conflicts:
#	les/server_handler.go
#	les/server_requests.go
2021-03-10 16:57:05 +01:00
Felföldi Zsolt
fdd4eb38fa tests/fuzzers/les: add fuzzer for les server handler (#22282)
* les: refactored server handler

* tests/fuzzers/les: add fuzzer for les server handler

* tests, les: update les fuzzer

tests: update les fuzzer

tests/fuzzer/les: release resources

tests/fuzzer/les: pre-initialize all resources

* les: refactored server handler and fuzzer

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
# Conflicts:
#	les/handler_test.go
#	les/peer.go
#	les/protocol.go
#	les/server_handler.go
#	les/test_helper.go
2021-03-10 16:56:49 +01:00
Felföldi Zsolt
6a4d9d1b55 les: fix balance expiration (#22343)
* les/lespay/server: fix balance expiration and add test

* les: move client balances to a new db

* les: rename lespayDb to lesDb
# Conflicts:
#	les/client.go
#	les/clientpool.go
#	les/commons.go
#	les/server.go
#	les/vflux/server/balance_test.go
#	les/vflux/server/balance_tracker.go
2021-03-10 16:55:16 +01:00
Péter Szilágyi
93b0b48701 travis, appveyor, build: bump Go to 1.16
# Conflicts:
#	build/checksums.txt
#	build/ci.go
2021-03-10 16:54:58 +01:00
Péter Szilágyi
f33c516b83 cmd/utils: disable caching preimages by default
# Conflicts:
#	cmd/utils/flags.go
2021-03-10 16:54:33 +01:00
Felföldi Zsolt
f440b1fa73 les: renamed lespay to vflux (#22347)
# Conflicts:
#	les/api.go
#	les/client.go
#	les/clientpool.go
#	les/clientpool_test.go
#	les/peer.go
#	les/protocol.go
#	les/server.go
#	les/server_handler.go
#	les/serverpool.go
#	les/serverpool_test.go
#	les/vflux/client/api.go
#	les/vflux/client/fillset.go
#	les/vflux/client/fillset_test.go
#	les/vflux/client/queueiterator.go
#	les/vflux/client/queueiterator_test.go
#	les/vflux/client/requestbasket.go
#	les/vflux/client/requestbasket_test.go
#	les/vflux/client/timestats.go
#	les/vflux/client/timestats_test.go
#	les/vflux/client/valuetracker.go
#	les/vflux/client/valuetracker_test.go
#	les/vflux/client/wrsiterator.go
#	les/vflux/client/wrsiterator_test.go
#	les/vflux/server/balance.go
#	les/vflux/server/balance_test.go
#	les/vflux/server/balance_tracker.go
#	les/vflux/server/clientdb.go
#	les/vflux/server/clientdb_test.go
#	les/vflux/server/prioritypool.go
#	les/vflux/server/prioritypool_test.go
2021-03-10 14:32:30 +01:00
Felix Lange
b958c6447a p2p/dnsdisc: fix hot-spin when all trees are empty (#22313)
In the random sync algorithm used by the DNS node iterator, we first pick a random
tree and then perform one sync action on that tree. This happens in a loop until any
node is found. If no trees contain any nodes, the iterator will enter a hot loop spinning
at 100% CPU.

The fix is complicated. The iterator now checks if a meaningful sync action can
be performed on any tree. If there is nothing to do, it waits for the next root record
recheck time to arrive and then tries again.

Fixes #22306
2021-03-10 14:31:53 +01:00