Commit Graph

12566 Commits

Author SHA1 Message Date
ledgerwatch
c06dbdadf9
Use Append for changesets and receipts (#1018)
* Use Append for changesets and receipts

* Fix lint

* Delete all receipts on unwind

* Fix lint

* Fix unwind keys for changeset

* Fix test

* Use writeReceipts flag

* Revert to Append

* Delete receipts too when resetting
2020-09-01 07:48:25 +01:00
ledgerwatch
1a0e9275e1
Headers PoC - intermediate changes (#1016)
* First algorithm

* Update doc

* Second algorithm implemented

* Prepend (unfinished)

* More on prepend

* More fixes

* Change CalcDifficulty interface

* fix make test

* Fix formatting

* Another test

* More on Preprend

* Another test for Prepend

* More tests for Prepend

* More tests for Prepend

* Move files to turbo

* Add another test for Prepend

* Started adding Append algorithm

* More work on Append

* Start changing the terminology

* Split trees into segments

* More fixes

* Fix compilation

* Connect

* FindAnchors, FindTip

* Tip has anchor and not anchorParent field

* Remove Prepend and Append

* Add Connect

* NewAnchor algorithm

* More to recovery from files

* Add more to AddAnchor

* Request more headers

* Header fix-sizes serialisation

* Upgrade CI to 1.15

* Fix lint

* Fix lint

* replace RLP with fixed-sized serialisation

* Fix lint

* More algos

* Fix lint
2020-08-31 06:27:51 +01:00
ledgerwatch
8a3dad0914
Use Finish stage for eth_syncing (#1017) 2020-08-31 06:27:35 +01:00
Igor Mandrigin
7bc892e886
Prefetch block bodies (#1013)
* prefetched blocks 1

* fixups

* fix logs

* fixups

* linters

* remove logs

* fix an NPE in tests

* setup the correct origin

* run blocks on prefetched bodies

* fix log

* smaller cache size
2020-08-30 18:34:40 +01:00
Alex Sharov
ada52a8cd5
indices.md (#1010)
* init

* up

* link to db walkthrough
2020-08-30 18:34:29 +01:00
Alex Sharov
49351b0091
KV: to support multiple databases and multiple set of buckets (#1002)
* don't use global variables

* up deps

* clean

* use joined flags

* use single non-global buckets config

* clean

* copy map

* fix tests

* fix tests

* clean

* clean
2020-08-30 18:34:18 +01:00
Igor Mandrigin
a1a7f6607a
rpcdaemon, stagedsync: make sure we update the current block number after a sync cycle (#1015)
* rpcdaemon, stagedsync: make sure we update the current block number after a sync cycle

fixes #1014

* linters
2020-08-30 17:51:06 +01:00
Igor Mandrigin
5365b8e402
stagedsync: create a StagedSync object, initialize in ProtocolManager (#1012)
* stagedsync: create a StagedSync object, initialize in ProtocolManager

* fix compile error
2020-08-30 13:24:58 +02:00
ledgerwatch
961b1d57c4
Remove fdlimit - ramping up open file handles limit (#1011) 2020-08-30 09:01:39 +01:00
Chase Wright
f2902bb47c
Update totalDifficulty from Big to hexutil.Big (#1009)
* Update totalDifficulty from Big to hexutil.Big
2020-08-30 10:55:31 +07:00
ledgerwatch
22dc832d92
RPC method fixes (#1007)
* Fix some RPC issues

* Fudge the getBlockByNumber

* Add two more PRC methods

* Fix rpc tests
2020-08-29 22:28:09 +01:00
Giulio rebuffo
33316fec6a
Implemented trace_filter (#998)
* added message for --rpc

* more messages for other unused flags

* implemented trace_filter

* lint

* cleanup

* cleanup
2020-08-29 16:50:24 +01:00
Chase Wright
40b277aad4
Update README.md (#1004)
* Add net_peerCount and a note about its non-standard behavior
2020-08-29 16:37:05 +02:00
Igor Mandrigin
300a515bff
Merge pull request #1003 from ledgerwatch/geth-1.9.20
Geth 1.9.20
2020-08-29 16:27:32 +02:00
Igor Mandrigin
9e3d4b8b2a linters 2020-08-29 15:43:33 +02:00
Igor Mandrigin
7396ccc37e linters 2020-08-29 15:37:27 +02:00
Igor Mandrigin
15e86b4b34 fix compilation issue 2020-08-29 15:30:06 +02:00
Igor Mandrigin
637493e8f1 Merge branch 'master' into geth-1.9.20 2020-08-29 15:28:03 +02:00
Igor Mandrigin
1e69e76f6d fix tests 2020-08-29 15:15:37 +02:00
Igor Mandrigin
bd61245ece test fixups 2020-08-29 14:35:39 +02:00
Igor Mandrigin
4b4326020c geth compiles 2020-08-29 14:03:41 +02:00
Igor Mandrigin
948cd29be7 fixes 2020-08-29 13:43:44 +02:00
Igor Mandrigin
78e466d06a fix imports 2020-08-29 13:31:46 +02:00
Felix Lange
e3cb3dc09c params: release Geth v1.9.20
# Conflicts:
#	params/version.go
2020-08-29 13:29:32 +02:00
Péter Szilágyi
a1c28a0178 params: update CHTs for v1.9.20 release 2020-08-29 13:28:59 +02:00
Shude Li
1fc802e7a7 graphql: add support for retrieving the chain id (#21451) 2020-08-29 13:28:52 +02:00
Péter Szilágyi
0dfcc3f6f8 core/rawdb: only complain loudly if truncating many items
# Conflicts:
#	core/rawdb/freezer_table.go
2020-08-29 13:28:46 +02:00
timcooijmans
b9bcd407d5 p2p/discover: avoid dropping unverified nodes when table is almost empty (#21396)
This change improves discovery behavior in small networks. Very small
networks would often fail to bootstrap because all member nodes were
dropping table content due to findnode failure. The check is now changed
to avoid dropping nodes on findnode failure when their bucket is almost
empty. It also relaxes the liveness check requirement for FINDNODE/v4
response nodes, returning unverified nodes as results when there aren't
any verified nodes yet.

The "findnode failed" log now reports whether the node was dropped
instead of the number of results. The value of the "results" was
always zero by definition.

Co-authored-by: Felix Lange <fjl@twurst.com>
# Conflicts:
#	p2p/discover/v4_udp.go
2020-08-29 13:28:18 +02:00
Péter Szilágyi
476cb0c4c1 core/state/snapshot: reduce disk layer depth during generation
# Conflicts:
#	core/state/snapshot/generate.go
#	core/state/snapshot/journal.go
#	core/state/snapshot/snapshot.go
2020-08-29 13:26:41 +02:00
Martin Holst Swende
fa3ee4bf6b eth: utilize sync bloom for getNodeData (#21445)
* eth/downloader, eth/handler: utilize sync bloom for getNodeData

* trie: handle if bloom is nil

* trie, downloader: check bloom nilness externally
# Conflicts:
#	eth/handler.go
2020-08-29 13:26:15 +02:00
Martin Holst Swende
991a1c063d core: do less lookups when writing fast-sync block bodies (#21468) 2020-08-29 13:25:33 +02:00
gary rong
550bd11f9d core, eth, les, trie: add a prefix to contract code (#21080)
# Conflicts:
#	cmd/evm/internal/t8ntool/execution.go
#	consensus/clique/clique.go
#	consensus/ethash/consensus.go
#	core/block_validator.go
#	core/blockchain.go
#	core/blockchain_test.go
#	core/genesis.go
#	core/rawdb/accessors_indexes_test.go
#	core/rawdb/accessors_metadata.go
#	core/rawdb/chain_iterator_test.go
#	core/rawdb/database.go
#	core/rawdb/schema.go
#	core/state/database.go
#	core/state/iterator_test.go
#	core/state/statedb.go
#	core/state/sync.go
#	core/state/sync_test.go
#	core/tx_pool_test.go
#	core/types/block_test.go
#	core/types/derive_sha.go
#	eth/downloader/downloader.go
#	eth/downloader/queue.go
#	eth/downloader/statesync.go
#	eth/fetcher/block_fetcher.go
#	eth/fetcher/block_fetcher_test.go
#	eth/handler.go
#	les/odr_requests.go
#	les/server_handler.go
#	light/odr.go
#	light/odr_test.go
#	light/trie.go
#	miner/worker.go
#	trie/database.go
#	trie/secure_trie.go
#	trie/sync.go
#	trie/sync_bloom.go
#	trie/sync_test.go
2020-08-29 13:25:20 +02:00
Martin Holst Swende
b670cc44a5 eth/downloader: fix rollback issue on short chains 2020-08-29 12:30:17 +02:00
Marius van der Wijden
f6ba57ebc1 metrics: zero temp variable in updateMeter (#21470)
* metrics: zero temp variable in  updateMeter

Previously the temp variable was not updated properly after summing it to count.
This meant we had astronomically high metrics, now we zero out the temp whenever we
sum it onto the snapshot count

* metrics: move temp variable to be aligned, unit tests

Moves the temp variable in MeterSnapshot to be 64-bit aligned because of the atomic bug.
Adds a unit test, that catches the previous bug.
2020-08-29 12:30:07 +02:00
Péter Szilágyi
f734b7a0eb travis, dockerfile, appveyor, build: bump to Go 1.15
# Conflicts:
#	Dockerfile
#	Dockerfile.alltools
#	build/checksums.txt
2020-08-29 12:29:55 +02:00
Péter Szilágyi
bfac425c87 core: define and test chain rewind corner cases (#21409)
* core: define and test chain reparation cornercases

* core: write up a variety of set-head tests

* core, eth: unify chain rollbacks, handle all the cases

* core: make linter smile

* core: remove commented out legacy code

* core, eth/downloader: fix review comments

* core: revert a removed recovery mechanism
# Conflicts:
#	core/blockchain.go
#	core/blockchain_test.go
#	core/headerchain.go
#	core/rawdb/database.go
#	core/rawdb/freezer.go
#	core/rawdb/schema.go
#	eth/downloader/downloader.go
#	eth/sync.go
#	trie/sync.go
2020-08-29 12:29:00 +02:00
Alex Sharov
46a5d9c275
clean (#1001) 2020-08-29 17:07:12 +07:00
Alex Sharov
ca0bc897dc
clear logs (#1000) 2020-08-29 17:06:53 +07:00
Alex Sharov
5ce73d438a
fix integration (#999) 2020-08-29 15:27:20 +07:00
Alex Sharov
8c9a55bb21
[To test on HDD] Write changesets to tx instead of mutation (#978)
* use mutation over tx

* clear

* add .CommitAndBegin() method

* multip put 2

* right sorting

* write non-random things to tx

* write non-random things to tx

* disable multi put 2

* clean

* clean

* remove multiput2

* clean

* clean

* clean

* clean

* clean

* add receipts
2020-08-29 08:32:51 +01:00
Alex Sharov
07ca5c643a
eth_syncing (#991)
* eth_syncing

* linters

* fix readme

* cleanup cli params

* go mod tidy

* remove memsize ui dep

* remove bloomfilter

* implement net_peerCount

* remove legacy flags
2020-08-29 08:24:50 +01:00
Alex Sharov
bdb2e354ce
restapi_to_follog_geth_cli_variables (#993) 2020-08-28 11:27:56 +01:00
ledgerwatch
335aedc7e3
Cut down the stateGrowth generation code (#973)
* Cut down the stateGrowth generation

* Fix NPE

* Fix for lastTimestamp

* Adjust to the current state

* Potential fix

* Fix for shorter keys in the state

* Extract code

* Iterate over code
2020-08-28 10:31:37 +01:00
Alex Sharov
d30df505c8
Don't read cwd in blockchain validator, remove debug code (#992)
* print cwd

* don't read cwd, remove debug code

* oops, overdelete

* clean
2020-08-28 10:30:22 +01:00
Alex Sharov
d73b036cff
python_bublic_print_cli (#994) 2020-08-28 14:19:34 +07:00
Alex Sharov
de16812a94
move tx limit from 16 to 32 blocks (#988) 2020-08-28 07:28:08 +01:00
Alex Sharov
df05a581dd
Add tx pool stage to transaction (#981)
* add tx_pool stage to tx

* clean

* don't call commit in read tx

* don't call commit in read tx

* clean

* more logs

* fix tx pool race

* more logs

* clean
2020-08-28 07:27:48 +01:00
Suhabe Bugrara
8b31944611
Control Flow Analysis (#990)
* First

* More on SA interpreter

* Fixup

* Add cfg action to hack binary that invokes the SaInterpreter. Added an operation handler for PUSH1

* refactor cfg tests into separate file

* Move cfg tests into separate file

* More refactoring into new file

* dataflow interpreter

* work on cfg0

* finish cfg0

* df works on base examples

* refactor into dataflow spec

* add bounded stack

* add harder example

* fix switch pass thru

* fix switch pass thru

* bug fix, and better printing

* manual merge

* restore call to test gencfg

* abstract interpretation based cfg analysis

* fix post signature

* use uint256 instead uint64, add post function

* preprocess stmts

* initial implementation of resolve

* fix resolve

* fix resolve

* print stmts for edges

* print stmts for edges

* print states

* print states

* bug fixes, debugging

* fix jumpi dest - first working impl

* reachability analysis to filter out dead edges

* add all transfer functions

* larger contract bytecodes from solc compiler

* simple solidity contract goes thru

* add deposit contract bytecode

* rename deposit contract test

* fix new contract arg

* Address non-determinism leading to imprecise results

* improve debugging output

* improve debugging output

* improve debugging output

* fix for bug causing incorrect analysis results

* fix for bug causing incorrect analysis results

* fix for bug causing incorrect analysis results

* add more test cases

* fix coverage bug

* debugging for non-termination

* fix bad fixpoint check

* fix data inference

* fix transfer function for halting stmts

* switch to deposit contract test, disable debugging

* add anly counter to viz, fix stmt.valid check

* show all preds, adjust anlycounter behavior

* dfs instead of bfs to fail earlier

* viz improvements

* add worklist size to viz

* add test case for private functions

* valueset analysis

* add more checks to fail earlier in the analysis to help debugging, improve debugging output, catch additional bad jumps

* delete old code

* delete old code

* delete old code

* fix up minor changes to jump table

* copy over comments from cgf-1 branch

* remove minor diffs

* add recompiled deposit contract

* graph viz

* cleanup/refactoring

* initial impl of viz

* script to run cfg anly and generate dot file

* div example

* accept bytecode from cmd line

* add minimal deposit contract example

* replace valueset analysis with stackset analysis

* get in sync with master

* sync with master

* fix linting

* fix linting

* fix linting

* reformatting

* fix linting

* fix linting

* fix linting

* fix linting

* fix linting

* fix linting

* fix linting

Co-authored-by: Alexey Akhunov <akhounov@gmail.com>
2020-08-28 07:26:49 +01:00
Marius van der Wijden
08d3993cef core: more detailed metering for reorgs (#21420) 2020-08-27 21:23:51 +02:00
Alex Sharov
af81bb0de6
[merge after release] Simplified loader (#979)
* v0

* more docs, less customization

* more docs, less customization

* more docs, less customization

* don't store db reference

* rely on fact that lmdb key/value valid until end of transaction

* clean

* clean
2020-08-27 19:21:50 +01:00