Commit Graph

12737 Commits

Author SHA1 Message Date
Kirill Elagin
a34a0b90c0 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-10-06 14:12:09 +02:00
Martin Holst Swende
c0a60c5f44 eth/tracers: regenerate assets from #21549 (#21564)
# Conflicts:
#	eth/tracers/internal/tracers/assets.go
2020-10-06 14:12:09 +02:00
Felföldi Zsolt
f4d9f05acf 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>
# Conflicts:
#	cmd/geth/les_test.go
#	les/api.go
#	les/api_test.go
#	les/clientpool.go
#	les/clientpool_test.go
#	les/metrics.go
#	les/peer.go
#	les/server.go
#	les/server_handler.go
#	les/test_helper.go
#	les/utils/expiredvalue.go
2020-10-06 14:12:09 +02:00
Felix Lange
79f7f2853f rlp: add SplitUint64 (#21563)
This can be useful when working with raw RLP data.
2020-10-06 14:12:09 +02:00
Julian Koh
db4861b9f9 js/tracers: make calltracer report value in selfdestructs (#21549) 2020-10-06 14:12:09 +02:00
Felföldi Zsolt
d55e519f23 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.
# Conflicts:
#	les/serverpool.go
#	p2p/nodestate/nodestate.go
#	p2p/nodestate/nodestate_test.go
2020-10-06 14:12:09 +02:00
Shude Li
3e6820d863 Dockerfile: unexpose port 8547 as GraphQL was merged into HTTP endpoint (#21556)
# Conflicts:
#	Dockerfile
#	Dockerfile.alltools
2020-10-06 14:12:09 +02:00
Guillaume Ballet
20066ac3d1 p2p/discover: fix typo in comments (#21554) 2020-10-06 14:12:09 +02:00
Marius van der Wijden
0cc7aba2b7 miner: fix regression, add test for starting while download (#21547)
Fixes a regression introduced in #21536
2020-10-06 14:12:09 +02:00
Marius van der Wijden
ca6b1bcea5 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>
# Conflicts:
#	miner/miner.go
2020-10-06 14:12:09 +02:00
Guillaume Ballet
acb354ab33 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>
# Conflicts:
#	cmd/geth/config.go
2020-10-06 14:12:09 +02:00
Dan Sosedoff
669c0ea0d8 ethclient: add BlockNumber method (#21500)
This adds a new client method BlockNumber to fetch the most recent
block number of the chain.
2020-10-06 14:12:09 +02:00
Shude Li
c6a6a1e691 go.mod: remove golang.org/x/sync (#21541)
# Conflicts:
#	go.mod
2020-10-06 14:12:09 +02:00
Martin Holst Swende
e9b1492b0f 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-10-06 14:12:09 +02:00
gary rong
cbe7a5c80a cmd, eth: offer maxprice flag for overwritting price cap (#21531)
* cmd, eth: offer maxprice flag for overwritting price cap

* eth: rename default price cap
# Conflicts:
#	cmd/geth/main.go
#	cmd/geth/usage.go
#	cmd/utils/flags.go
#	eth/gasprice/gasprice.go
2020-10-06 14:12:09 +02:00
Marius van der Wijden
73fa175bd1 accounts/abi/bind/backends: reverted some stylistic changes (#21535)
# Conflicts:
#	accounts/abi/bind/backends/simulated.go
2020-10-06 14:12:09 +02:00
Péter Szilágyi
7970cad173 eth/downloader: only roll back light sync if not fully validating
# Conflicts:
#	eth/downloader/downloader.go
#	eth/downloader/downloader_test.go
2020-10-06 14:12:09 +02:00
Péter Szilágyi
c1adde387e params: begin v1.9.22 release cycle
# Conflicts:
#	params/version.go
2020-10-06 14:12:09 +02:00
Igor Mandrigin
ab797a9909 add to-merge 2020-10-06 14:12:09 +02:00
ledgerwatch
9418ebf860
Add some logging to mint (aka block body gap check) (#1189) 2020-10-06 07:36:47 +01:00
ledgerwatch
b9aec74e4b
Kludge fix for node being stuck (#1188) 2020-10-06 07:36:34 +01:00
ledgerwatch
086952df16
Fix wrong log error messages (#1186) 2020-10-05 16:56:25 +01:00
ledgerwatch
82193a3670
Not swallow errors in accessor_chain (#1185) 2020-10-05 15:18:51 +01:00
Thomas Jay Rush
9f061107d1
Update stages readme (#1183) 2020-10-05 09:59:51 +07:00
ledgerwatch
b652768241
Revert "pass_root_ctx_to_p2p_server (#1179)" (#1182)
This reverts commit b8c3880254.
2020-10-04 17:18:06 +01:00
ledgerwatch
55219d7ad3
eth_call to use current state when blockNumber == latest (#1180) 2020-10-04 09:01:06 +01:00
Alex Sharov
5fab3115da
build libzstd.a for musl (#1181) 2020-10-04 10:40:01 +07:00
Alex Sharov
b8c3880254
pass_root_ctx_to_p2p_server (#1179) 2020-10-03 11:15:01 +01:00
Alex Sharov
85219b651e
Revert "rpcdaemon to cache chainconfig (#1173)" (#1177)
This reverts commit cc4dd3695d.
2020-10-03 15:07:49 +07:00
Evgeny Danilenko
ec6be820ac
Don't force sync in case InMemDb (#1174)
* initial

* fix

* fix chain length
2020-10-02 14:08:28 +01:00
Nikola
ef7c837f2c
Update rpcdaemon README (#1175) 2020-10-02 15:03:53 +02:00
Alex Sharov
cc4dd3695d
rpcdaemon to cache chainconfig (#1173)
* rpcdaemon to cache chainconfig

* topic normalization

* topic normalization
2020-10-02 13:52:02 +01:00
Alex Sharov
809d79b15f
Switch to cbor (#1172)
* switch receipts to cbor

* switch receipts to cbor

* rpcdaemon to cache chainconfig

* rpcdaemon to cache chainconfig

* rpcdaemon to cache chainconfig

* rpcdaemon to cache chainconfig
2020-10-02 13:51:20 +01:00
Alex Sharov
6ccf57dace
switch to go implementation of roaring bitmaps for alpine support (#1165) 2020-10-02 15:16:21 +07:00
Alex Sharov
61fbe34024
Better cbor support (#1163) 2020-10-02 10:56:13 +07:00
Alex Sharov
48cf5fb43e
History-style sharding for bitmap indices (#1159) 2020-10-02 10:54:11 +07:00
lightclient
8009a30149
make some minor edits to db walkthrough doc to improve readability (#1169) 2020-10-01 21:57:46 +01:00
Giulio rebuffo
ffd17375eb
added basic installation guide (#1167) 2020-10-01 21:31:07 +01:00
Igor Mandrigin
da9f333a2b begin 2020.10.02 release cycle 2020-10-01 11:21:06 +02:00
Igor Mandrigin
1e023fe278 workaround issue with MUSL and roaring bitmaps 2020-10-01 11:09:49 +02:00
ledgerwatch
96d9639570
Update skip analysis (#1164) 2020-10-01 09:25:44 +01:00
Thomas Jay Rush
5ebf997160
Fixes to a few tracing issues (#1161)
* Starting to look at performance

* Fixes issue #1142 - incorrect error strings

* Uses a recent fix in Geth callTracer code to return balance to self-destruct traces
2020-10-01 07:02:11 +01:00
Alex Sharov
0e62fa4d59
add return (#1158) 2020-09-30 10:28:36 +01:00
Alex Sharov
0559d56dae
Pin protoc version and store it in ./build/bin (#1154)
* use ./build/bin folder to store protobuf binaries

* use ./build/bin folder to store protobuf binaries
2020-09-29 15:09:50 +01:00
ledgerwatch
7bb9cb4274
Remove BloomStatus from the API (#1155)
* Remove BloomStatus from the API

* Trying to find missing space

* Fix lint
2020-09-29 15:09:29 +01:00
Alex Sharov
5a74fe4884
use ./build/bin folder to store protobuf binaries (#1153) 2020-09-29 10:55:41 +01:00
Giulio rebuffo
c53393c9cd
added basic types to rtd (#1149)
* added basic types to rtd

* fixed typo

* fixed doc
2020-09-29 10:34:56 +01:00
Alex Sharov
dae72a8589
(related to lmdb assert) Avoid deleteCurrent on cursor which used for iterations (#1151)
* save progress

* save progress

* avoid delete current

* undupsort_ih
2020-09-29 10:28:49 +01:00
Alex Sharov
e02d6acc7d
bitmap indices for logs (#1124)
* save progress

* try now

* don't create bloom inside rlpDecode

* don't create bloom inside ApplyTransaction

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* rename method

* print timings

* print timings

* print timings

* sort before flush

* fix err lint

* clean

* move tests to transactions

* compressed version

* up bound

* up bound

* more tests

* more tests

* more tests

* more tests

* better removal

* clean

* better performance of get/put methods

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* optimize rpcdaemon

* fix test

* fix rpcdaemon

* fix test

* simplify

* simplify

* fix nil pointer

* clean

* revert some changes

* add some logs

* clean

* try without optimize

* clean

* clean

* clean

* clean

* try

* move log_index to own stage

* move log_index to own stage

* integration add log_index stage

* integration add log_index stage

* clean

* clean

* print timing

* remove duplicates at unwind

* extract truncateBitmaps func

* try detect

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* add blackList of topics

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* clean

* sharding 1

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 2

* sharded 3

* sharded 3

* sharded 3

* speedup things by putCurrent and putReserve

* clean

* optimize trim

* clean

* remove blacklist

* add more info to err

* ?

* clean

* clean

* clean

* clean

* clean

* working version

* switch to cgo version of roaring bitmaps

* clean

* clean

* clean

* clean

* more docs

* clean

* clean

* fix logs bloom field

* Fix debug_getModifiedAccountsByNumber

* Try to fix crash

* fix problem with "absent block"

* fix problem with "absent block"

* remove optimize method call

* remove roaring iterator

* fix problem with rebuild indicess

* remove debug prints

* tests for eth_getLogs involving topics

* add tests for new stage, speparate topics into 2 buckets

* version up

* remove debug logs

* remove debug logs

* remove bloom filter implementation

* Optimisation

* Optimisatin not required, make rpctest lenient to geth errors

* Lenient to geth failures

Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
2020-09-28 18:18:36 +01:00
ledgerwatch
14288b8cd0
Headers poc 5 - Intermediate (#1145)
* Add headers persistence

* Print flushBuffer

* Fix indexing problem

* Not skip hard-coded headers if the files are empty

* Fix lint

* print anchor state after init

* Properly construct file names

* Add check sub-command

* Fix lint

* Fix lint

* Fix lint

* Print more info when recovering

* Fix recovering

* Fix recovery

* Add anchors also as tips

* 2-level priority queue for tips

* Initialise tipQueue in anchor

* update maxTipHeight

* fix type

* Add anchors to the anchorQueue and rebuild anchorQueue on deletion

* Fix NPE

* fix recovery

* User buffersize, add hard coded headers to buffer

* Reinit anchorQueue

* Schedule requests after recovery

* No fix

* Remove duplicates

* Report duplicate headers

* Log buffer additions

* Fix for duplicate headers

* Try to fix duplicate headers again

* remove TODO comment

* Use LLRB instead of heap for anchors

* Print reserveTip info

* Correctly replace anchors in the tree

* Remove excessive logging

* Print tips attached to the anchor

* Print tips better

* limitTips instead of reserveTip

* Print forked headers

* Use pointers in llrb

* Print tipStretch

* Print limitTips

* Mininise AnchorItem

* Put anchors into the tree

* Fix totalDiff calculation, but is it needed?

* Remove totalDifficulty from anchors

* CheckInitiation

* Fix tests

* Fix lint, print more at check initiation

* Better output for hard-coded anchors

* Print hard-coded anchors better

* Prioritise anchors with short stretches

* Prioritise by chainSize

* Use linked list instead of heap for requestQueue

* Fix problem of no requests

* Push front

* Fix lint

* Not verify PoW for too far in the past and future

* Fix Calculation of totalDifficulty when Connect

* Fix hard tips

* Another fix for tips
2020-09-27 21:32:05 +01:00