Commit Graph

12006 Commits

Author SHA1 Message Date
Guillaume Ballet
f354c622ca
core: fix a typo in comment (#21439) 2020-09-18 14:26:19 +02:00
Péter Szilágyi
2482ba016e
Merge pull request #21529 from karalabe/dynamic-pivot
eth/downloader: dynamically move pivot even during chain sync
2020-09-18 12:29:33 +03:00
Péter Szilágyi
fb835c024c
eth/downloader: dynamically move pivot even during chain sync 2020-09-18 11:37:42 +03:00
Giuseppe Bertone
07751c3d26
cmd/geth: added counters to the geth inspect report (#21495)
* database: added counters

* Improved stats for ancient db

* Small improvement

* Better message and added percentage while counting receipts

* Fast counting for receipts

* added info message

* Show both receips itemscount  from ancient db and counted receipts

* Fixed default case

* Removed counter for receipts in ancient store

* Removed counting of receipts present in leveldb
2020-09-17 10:23:56 +02:00
Marius van der Wijden
faba018b29
cmd/utils: use preconfigured testnet flags instead of networkid (#21561)
* cmd/utils: use preconfigured testnet flags instead of networkid

* cmd/utils: shorter description

Co-authored-by: Martin Holst Swende <martin@swende.se>

* Update flags.go

Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-09-16 13:17:50 +02:00
Marius van der Wijden
89884dc353
tests/fuzzers/abi: add fuzzer for fuzzing package accounts/abi (#21217)
* tests/fuzzers/abi: added abi fuzzer

* accounts/abi: fixed issues found by fuzzing

* tests/fuzzers/abi: update fuzzers, added repro test

* tests/fuzzers/abi: renamed abi_fuzzer to abifuzzer

* tests/fuzzers/abi: updated abi fuzzer

* tests/fuzzers/abi: updated abi fuzzer

* accounts/abi: minor style fix

* go.mod: added go-fuzz dependency

* tests/fuzzers/abi: updated abi fuzzer

* tests/fuzzers/abi: make linter happy

* tests/fuzzers/abi: make linter happy

* tests/fuzzers/abi: comment out false positives
2020-09-16 13:15:22 +02:00
gary rong
93f047023f
les/lespay/server: bump database version (#21571) 2020-09-16 11:51:16 +02:00
Vinod Damle
8696dd39cb
params: allow setting Petersburg block before chain head (#21473)
* Allow setting PetersburgBlock before chainhead

if it is at the same block as ConstantinopleBlock

* Add a negative test
2020-09-16 09:39:35 +03:00
Mason Fischer
cf2a77af28
ethclient: fix BlockNumber (#21565)
It didn't actually work because it called a method that doesn't
exist. This fixes it also adds a test.

Co-authored-by: Felix Lange <fjl@twurst.com>
2020-09-15 11:29:51 +02:00
Giuseppe Bertone
0185ee0993
core/rawdb: single point of maintenance for writing and deleting tx lookup indexes (#21480) 2020-09-15 10:37:01 +02:00
Kirill Elagin
4764b2f0be
COYPING: restore the full text text of GPL (#21568)
When the license was added to the repository, its text was changed (some
sections at the end removed) and, worse, the authors of go-ethereum
tried to claim copyright on the license text.

The correct way to apply GPL to a project is to copy it verbatim.
This change reverts the text of the GPL to the original.
2020-09-15 08:27:17 +02:00
Martin Holst Swende
b65c384181
eth/tracers: regenerate assets from #21549 (#21564) 2020-09-15 08:22:47 +02:00
Felföldi Zsolt
4996fce25a
les, les/lespay/server: refactor client pool (#21236)
* les, les/lespay/server: refactor client pool

* les: use ns.Operation and sub calls where needed

* les: fixed tests

* les: removed active/inactive logic from peerSet

* les: removed active/inactive peer logic

* les: fixed linter warnings

* les: fixed more linter errors and added missing metrics

* les: addressed comments

* cmd/geth: fixed TestPriorityClient

* les: simplified clientPool state machine

* les/lespay/server: do not use goroutine for balance callbacks

* internal/web3ext: fix addBalance required parameters

* les: removed freeCapacity, always connect at minCapacity initially

* les: only allow capacity change with priority status

Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2020-09-14 22:44:20 +02:00
Felix Lange
f7112cc182
rlp: add SplitUint64 (#21563)
This can be useful when working with raw RLP data.
2020-09-14 19:23:01 +02:00
Julian Koh
71c37d82ad
js/tracers: make calltracer report value in selfdestructs (#21549) 2020-09-14 14:57:28 +02:00
Felföldi Zsolt
4eb9296910
p2p/nodestate: ensure correct callback order (#21436)
This PR adds an extra guarantee to NodeStateMachine: it ensures that all
immediate effects of a certain change are processed before any subsequent
effects of any of the immediate effects on the same node. In the original
version, if a cascaded change caused a subscription callback to be called
multiple times for the same node then these calls might have happened in a
wrong chronological order.

For example:

- a subscription to flag0 changes flag1 and flag2
- a subscription to flag1 changes flag3
- a subscription to flag1, flag2 and flag3 was called in the following order:

   [flag1] -> [flag1, flag3]
   [] -> [flag1]
   [flag1, flag3] -> [flag1, flag2, flag3]

This happened because the tree of changes was traversed in a "depth-first
order". Now it is traversed in a "breadth-first order"; each node has a
FIFO queue for pending callbacks and each triggered subscription callback
is added to the end of the list. The already existing guarantees are
retained; no SetState or SetField returns until the callback queue of the
node is empty again. Just like before, it is the responsibility of the
state machine design to ensure that infinite state loops are not possible.
Multiple changes affecting the same node can still happen simultaneously;
in this case the changes can be interleaved in the FIFO of the node but the
correct order is still guaranteed.

A new unit test is also added to verify callback order in the above scenario.
2020-09-14 14:01:18 +02:00
Shude Li
a99ac5335c
Dockerfile: unexpose port 8547 as GraphQL was merged into HTTP endpoint (#21556) 2020-09-13 23:25:15 +03:00
Guillaume Ballet
4e2641319b
p2p/discover: fix typo in comments (#21554) 2020-09-11 20:35:38 +02:00
Marius van der Wijden
df219e23df
miner: fix regression, add test for starting while download (#21547)
Fixes a regression introduced in #21536
2020-09-11 18:17:09 +02:00
Marius van der Wijden
7cf56d6f06
miner: use channels instead of atomics in update loop (#21536)
This PR changes several different things:

- Adds test cases for the miner loop
- Stops the worker if it wasn't already stopped in worker.Close()
- Uses channels instead of atomics in the miner.update() loop

Co-authored-by: Felix Lange <fjl@twurst.com>
2020-09-10 19:27:42 +02:00
Guillaume Ballet
d7f02b448a
cmd/geth: print warning when whisper config is present in toml (#21544)
* cmd/geth: print warning when whisper config is present in toml

* Update cmd/geth/config.go

Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-09-10 13:14:19 +00:00
Dan Sosedoff
1167639524
ethclient: add BlockNumber method (#21500)
This adds a new client method BlockNumber to fetch the most recent
block number of the chain.
2020-09-10 14:24:21 +02:00
Shude Li
4ea9737de6
go.mod: remove golang.org/x/sync (#21541) 2020-09-10 14:21:51 +02:00
Martin Holst Swende
a3cd8a040a
core/vm: fix benchmark overflow + prep for precompile repricings (#21530)
* core/vm/testdata: add gascost expectations to testcases

* core/vm: verify expected gas in tests for precompiles

* core/vm: fix overflow flaw in gas/s calculation
2020-09-10 09:19:30 +02:00
gary rong
328901c24c
cmd, eth: offer maxprice flag for overwritting price cap (#21531)
* cmd, eth: offer maxprice flag for overwritting price cap

* eth: rename default price cap
2020-09-09 18:38:47 +03:00
Péter Szilágyi
3a98c6f6e6
Merge pull request #21537 from karalabe/les-reorg-fix
eth/downloader: only roll back light sync if not fully validating
2020-09-09 18:37:37 +03:00
Marius van der Wijden
d81c9d9b76
accounts/abi/bind/backends: reverted some stylistic changes (#21535) 2020-09-09 13:21:20 +00:00
Péter Szilágyi
367f12f734
eth/downloader: only roll back light sync if not fully validating 2020-09-09 14:13:26 +03:00
Péter Szilágyi
8d35b1eb2b
params: begin v1.9.22 release cycle 2020-09-09 11:23:37 +03:00
Péter Szilágyi
0287d54847
params: release Geth v1.9.21 2020-09-09 11:22:11 +03:00
Péter Szilágyi
24562d9b0c
Merge pull request #21534 from karalabe/cht-1.9.21
params: update CHTs for v1.9.21 release
2020-09-09 10:34:53 +03:00
Péter Szilágyi
dc681fc1f6
params: update CHTs for v1.9.21 release 2020-09-09 10:33:20 +03:00
Guillaume Ballet
86bcbb0d79
.github: remove whisper from CODEOWNERS (#21527) 2020-09-08 23:02:14 +03:00
Guillaume Ballet
066c75531d
build: remove wnode from the list of packages binaries (#21526) 2020-09-08 16:13:48 +02:00
Martin Holst Swende
8327d1fdfc
accounts/usbwallet, signer/core: show accounts from ledger legacy derivation paths (#21517)
* accounts/usbwallet, signer/core: un-hide accounts from ledger legacy derivation paths

* Update accounts/usbwallet/wallet.go

* Update signer/core/api.go

* Update signer/core/api.go
2020-09-08 14:07:55 +03:00
Guillaume Ballet
d54f2f2e5e
whisper: remove whisper (#21487)
* whisper: remove whisper

* Update cmd/geth/config.go

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>

* cmd/geth: warn on enabling whisper + remove more whisper deps

* mobile: remove all whisper references

Co-authored-by: Marius van der Wijden <m.vanderwijden@live.de>
Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-09-08 11:47:48 +03:00
Osoro Bironga
c5d28f0b27
accounts: abi/bid/backends; cleaned doc errors, camelCase refactors and anonymous variable assignments (#21514)
Co-authored-by: Osoro Bironga <osoro@doctaroo.com>
2020-09-07 13:07:15 +02:00
Marius van der Wijden
de971cc845
eth: added trace_call to trace on top of arbitrary blocks (#21338)
* eth: Added TraceTransactionPending

* eth: Implement Trace_Call, remove traceTxPending

* eth: debug_call -> debug_traceCall, recompute tx environment if pruned

* eth: fix nil panic

* eth: improve block retrieving logic in tracers

* internal/web3ext: add debug_traceCall to console
2020-09-07 10:52:01 +02:00
Péter Szilágyi
f86324edb7
Merge pull request #21504 from karalabe/trie-path-sync
core, eth, trie: prepare trie sync for path based operation
2020-09-02 13:52:51 +03:00
Péter Szilágyi
eeaf191633
core, eth, trie: prepare trie sync for path based operation 2020-09-02 13:21:32 +03:00
Martin Holst Swende
3010f9fc75
eth/downloader: change intial download size (#21366)
This changes how the downloader works, a little bit. Previously, when block sync started,
we immediately started filling up to 8192 blocks. Usually this is fine, blocks are small
in the early numbers. The threshold then is lowered as we measure the size of the blocks
that are filled.

However, if the node is shut down and restarts syncing while we're in a heavy segment,
that might be bad. This PR introduces a more conservative initial threshold of 2K blocks
instead.
2020-09-02 11:01:46 +02:00
ucwong
d90bbce954
go.mod : update goja dependency (#21432) 2020-09-01 12:56:22 +02:00
Giuseppe Bertone
5cdb476dd1
"Downloader queue stats" is now provided once per minute (#21455)
* "Downloader queue stats" is now a DEBUG information

I think this info is more a DEBUG related information then an INFO. If it must remains an INFO, maybe it can be slow down to one time every 5 minutes or so.

* Update queue.go

"Downloader queue stats" information is now provided once every minute instead of once every 10 seconds.
2020-09-01 11:02:12 +02:00
Hanjiang Yu
ff23e265cd
internal: fix personal.sign() (#21503) 2020-09-01 10:23:04 +02:00
Fuyang Deng
12d8570322
accounts/abi: fix a bug in getTypeSize method (#21501)
* accounts/abi: fix a bug in getTypeSize method

e.g. for "Tuple[2]" type, the element of the array is a tuple type and the size of the tuple may not be 32.

* accounts/abi: add unit test of getTypeSize method
2020-09-01 07:29:54 +00:00
Felix Lange
5883afb3ef
rpc: fix issue with null JSON-RPC messages (#21497) 2020-08-28 16:27:58 +02:00
libotony
05280a7ae3
eth/tracers: revert reason in call_tracer + error for failed internal calls (#21387)
* tests: add testdata of call tracer

* eth/tracers: return revert reason in call_tracer

* eth/tracers: regenerate assets

* eth/tracers: add error message even if no exec occurrs, fixes #21438

Co-authored-by: Martin Holst Swende <martin@swende.se>
2020-08-27 11:33:45 +02:00
Péter Szilágyi
d97e0063d5
Merge pull request #21491 from karalabe/state-sync-leak-fix
core/state, eth, trie: stabilize memory use, fix memory leak
2020-08-27 11:24:28 +03:00
ucwong
856307d8bb
go.mod | goleveldb latest update (#21448)
* go.mod | goleveldb latest update

* go.mod update

* leveldb options

* go.mod: double check

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
2020-08-26 15:53:12 +02:00
Marius van der Wijden
16d7eae1c8
eth: updated comments (#21490) 2020-08-26 13:20:12 +03:00