Guillaume Ballet
e235d3c43a
cmd/utils: don't enumerate USB unless --usb is set ( #22130 )
...
USB enumeration still occured. Make sure it will only occur if --usb is set.
This also deprecates the 'NoUSB' config file option in favor of a new option 'USB'.
# Conflicts:
# cmd/geth/accountcmd_test.go
# cmd/geth/consolecmd_test.go
# cmd/geth/dao_test.go
# cmd/geth/genesis_test.go
# cmd/geth/les_test.go
2021-03-09 10:36:28 +01:00
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
Péter Szilágyi
a50f261e87
cmd/utils, eth/downloader: minor snap nitpicks
2021-03-09 10:22:04 +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
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
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
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
Mudit Gupta
0c2992922f
cmd/faucet: use Twitter API instead of scraping webpage ( #21850 )
...
This PR adds support for using Twitter API to query the tweet and author details. There are two reasons behind this change:
- Twitter will be deprecating the legacy website on 15th December. The current method is expected to stop working then.
- More importantly, the current system uses Twitter handle for spam protection but the Twitter handle can be changed via automated calls. This allows bots to use the same tweet to withdraw funds infinite times as long as they keep changing their handle between every request. The Rinkeby as well as the Goerli faucet are being actively drained via this method. This PR changes the spam protection to be based on Twitter IDs instead of usernames. A user can not change their Twitter ID.
# Conflicts:
# cmd/faucet/faucet.go
2021-03-08 14:31:14 +01:00
Martin Holst Swende
f9dec8c450
cmd/devp2p: add node filter for snap + fix arg error ( #21950 )
2021-03-08 12:48:01 +01:00
Felföldi Zsolt
ea7b33c639
les: fix nodiscover option ( #21906 )
...
# Conflicts:
# eth/backend.go
# eth/discovery.go
# les/client.go
# les/enr_entry.go
2021-03-08 12:47:13 +01:00
Marius van der Wijden
5ebb5b13e1
cmd/devp2p/internal/ethtest: add transaction tests ( #21857 )
...
# Conflicts:
# cmd/devp2p/internal/ethtest/suite.go
2021-03-08 12:45:43 +01:00
Alex Prut
f032b6d18e
all: remove redundant conversions and import names ( #21903 )
...
# Conflicts:
# accounts/accounts.go
# accounts/keystore/wallet.go
# accounts/scwallet/wallet.go
# accounts/usbwallet/wallet.go
# cmd/clef/main.go
# cmd/devp2p/dnscmd.go
# cmd/evm/compiler.go
# cmd/evm/disasm.go
# cmd/evm/runner.go
# cmd/evm/staterunner.go
# cmd/geth/config.go
# cmd/geth/main.go
# cmd/geth/usage.go
# cmd/utils/flags.go
# consensus/ethash/ethash.go
# core/state/statedb.go
# core/tx_pool_test.go
# core/vm/evm.go
# core/vm/gas_table.go
# core/vm/instructions.go
# core/vm/operations_acl.go
# eth/downloader/api.go
# eth/filters/api.go
# eth/filters/filter_system.go
# eth/filters/filter_system_test.go
# eth/tracers/tracer.go
# internal/debug/flags.go
# internal/ethapi/api.go
# internal/flags/helpers.go
# miner/unconfirmed_test.go
# mobile/ethereum.go
# trie/iterator.go
# turbo/trie/database.go
2021-03-08 12:43:02 +01:00
Alex Prut
86dd1f91dd
all: simplify nested complexity and if blocks ending with a return statement ( #21854 )
...
Changes:
Simplify nested complexity
If an if blocks ends with a return statement then remove the else nesting.
Most of the changes has also been reported in golint https://goreportcard.com/report/github.com/ethereum/go-ethereum#golint
# Conflicts:
# cmd/utils/flags.go
# console/bridge.go
# crypto/bls12381/g2.go
# les/benchmark.go
# les/lespay/server/balance.go
# les/lespay/server/balance_tracker.go
# les/lespay/server/prioritypool.go
# les/odr_requests.go
# les/serverpool.go
# les/serverpool_test.go
# p2p/nodestate/nodestate_test.go
# trie/committer.go
2021-03-08 12:34:16 +01:00
Marius van der Wijden
59351705b7
cmd/devp2p/internal/ethtest: add 'large announcement' tests ( #21792 )
...
* cmd/devp2p/internal/ethtest: added large announcement tests
* cmd/devp2p/internal/ethtest: added large announcement tests
* cmd/devp2p/internal/ethtest: refactored stuff a bit
* cmd/devp2p/internal/ethtest: added TestMaliciousStatus/Handshake
* cmd/devp2p/internal/ethtest: fixed rebasing issue
* happy linter, happy life
* cmd/devp2p/internal/ethtest: used readAndServe
* stuff
* cmd/devp2p/internal/ethtest: fixed test cases
# Conflicts:
# cmd/devp2p/internal/ethtest/suite.go
# cmd/devp2p/internal/ethtest/types.go
2021-03-08 12:32:14 +01:00
gary rong
b2351da9d6
all: disable recording preimage of trie keys ( #21402 )
...
* cmd, core, eth, light, trie: disable recording preimage by default
* core, eth: fix unit tests
* core: fix import
* all: change to nopreimage
* cmd, core, eth, trie: use cache.preimages flag
* cmd: enable preimages for archive node
* cmd/utils, trie: simplify preimage tracking a bit
* core: fix linter
Co-authored-by: Péter Szilágyi <peterke@gmail.com>
# Conflicts:
# cmd/geth/main.go
# cmd/geth/usage.go
# cmd/utils/flags.go
# core/blockchain.go
# core/genesis.go
# core/state/database.go
# core/state/state_test.go
# eth/api_test.go
# eth/api_tracer.go
# eth/backend.go
# light/postprocess.go
# trie/secure_trie.go
# turbo/trie/database.go
2021-03-08 12:26:27 +01:00
Marius van der Wijden
bcc51ea117
core, all: split vm.Context into BlockContext and TxContext ( #21672 )
...
* all: core: split vm.Config into BlockConfig and TxConfig
* core: core/vm: reset EVM between tx in block instead of creating new
* core/vm: added docs
# Conflicts:
# accounts/abi/bind/backends/simulated.go
# cmd/evm/internal/t8ntool/execution.go
# cmd/geth/retesteth.go
# core/evm.go
# core/state_prefetcher.go
# core/state_processor.go
# core/state_transition.go
# core/vm/evm.go
# core/vm/gas_table_test.go
# core/vm/instructions.go
# core/vm/instructions_test.go
# eth/api_tracer.go
# eth/tracers/tracer_test.go
# eth/tracers/tracers_test.go
# les/api_backend.go
# les/odr_test.go
# light/odr_test.go
# tests/vm_test_util.go
2021-03-08 12:17:35 +01:00
ledgerwatch
b743b88218
Revert "Extract validating interface ( #1120 )" ( #1543 )
...
* Revert "Extract validating interface (#1120 )"
This reverts commit e4e36c152e
.
* Fix go mod tidy
* Fix lint
* Fix lint
* fix lint
* Test fix
* Fix test
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-03-05 20:34:23 +00:00
Greg Colvin
8ec8cfcd01
Merge branch 'master' of https://github.com/ledgerwatch/turbo-geth into extractCode
2021-03-04 15:03:18 +00:00
Greg Colvin
c0d0c1885b
gofmt
2021-03-04 13:46:57 +00:00
Greg Colvin
7899048eac
add action to extract all contract code as hex string
2021-03-04 13:01:46 +00:00
Alex Sharov
eb7d2ad16a
Add validation of senders amount ( #1539 )
2021-03-04 16:34:49 +07:00
Alex Sharov
827e47e544
grafana: unstack charts ( #1540 )
2021-03-04 12:27:16 +07:00
alex.sharov
ceb332afdd
More documentation for integration tool
2021-03-04 09:42:05 +07:00
Alex Sharov
17f99a5d3f
Grafana: to use iops units ( #1537 )
2021-03-03 16:18:01 +07:00
Alex Sharov
141b039b48
fix history check ( #1534 )
2021-03-03 10:16:37 +07:00
ledgerwatch
c00f85ab6c
Simplification of eth_estimageGas ( #1531 )
...
* Simplification of eth_estimageGas
* Set GasCap by default
* Add a test
* Fix crash
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-03-02 22:47:44 +00:00
alex.sharov
b7996c66d9
add more db conversion tools
2021-03-02 09:57:15 +07:00
alex.sharov
66bc517834
add more db conversion tools
2021-03-02 09:56:43 +07:00
alex.sharov
61f8a1ef0c
revive
2021-03-02 09:52:05 +07:00
Alex Sharov
904a992d3c
remove old grafana boards ( #1527 )
2021-03-01 12:34:33 +07:00
Alex Sharov
827461039e
restore cache exec ( #1525 )
2021-03-01 12:03:49 +07:00
Alex Sharov
8538ec85b3
don't open db in exclusive mode if no migrations ( #1524 )
2021-03-01 11:02:22 +07:00
Alex Sharov
6d0d84cda6
log git branch and git commit ( #1523 )
2021-03-01 11:02:06 +07:00
ledgerwatch
da74bd8f38
Fixes to unwind logic for the new staged sync ( #1521 )
...
* Make DB visible
* Further fixes to unwind logic
* Fix lint
* Fix lint
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-28 08:47:31 +00:00
Alex Sharov
f556af6276
Prometheus metrics: more virtual memory visibility, more cross-platform metrics ( #1520 )
2021-02-28 11:11:28 +07:00
Evgeny Danilenko
e4e36c152e
Extract validating interface ( #1120 )
...
* interface
* generalize interface
* linters
* fix deadlock
* fix linters
* close goroutine
* fix
* debug
* id+ttl
* refactor downloader tests
* tests
* lru
* handle genesis, extract fake consensuses
* fix fake consensus
* test uncles, verify
* after a new master
* fmt
* fix close
* debug
* debug
* fix chain length
* remove test field
* use single account
* fix data race on closing channel
* remove postponed blocks queue
* miner test
* VerifyHeaderRequests
* fmt
* fmt
* fix data race
* handle validating errors
* simplify matchParents
* remove copy-paste
* move sort to constructor
* clean up
* debug for 10 parents
* debug
* debug
* batch responses
* batch requests
* works for many ancestors
* remove debug
* always Close an engine
* linters
* ancestors deduplication
* fix test
* reduce interface
* api
* clique
* green clique sync
* stable
* perpermance per second
* full sync
* linters
* gitignore
* deps
* fix panic after master merge
* init consensus
* clique tests
* fix tests
* fix tests
* clean up
* reuse snap
* store vefified snapshots
* optimize snapshots
* safe close
* cleanup loop
* after downloader
* downloader and consensus tests
* update tests
* hack.go
* clique flags
* fix cliuqe config
* review
* gitignore
* remove additional bucket
* blk/sec instead of blk/microsecond
* rename
* deps
* optimize
* debug
* test
* tests without extracted validation process
* same base performance as on master
* benchmark
* simplify ethash verification
* ethash
* ethash
* linters
* ethash
* master stats
* cleanup
* gomod
* linters
* tests
* better locks
* Fix
* Remove logging for verifyHeaders
* Verification speed in the logs
* Fix compile error
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-25 19:40:45 +00:00
ledgerwatch
d3bac21f2e
Fix combined mode for the header download ( #1513 )
...
* Fix combined mode for new headers downloader
* Fix for streams
* Return error
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-24 14:51:50 +00:00
ledgerwatch
be7b93d809
Fixes and simplifications for headers download ( #1511 )
...
* Simplify header insert, fix recovery from files
* Fix to the header processed log
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-24 07:57:02 +00:00
Alex Sharov
d4ef1f8516
blocks exec unwind - to support graceful shutdown ( #1494 )
...
* quit exec unwind
* quit exec unwind
* lint
2021-02-23 17:14:32 +00:00
Alex Sharov
6894d9b356
Remove cursor features ( #1508 )
2021-02-23 09:02:54 +07:00
ledgerwatch
c30ad646db
Better ergonomics for new header/bodies downloader, more test friendly, README ( #1507 )
...
* Ergonomic changes
* Add little doc and remove coreAddr
* Fix gRPC streaming
* Fix lint
* Remove peer penalty logging
* Fix lint
* Fix lint
* Fix lint
* Fix peerID in error message
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-22 21:59:23 +00:00
ledgerwatch
dc6b4c0e43
Fixes for trace_callMany ( #1506 )
...
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-21 20:18:59 +00:00
Alex Sharov
f1ee8d507e
New Trie db layout - store trie structure info and multiple hashes per record ( #1500 )
...
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* squash
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
* SE
2021-02-21 18:41:59 +00:00
ledgerwatch
e8501bbf43
eth_getTransactionReceipt to return nil for transactions not in the d… ( #1505 )
...
* eth_getTransactionReceipt to return nil for transactions not in the database
* Fix compile error
2021-02-21 09:38:00 +01:00
canepat
3388c1f1af
Make vegetaWrite function usable from all benchs ( #1502 )
...
Add vegetaWrite support to bench8 (disabled)
Add trace log with comparative timings in bench8
2021-02-19 13:26:28 +07:00
Alex Sharov
7aedc36baa
Tool for benchmarking execution long ranges of blocks (integration loop_exec) ( #1501 )
2021-02-18 20:33:59 +07:00
ledgerwatch
b9acd62280
Embed header/bodies download into a mini-staged sync ( #1498 )
...
* Embed header/bodies download into a mini-staged sync
* Move code around to prevent import cycles
* Include new files
* Fix lint
* Fix lint
* Fix lint
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-16 15:47:15 +00:00
ledgerwatch
6e56097056
Bring in refactored p2p sentry interface and adjust downloader for it ( #1497 )
...
* Initial commit
* Add sentry gRPC interface
* p2psentry directory
* Update README.md
* Update README.md
* Update README.md
* Add go package
* Correct syntax
* add external downloader interface (#2 )
* Add txpool (#3 )
* Add private API (#4 )
* Invert control.proto, add PeerMinBlock, Separare incoming Tx message into a separate stream (#5 )
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
* Use new p2psentry interface
* Remove
* Fix lint
* Fix lint
* Separate upload messages into its own stream (#6 )
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
* Add header upload
* Remove
* Add upload of block headers
* Add block bodies upload
* Fix lint
* Bugfix for blockBodies
* Fix for body upload logging
* Print peerId for GetBlockHeaders
* Invoke block hashes stage to enable block body upload
* Fix test
* Fix stuck bodies download
Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me>
Co-authored-by: b00ris <b00ris@mail.ru>
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-15 18:54:45 +00:00
ledgerwatch
7c81e9198d
Fixes to trace_call, trace_callMany, dual RPC daemon mode ( #1491 )
...
* Fixes to trace_call, trace_callMany, dual RPC daemon mode
* Fix compile error
* Fix compile error
* Compile error fix
* Compile error fix
* Fix typo
* Fix discrepancy when trace is empty
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
2021-02-12 16:47:32 +00:00