Commit Graph

228 Commits

Author SHA1 Message Date
Robert Habermeier 5dd56aa070 port ethcore 2016-09-01 14:29:59 +02:00
Nipunn Koorapati 4389742ca3 Make the block header struct's internals private (#2000)
* Make the block header struct's internals private

Currently, this involves a lot of explicit cloning, but we
could migrate the return types of the get_* functions to
be copies rather than references since they are mostly copy
types anyway.

I opted to eliminate the constructor in favor of using
Default::default() plus calling a bunch of setters. This
is similar to the model that a Google Protobuf client uses
and I think it looks fine.

* Drop some unnecessary cloning by comparing references

* Fix compiler errors from callsites in tests.
2016-08-29 11:35:23 +02:00
Robert Habermeier 2aef81cf90 remove internal locking from DBTransaction (#2003) 2016-08-25 16:43:56 +02:00
Robert Habermeier 190e4db266 Trie query recording and AccountDB factory for no mangling (#1944)
* optionally use no mangling for accountdb

* add the recorder module

* get_recorded for tries, no virtual dispatch on readonly tries

* add recording test
2016-08-24 16:53:36 +02:00
Robert Habermeier 9adf77581c move column family constants into db module (#1955) 2016-08-18 18:24:49 +02:00
Robert Habermeier 57dbdaada9 remove impossible panickers related to infallible db transaction (#1947) 2016-08-18 09:43:56 +02:00
Gav Wood ccdf80f4dc Fix several RPCs (#1926)
* Fix up pending receipts details.

* Add support for additional params and registry over RPC.

* Fix tests.

* Add test, additional fix.

Fixes #1932.

* Fix up tests.

* Fix test.

* Fix test.
2016-08-17 19:25:02 +02:00
debris 974d537849 Merge branch 'master' of github.com:ethcore/parity into move_hash 2016-08-09 09:58:18 +02:00
Robert Habermeier 2f1ade8116 take snapshot at specified block and slightly better informants (#1873)
* prettier informant for snapshot creation

* allow taking snapshot at a given block

* minor tweaks

* elaborate on cli
2016-08-08 18:41:30 +02:00
Tomasz Drwięga 59b0f8c7a3 RPC errors & logs (#1845)
* Refactoring errors in RPC

* Updating jsonrpc-core

* Fixing code_at

* Avoid mentioning obvious segments in proof

[ci:skip]
2016-08-08 17:25:15 +02:00
debris 88c5f555a9 Merge branch 'master' of github.com:ethcore/parity into move_hash 2016-08-06 00:03:07 +02:00
Robert Habermeier e72fc5398a miner and client take spec reference (#1853)
* miner and client take spec reference

* fix tests
2016-08-05 23:33:55 +02:00
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
debris 316c9093db Merge branch 'master' of github.com:ethcore/parity into move_hash 2016-08-05 10:53:34 +02:00
Arkadiy Paronyan 05bfdc508e Split IO and network crates (#1828)
* Abort on panic

* Split IO and network crates

* Restore panic handler

* Fixed doc tests
2016-08-05 10:32:04 +02:00
debris 1ed2de1d9b Merge branch 'master' of github.com:ethcore/parity into move_hash 2016-08-05 09:30:01 +02:00
Tomasz Drwięga 25aabe6e52 Supporting blockid in eth_call and trace_call/trace_raw (#1837)
* Supporting blockid in eth_call and trace_call/trace_raw

* Nicer state diff handling

* Purging deref.deref
2016-08-04 18:17:21 +02:00
debris 4051524462 improved naming 2016-08-04 08:52:31 +02:00
debris 03c3d16744 Merge branch 'master' of github.com:ethcore/parity into move_hash 2016-08-04 08:41:30 +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
Tomasz Drwięga deceb5fd56 Bumping clippy & fixing warnings (#1823)
* Bumping clippy

* Fixing clippy warnings

* Cargo.lock (latest nightly?)
2016-08-03 19:01:48 +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
debris e8c451ac82 cleaning up hash reexports 2016-08-03 18:05:17 +02:00
Gav Wood 9de579366a Miner tweaks (#1797)
* Mining fixes.

- Use queue to determine whether we're mining
- Kick stale hash rates

Fixes #1794
Fixes #1641

* Fix tests.

* Address grumbles.
2016-08-02 17:53:32 +01:00
Arkadiy Paronyan d891e80ad7 Commit best block after closing transaction (#1791) 2016-08-01 10:10:13 -07:00
Marek Kotewicz bcf8cd6dc0 cache manager and clearing tracing cache (#1769)
* removed configure_cache method

* generic cache_manager struct

* fixed #1743, tracing caches are cleared

* removed deadlocks in garbage_collect, implemented HeapSizeOf for traces

* trace cache config

* fixed carbage typo
2016-07-30 15:19:27 -07:00
Arkadiy Paronyan 57faa37623 Disable WAL (#1765)
* Disable WAL

* Make WAL optional

* Fix tests.

* Update cli.rs
2016-07-29 15:36:00 +02:00
Arkadiy Paronyan b37086722a Don't call update_sealing on importing own block (#1762) 2016-07-29 09:56:55 +02:00
Tomasz Drwięga e4f0c0b215 Single DB (#1741)
* Consolidation migration

* Started db amalgamation

* Using client constants for columns

* Adding with_columns constructor

* Migrating to single db

* Fixing tests.

* test.sh without verbose

* Fixing warnings

* add migration tests that catch the bug

* make multiple migrations more robust

* add moved v9

* Merge branch 'noop-migrations' into single-db

* spurious line

* clean up migrations ordering

* update comment [ci skip]

* Bumping default number of max_open_files & re-ordering columns.

* fix merge

* fix ignored analysis tests

* Caching best block content

* Faster best_block_header

* Adding progress to v8 migration

* clean up warnings

* Separate hashes and bodies in the DB

* Separate hashes and bodies in the DB

* Fixed tests
2016-07-28 23:46:24 +02:00
Gav Wood 297d25dd65 Combine mining queue and enabled into single locked datum (#1749)
* Combine mining queue and enabled into single locked datum

Additional tracing.

* Fix bug uncovered by test.

* Fix typo

* Remove unneeded log initialisation in test.

[ci:skip]
2016-07-28 21:06:36 +02: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
Marek Kotewicz f33cd60dc2 compaction profile used during migration, fixes #1750 (#1751)
* compaction profile used during migration, fixes #1750

* whitespace

[ci:skip]
2016-07-28 20:29:58 +02:00
Gav Wood eaa41ea568 Add RPC & client call to replay a transaction. (#1734)
* Add RPC & client call to replay a transaction.

* Address grumbles
2016-07-27 21:34:32 +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 226fe8e0bb cli overhaul (#1600)
* cli commands

* cleanup parity/signer

* cleanup parity/signer

* remove redundant import of signer crate from main.rs

* cli cleanup in progress

* cli cleanup in progress

* moved few commonly used functions to separate methods with tests

* cleaning up blockchain import in progress

* cleaning up blockchain import in progress2

* cleaning up blockchain import in progress3

* tests for database compaction profile parsing

* cleaning up blockchain import in progress4

* cleaning up blockchain import in progress5

* blockchain import

* export blockchain in progress

* cleanup execute_export

* Configuration::to_duration cleaned up

* removed unused code, tests for to_duration

* cleanup Configuration::mode function

* parsing some of the cli params in params.rs

* rpc and signer are no longer optional

* move importing extern crates to main.rs file

* swipe dies from rpc module

* swipe dies from dapps

* finding deprecated

* several tests and fixes for parity

* parity cleanup in progress

* cleanup price parsing

* parity cleanup in progress

* swiped all dies

* parity cleanup in progress

* replace usages of from_str with parse() in parity/params.rs

* removed few more from_str

* split parity/params.rs into params and helpers

* removed wildcard import from configuration.rs

* cleanup directories/path creation

* cleaning up run cmd

* moved LoggerConfig

* defaults for cli params

* fixed indention in raise_fd_limit

* tests for rpc_apis

* tests for default ipc and rpc settings

* ipc socket

* cleanup in progress

* account service

* cleanup miner config

* BlockChain commands use Directiores structure now

* client_config

* network settings and dapps configuration

* removing warnings

* default logger config

* fixed client_path

* overhaul

* fixing export && import

* default export DataFormat

* import and export also upgrade db

* fixed export && import

* polishing pr

* polishing pr

* fixed custom bootnodes

* fixed daemonize on windows

* fixed setting up enable network

* finished pr

* fixed compiling on windows

* Fixed warning; windows build

* Better cache management

* Fixed tests on windows

* Fixed test

* Restored pruning method names

* --cache alias

* Fixed more tests

* Ensure default options actually listed as valid

[ci:skip]
2016-07-25 16:09:47 +02:00
Gav Wood e734810293 Ethereum classic (#1706)
* Add Ethereum Classic support

(Rename homestead-dogmatic -> classic)

* Additional change needed.

* More needed changes.

* Separate database path for known forks.

* Address minor grumble.
2016-07-25 10:20:22 +02:00
Arkadiy Paronyan 9a8fdeead9 Enable WAL and disable DB repair (#1696)
* Enable WAL

* Disable rewind
2016-07-23 17:05:34 +02:00
Nikolay Volf 8ab56ea3d1 IPC (feature-gated) (#1654)
* moving ipc deriving to trait

* refactoring of the client

* all compiled

* proved all working

* warnings purged

* allow hypervisor to specify initialization payload in two ways

* using binary initialisation payload for sync

* some docs

* logger to separate crate

* log settings for sync bin

* forwarding logging arguments to the sync
2016-07-20 18:13:56 +02:00
Arkadiy Paronyan b007770ba8 Moved syncing log out of the client (#1670) 2016-07-20 12:36:20 +02:00
gregg dourgarian d67369a01c fix typos (#1644) 2016-07-19 20:42:23 +02:00
debris f31e7d54af fixed failing master 2016-07-19 10:54:25 +02:00
Arkadiy Paronyan 4e447ccc68 More performance optimizations (#1649)
* Use tree index for DB

* Set uncles_hash, tx_root, receipts_root from verified block

* Use Filth instead of a bool

* Fix empty root check

* Flush block queue properly

* Expunge deref
2016-07-19 09:23:53 +02:00
Nikolay Volf 459dcbcef1 Removing unused client code (#1645)
* moving ipc deriving to trait

* refactoring of the client
2016-07-19 09:21:41 +02:00
NikVolf 028d6f6853 Merge branch 'master' into sync-svc 2016-07-18 15:20:57 +02:00
Arkadiy Paronyan dd17c766b8 Blockchain repair on missing state root (#1646)
* BC locking; Recovery batch

* Missing state root recovery

* Test
2016-07-17 23:03:29 +02:00
Gav Wood 0d2f516ad7 Multi-mode logging. (#1643)
* Multi-mode logging.

Better for miners (they get immediate notification of new block).
Better for general use (less superfluous information shown).

* Remove comment.

[ci:skip]

* Minor string change

[ci:skip]

* Minor message tweak.

* Minor tweaks and indentation fix.
2016-07-17 23:00:57 +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
NikVolf c3ef5c10a3 got rid of the generic parameter for ipc interface 2016-07-16 19:24:45 +02:00
NikVolf 77bbab009e got rid of Arc<T> dispatch 2016-07-16 19:09:14 +02:00