Commit Graph

227 Commits

Author SHA1 Message Date
keorn fa504e510f Merge branch 'master' into auth-bft 2016-12-12 21:28:46 +01:00
arkpar 6601fde328 New data paths with upgrade 2016-12-12 16:51:07 +01:00
Gav Wood 17cc2be4b5
Rename ethcore -> parity in license. 2016-12-11 19:30:54 +01:00
arkpar 97f358ced9 AuthorityRound network simulation test 2016-12-09 20:38:06 +01:00
arkpar ca7406773f AuthorityRound network simulation test 2016-12-09 19:27:16 +01:00
Gav Wood ad36743122 Merge pull request #3719 from ethcore/engine-block-ordering
Engine block ordering
2016-12-05 10:37:36 -08:00
keorn 6fc943ca6d Merge branch 'master' into auth-bft 2016-12-05 16:37:35 +00:00
Robert Habermeier a726472023 Merge pull request #3713 from ethcore/fix-v-u64
Encode networkid as a u64.
2016-12-05 17:14:07 +01:00
keorn c61a0e97b3 make engine determine block order 2016-12-05 15:20:32 +00:00
keorn c39d504167 Merge branch 'spec-rlp-loading' into auth-bft 2016-12-05 14:11:06 +00:00
keorn 22632e6324 make generic seal take valid rlp 2016-12-05 14:07:31 +00:00
Gav Wood 2911c549e3
Encode networkid as a u64. 2016-12-04 10:48:26 -08:00
keorn 155da50fcd Merge branch 'master' into auth-bft 2016-11-30 13:06:21 +00:00
arkpar b0555fbe7c State export 2016-11-28 01:37:24 +01:00
keorn 66526af5a8 pass engine in tests 2016-11-21 18:53:53 +00:00
keorn 8ac989cbeb Merge remote-tracking branch 'parity/master' into bft 2016-11-16 10:29:54 +00:00
keorn d19e8c5505 Merge remote-tracking branch 'parity/master' into bft 2016-11-15 10:26:37 +00:00
keorn 54e4956345 return errors from constructor 2016-11-15 10:21:18 +00:00
keorn ae5ae765a6 Merge branch 'master' into auth-round 2016-11-14 18:04:44 +00:00
keorn 06ebd5fa1a remove most panics 2016-11-14 17:42:56 +00:00
keorn 0b5a9a6e60 nicer bundled spec message 2016-11-14 14:29:33 +00:00
keorn 501f6d3f49 Merge branch 'master' into auth-round 2016-11-14 10:08:14 +00:00
keorn d8e6dbd981 Merge branch 'master' into dev-chain 2016-11-14 10:05:34 +00:00
keorn 2d4b4cf5c9 revert moves to Spec 2016-11-14 10:04:34 +00:00
Gav Wood 4a92668c56 Fix chainspec storage field. (#3406)
Add a test.
2016-11-13 13:58:42 +01:00
keorn 53258cca6c add new dev spec 2016-11-11 17:27:20 +00:00
keorn a719b91b63 move spec constructors to spec 2016-11-11 16:37:44 +00:00
keorn ea960f1c27 Merge remote-tracking branch 'parity/master' into bft 2016-11-07 11:34:45 +00:00
keorn 255ec0c139 Merge branch 'master' into auth-round 2016-11-04 11:35:17 +00:00
Gav Wood d3de475205 EIPs 155, 160, 161 (#2976)
* The front-end for each hard-fork, also EIP-160.

* Address EIP161 a/c

* Include EIP-161b

* EIP-161 part d.

* Fix test build.

* Fix one test, add another.

* Fix use of bloom & renaming.

* Initial groundwork for EIP-155

* Fix minor bug.

* Fix all tests finally.

* Rest of EIP-155.

* Add tests for EIP-155 algorithm.

Update transaction tests validation.

* Minor reformat.

* Address grumbles.

* Remove unused code.

* Fix SUICIDE gas mechanism and add consensus tests.

* Remove commented code.

* Set Frontier hardfork block number

* Fix warning.

* Transaction tests,
2016-11-03 22:22:25 +01:00
keorn 3ff26dd544 Merge branch 'master' into auth-round-no-mocknet 2016-10-26 17:50:04 +01:00
Robert Habermeier 0fedc27332 Remove ethcore::common re-export module (#2792)
* no longer export action_params

* remove transaction, header, receipt re-rexports from common

* remove env_info and builtins re-exports from common

* remove everything but util export from common

* replace common usages with util, remove module

* add a prelude module for ethcore-bigint
2016-10-24 18:35:25 +02:00
keorn aa05823afe Merge remote-tracking branch 'parity/master' into auth-round-no-mocknet 2016-10-24 15:32:30 +01:00
Robert Habermeier 96f4c10453 sweep most unwraps from ethcore crate, dapps crate (#2762)
* sweep most unwraps from ethcore crate

* purge unwrap from dapps server

* whitespace

[ci:none]
2016-10-20 23:41:15 +02:00
keorn 44f42ac7d3 Merge remote-tracking branch 'parity/master' into auth-round-no-mocknet
Conflicts:
	ethcore/src/state/mod.rs
	ethcore/src/tests/mod.rs
2016-10-12 18:39:31 +01:00
keorn 1f56588b87 Merge remote-tracking branch 'parity/master' into bft
Conflicts:
	ethcore/src/client/client.rs
2016-10-05 14:57:14 +01:00
keorn 64d7bcbd0c validators -> authorities 2016-10-05 14:31:31 +01:00
Nikolay Volf e1d3b3fff8 Accounts bloom in master (#2426)
* bloom crate link

* database layout and outdated tests

* state db alterations

* v10 migration run

* using arc

* bloom migration

* migration fixes and mess

* fix tests
2016-10-03 12:02:43 +02:00
keorn 9ca938f740 Merge remote-tracking branch 'parity/master' into bft
Conflicts:
	ethcore/src/client/client.rs
	sync/src/api.rs
2016-09-30 12:44:52 +01:00
keorn d59e9e816e fix tests compilation 2016-09-29 16:57:52 +01:00
Gav Wood 15a14a5f49 Expanse compatibility (#2369)
* Add support for Expanse.

* Fix build.

* Refactor to be able to alter the eth subprotocol name

* Fix JSON.

* Support exp hardfork.

* Fix exp json again.

* Fixed test

* Fix tests.
2016-09-28 14:21:59 +02:00
Arkadiy Paronyan ad63780b4d Canonical state cache (master) (#2311)
* State cache

* Reduced copying data between caches

Whitespace and optional symbols

* Reduced copying data between caches

Whitespace and optional symbols

* Set a limit on storage cache

* Style and docs
2016-09-27 18:02:11 +02:00
keorn fd6900bbb3 Merge remote-tracking branch 'parity/master' into bft
Conflicts:
	Cargo.lock
2016-09-27 12:37:43 +02:00
keorn 49fba0b548 Merge branch 'master' into auth-round
Conflicts:
	ethcore/src/miner/miner.rs
	sync/Cargo.toml
2016-09-19 14:35:44 +02:00
Tomasz Drwięga 7f7e74869c Bump clippy & Fix warnings (#2109)
* Bump clippy

* Fixing warnings
2016-09-16 23:03:26 +02:00
keorn bb59c2288e docs on authority spec 2016-09-14 17:28:57 +02:00
keorn bedbe6e65e update test spec loading 2016-09-14 11:20:22 +02:00
keorn ddb6fec171 add new test specs 2016-09-14 11:17:39 +02:00
keorn 341e06481e Split internal sealing from work preparation (#2071)
* separate block preparation methods

* Split internal sealing from work sealing, add cli option

* replace cli with engine method, simplify

* More docs about sealing types. Bypass work in external txs.

* split requires_reseal, add test and new test miner
2016-09-13 15:09:07 +02:00
keorn 8b9e7c0ba5 Merge remote-tracking branch 'parity/split-internal-seal' into auth-round 2016-09-13 12:57:52 +02:00
keorn e41b6c410f split requires_reseal, add test and new test miner 2016-09-13 12:52:14 +02:00
keorn 747898d8e7 add new engine to spec 2016-09-08 12:28:59 +02:00
keorn 4ccbec1148 Merge remote-tracking branch 'parity/master' into bft
Conflicts:
	sync/src/api.rs
	sync/src/lib.rs
2016-09-07 16:54:39 +02:00
keorn 91fbaf935c Merge remote-tracking branch 'parity/master' into bft
Conflicts:
	ethcore/src/client/client.rs
2016-09-05 18:16:09 +02:00
keorn 0af4bf23a9 add internal timeout service, test proposer switching 2016-09-05 17:51:29 +02:00
debris aa8b871e49 handling invalid spec jsons properly, additional tests, closes #1840 2016-09-05 17:41:34 +02:00
Robert Habermeier bb6243c550 merge with master 2016-09-01 15:07:06 +02:00
Robert Habermeier 5dd56aa070 port ethcore 2016-09-01 14:29:59 +02:00
Robert Habermeier 9a5668f802 get rid of populatable and bytesconvertable traits (#2019) 2016-09-01 12:23:31 +02:00
keorn 2f3d162f57 Merge remote-tracking branch 'parity/master' into bft 2016-08-31 18:19:24 +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
keorn 3aa862c9c2 add test, start tendermint 2016-08-23 12:58:40 +02:00
keorn a20a0de48f add spec 2016-08-21 15:28:40 +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
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
keorn b672d51a74 Instant sealing engine (#1767)
* add an instant sealing engine

* add sealing engine tests

* rename to InstantSeal

* update name in json

* whitespace

[ci:skip]
2016-07-30 14:42:31 -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
Arkadiy Paronyan 6b1e722a6b Disconnect peers on a fork (#1738) 2016-07-27 21:38:22 +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
Robert Habermeier 36d3d0d7d7 replace synchronization primitives with those from parking_lot (#1593)
* parking_lot in cargo.toml

* replace all lock invocations with parking_lot ones

* use parking_lot synchronization primitives
2016-07-13 19:59:59 +02:00
Robert Habermeier 7200cfcbc9 expunge &Vec<T> pattern (#1579)
* expunge &Vec<T> pattern

* fix travis
2016-07-12 10:28:35 +02:00
Gav Wood 3b662c285f Switch out .X().unwrap() for .unwrapped_X 2016-07-07 09:37:31 +02:00
Gav Wood 335bce85e8 Gas price statistics. (#1291)
* Gas price statistics.

Affects eth_gasPrice.
Added ethcore_gasPriceStatistics.

Closes #1265

* Fix a bug in eth_gasPrice

* Fix tests.

* Revert minor alteration.

* Tests for gas_price_statistics.

- Tests;
- Additional infrastructure for generating test blocks with
transactions.
2016-06-18 10:52:50 +02:00
Gav Wood ac73b2628a Basic Authority (#991)
* Firt commit.

* First non-functional but correct implementation of BasicAuthority.

Still needs:
- Sealing infrastructure.

* Punch a hole to give miner access to key store.

* Fix test built.

* Basic version of synchronous mining.

This will seal a block whenever a new transaction comes through.
To be made better we need a timer which will wait for one second after the
last block before sealing a new one - better still would be to cooperatively
interleave blocks with other sealing nodes.

* Add tests.

* Fix minor issues from repotting.

* Address grumbles.
2016-05-03 17:23:53 +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
Gav Wood 72b604b8e8 Avoid tracing DELEGATECALL and CALLCODE. Plus tests for it. 2016-03-20 19:20:37 +01:00
debris 1f03ae54d6 moved ethcores spec to its own module, added genesis 2016-03-17 15:15:10 +01:00