Commit Graph

85 Commits

Author SHA1 Message Date
Robert Habermeier 76a7246369 Snapshot creation and restoration (#1679)
* to_rlp takes self by-reference

* clean up some derefs

* out-of-order insertion for blockchain

* implement block rebuilder without verification

* group block chunk header into struct

* block rebuilder does verification

* integrate snapshot service with client service; flesh out implementation more

* initial implementation of snapshot service

* remove snapshottaker trait

* snapshot writer trait with packed and loose implementations

* write chunks using "snapshotwriter" in service

* have snapshot taking use snapshotwriter

* implement snapshot readers

* back up client dbs when replacing

* use snapshot reader in snapshot service

* describe offset format

* use new get_db_path in parity, allow some errors in service

* blockchain formatting

* implement parity snapshot

* implement snapshot restore

* force blocks to be submitted in order

* fix bug loading block hashes in packed reader

* fix seal field loading

* fix uncle hash computation

* fix a few bugs

* store genesis state in db. reverse block chunk order in packed writer

* allow out-of-order import for blocks

* bring restoration types together

* only snapshot the last 30000 blocks

* restore into overlaydb instead of journaldb

* commit version to database

* use memorydbs and commit directly

* fix trie test compilation

* fix failing tests

* sha3_null_rlp, not H256::zero

* move overlaydb to ref_overlaydb, add new overlaydb without on-disk rc

* port archivedb to new overlaydb

* add deletion mode tests for overlaydb

* use new overlaydb, check state root at end

* share chain info between state and block snapshotting

* create blocks snapshot using blockchain directly

* allow snapshot from arbitrary block, remove panickers from snapshot creation

* begin test framework

* blockchain chunking test

* implement stateproducer::tick

* state snapshot test

* create block and state chunks concurrently, better restoration informant

* fix tests

* add deletion mode tests for overlaydb

* address comments

* more tests

* Fix up tests.

* remove a few printlns

* add a little more documentation to `commit`

* fix tests

* fix ref_overlaydb test names

* snapshot command skeleton

* revert ref_overlaydb renaming

* reimplement snapshot commands

* fix many errors

* everything but inject

* get ethcore compiling

* get snapshot tests passing again

* instrument snapshot commands again

* fix fallout from other changes, mark snapshots as experimental

* optimize injection patterns

* do two injections

* fix up tests

* take snapshots from 1000 blocks efore

* address minor comments

* fix a few io crate related errors

* clarify names about total difficulty

[ci skip]
2016-08-05 17:00:46 +02:00
Nikolay Volf aa59aa439d Fix state not using "account_starting_nonce" (#1830)
* failng test

* use account_starting_nonce instead of zero

* simplier test

* jsons are getting closer

* incorrect test client and incorrect tests fix

* null_morden is using 0x0 starting nonce

* replaced json with the correct one

* superwhatever line
2016-08-04 18:17:39 +02:00
Arkadiy Paronyan 7093651d70 More performance optimizations (#1814)
* Buffered DB

* Use identity hash for MemoryDB

* Various tweaks

* Delayed DB compression

* Reduce last_hashes cloning

* Keep state cache

* Updating tests

* Optimized to_big_int

* Fixing build with stable

* Safer code
2016-08-03 22:03:40 +02:00
Robert Habermeier 11b65ce53d Remove (almost all) panickers from trie module (#1776)
* memorydb ub patch and other cleanup

* fix denote invocations

* move trie traits into trie module

* replace "denote" with shim

* triedb returns results and no longer panics

* fix warnings

* get ethcore compiling

* warn on trie errors in ethcore

* remove unsafety from node decoder

* restore broken denote behavior for this branch

* fix overlayrecent fallout

* fix triedb tests

* remove unwrap in state

* alter Trie::get to return Result<Option<_>>

* fix refcell error in require

* fix test warnings

* fix json tests

* whitespace

[ci:skip]

* Avoid unneeded match/indentation

* whitespace

* prettify map_or_else

* remove test warning
2016-08-03 18:35:48 +02:00
Robert Habermeier 53f1d7b6ff fix state unsafety with a mostly-guaranteed handle (#1755)
* fix state unsafety with a mostly-guaranteed handle

* ensure_cached takes a closure directly
2016-07-30 06:45:16 -07:00
keorn 11cb544c24 Collect consensus/null engines into a single module (#1754)
* collect consesnsus engine code into module

* move Engine to mod

* fix json test
2016-07-28 20:32:20 +02:00
Marek Kotewicz 9746b944f1 Stackoverflow fix (#1742)
* executive tracer builds flat traces without intermediate struct

* temporarilt commented out tests for traces

* fixed new way of building trace address

* fixed new way of building trace address

* updating state tests with flat tracing in progress

* fixed flat tracing tests

* fixed compiling ethcore-rpc with new flat traces

* removed warnings from ethcore module

* remove unused data structures
2016-07-28 20:31:29 +02:00
Gav Wood ccb62d3b55 Trace other types of calls (#1727)
* Trace through DELEGATECALL and CALLCODE

Add them to the JSON output and RLP database store.

* Fix tests.

* Fix all tests.

* Fix one more test.
2016-07-27 17:41:21 +02:00
Tomasz Drwięga 3f41186b2e Fixing some clippy warnings (#1728)
* Fixing warnings

* Fixing unnecessary ref

* Removing unnecessary operation
2016-07-26 20:31:25 +02:00
Marek Kotewicz 63dbb527cc Suicides tracing (#1688)
* tracing suicide

* fixed #1635

* fixed typo
2016-07-22 14:47:23 +02:00
Arkadiy Paronyan 5ab18d1313 Performance optimizations (#1642)
* Optimize ethash verification

* disable WAL for puts

* Clear account cache after commit

* Commit only modified accounts

* Optimize existing block check

* Cache last hashes
2016-07-17 09:18:15 +02:00
Arkadiy Paronyan 5dba43178b Removed DAO soft fork traces (#1639) 2016-07-16 19:49:52 +02:00
Marek Kotewicz d8a4cca817 Fatdb integration with CLI (#1464)
* fatdb integration

* --fat-db

* rerun with --pruning=archive comment
2016-07-01 19:29:56 +01:00
Gav Wood 98ae9cad6f Minor additions to allow resetting of code. (#1482)
* Minor additions to allow resetting of code.

* Add test.
2016-06-29 16:29:04 +02:00
Gav Wood 353b9e91e6 Update SF to latest spec (#1386)
* Introduce whitelist for softfork

* Use extradata for fork id.

* Fix condition.
2016-06-22 15:37:25 +02:00
Gav Wood 72debeebcf Update code hash. 2016-06-20 20:47:07 +02:00
Marek Kotewicz 3617923d3c Merge pull request #1324 from ethcore/renamefield
Update default gas limit, rename field
2016-06-18 20:22:05 +02:00
Tomasz Drwięga 81df97a737 Fixing warnings (#1321) 2016-06-18 15:11:10 +02:00
Gav Wood 22e390f922 Rename block_dao -> reject_dao. 2016-06-18 15:00:12 +02:00
Gav Wood 42478add64 DAO Rescue soft fork (#1309)
* DAO Rescue soft fork

* Address minor issues.

* Fix tests.
2016-06-18 10:54:15 +02:00
Gav Wood 16412eb0c9 DAO Rescue soft fork (#1309)
* DAO Rescue soft fork

* Address minor issues.

* Fix tests.
2016-06-17 22:15:18 +02:00
Robert Habermeier 13968aaa38 Refactor triedb constructors to error on invalid state root (#1230)
* add TrieError, refactor Trie DB creation

* remove Result type alias due to glob import conflicts

* fix fallout in state.rs

* add debug, display impl for TrieError

* fix fallout in account.rs

* ethcore::Error::TrieError variant

* fix remaining fallout in ethcore crate

* added From<TrieError> impl for Error, removed map_err calls

* fix test breakages

* fix doc tests

* update docs

[ci skip]
2016-06-07 11:44:09 -07:00
Tomasz Drwięga 18ffd94674 Fixing warnings 2016-06-06 12:18:17 +02:00
Gav Wood d39b9506d2 Minor code refactor. 2016-06-05 18:24:17 +02:00
Gav Wood bc5c3da2af Merge branch 'vmtracing' into diffing 2016-06-02 12:28:09 +02:00
Gav Wood 26da38a439 Merge remote-tracking branch 'origin/master' into vmtracing 2016-06-02 11:40:39 +02:00
Robert Habermeier bbb858b386 address small syntax breakages 2016-05-31 21:38:05 +02:00
Gav Wood 34edecd59d State diffing, exposed through JSONRPC. 2016-05-31 21:03:44 +02:00
Robert Habermeier ff7c755930 mostly purge x! from ethcore 2016-05-31 16:59:01 +02:00
Gav Wood f9a0cc47a0 Enable PoD sutff. 2016-05-31 12:59:00 +02:00
Gav Wood 8082fdb3ff Fix max-value calls and add "creates" field to getTransaction. 2016-05-30 22:27:28 +02:00
Gav Wood c1ed520de0 RPC endpoint for VM tracing and ser/de types ready. 2016-05-28 16:52:33 +02:00
Marek Kotewicz 6cff58055d CLI option for using JITEVM (#1103)
* easily configurable vm (in progress)

* completely removed vm_factory from engine

* --jitvm command line flag
2016-05-19 00:44:49 +02:00
Tomasz Drwięga a950b81ee8 Fixing clippy warnings 2016-05-17 10:32:05 +02:00
Marek Kotewicz 66477a9476 Core tracedb functionality. (#996)
* fixed encoding 0u8

* simplified if else stmt

* tracedb core

* more comprehensive tracedb tests

* fixed minor review issues

* addresses filter

* fixed typos

* replace malformed with corrupted

* trace switch

* db key is generic and can be made smaller

* smaller tracedb keys

* tracedb version

* fixed ignored tests

* rename Tracedb -> TraceDB

* fixed typos

* proves

* trace only top level calls to builtins to avoid DDoS attacks

* fixed tracedb config switches

* fix comments fat replaced with trace

* vector-addressing scheme for localized traces

* removed comments

* removed first, redundant 0 from trace address

* updated db.trace method

* additional tests for tracedb.trace()
2016-04-30 16:41:24 +01:00
debris 610251fdf7 Merge branch 'master' into tracing 2016-04-11 11:35:07 +02:00
Marek Kotewicz 373284ca0a spec loading cleanup (#858)
* spec loading cleanup in progress

* changed engine field in json spec

* refactored engine params

* polishing spec loading refactor

* fixed compiling json tests

* fixed compiling parity

* removed warnings

* removed commented out code

* fixed failing test

* bringing back removed TODO in spec.
2016-04-09 10:20:35 -07:00
debris 64294853cc separated tracing logic to its own trait 2016-04-08 01:50:55 +02:00
debris 09beeaba8e trace result is a structure; 2016-04-06 21:23:52 +02:00
arkpar 9b7c48110a Fixed eth_call nonce and gas handling 2016-04-06 13:05:58 +02:00
Gav Wood d7c377dea6 Fix build. 2016-03-28 10:12:15 +02:00
Gav Wood 43e1d89067 Fix State cloning. 2016-03-27 14:35:27 +02:00
Gav Wood 97449afbb9 Merge branch 'master' into bettermining 2016-03-23 14:18:16 +01:00
Gav Wood a134f939e9 Non-functioning draft of code. 2016-03-22 13:05:18 +01:00
Gav Wood 2ab9d02158 Fix test. 2016-03-21 12:39:13 +01:00
Gav Wood c4d45e0cf0 Trace basic calls! And tests. 2016-03-21 11:24:03 +01:00
Gav Wood 72b604b8e8 Avoid tracing DELEGATECALL and CALLCODE. Plus tests for it. 2016-03-20 19:20:37 +01:00
Gav Wood c2933e005a Tests for not tracking builtin calls. 2016-03-20 17:51:22 +01:00
Gav Wood 6ac350a996 Tests for lots more configurations. 2016-03-20 16:24:19 +01:00
Gav Wood 5afd32dd84 Minor tweaks. 2016-03-20 12:09:55 +01:00