Commit Graph

177 Commits

Author SHA1 Message Date
Robert Habermeier 797a3e1cd9 EIP198 and built-in activation (#4926)
* EIP198 and built-in activation

* address review
2017-03-21 19:36:38 +03:00
keorn a84a10ff03 Add replay protection (#4808)
* add eip155

* make network_id default
2017-03-08 14:44:07 +01:00
keorn ac6180a6fe seals_internally (#4613) 2017-02-20 16:35:53 +01:00
Gav Wood 8404edb656 Fix whitespace (#4299)
* Fix whitespace.

* Update copyright years/owner.

* Push release only for tags.
2017-01-25 18:51:41 +01:00
keorn e9251a9325 Generic engine utilities (#4258)
* move modules up

* make structs generic

* reound to view and tests

* fix
2017-01-24 22:03:03 +01:00
keorn ba0209678b ValidatorSet reporting (#4208)
* remove register_account_provider

* build rpc module

* new dummy client

* common EngineSigner struct

* from -> into

* initial report via call

* separate safe from regular contract

* transact_contract

* fix build

* return Signature, docs

* add sign method to some engines

* add safeContract spec

* update specs to new contracts

* use AuthorityRound for contract spec

* add more reporting

* add reporting test

* use gas floor

* shorter
2017-01-24 12:03:58 +03:00
keorn b7f9b304c1 Chain scoring (#4218)
* chain scoring

* use current steps
2017-01-23 17:27:11 +03:00
keorn 97a60ceab1 Common EngineSigner (#4189)
* remove register_account_provider

* build rpc module

* new dummy client

* common EngineSigner struct

* from -> into

* return Signature, docs
2017-01-20 13:25:17 +01:00
keorn 73b80869f5 Remove unnecessary Engine method (#4184)
* remove register_account_provider

* build rpc module

* new dummy client
2017-01-18 18:49:50 +01:00
Tomasz Drwięga e11353f94c UnverifiedTransaction type (#4134)
* Introducing ValidSignedTransaction

* Verifiying transactions in engines

* Widening use of VerifiedSignedTransaction

* Renaming Transactions

* Uncommenting banning queue & Fixing tests

* Fixing json tests

* Fixing pre-homestead test

* Fixing imports

* Addressing grumbles

* Fixing test
2017-01-13 08:51:36 +00:00
keorn be30c44179 Validator/authority contract (#3937)
* dir

* simple validator list

* stub validator contract

* make the engine hold Weak<Client> instead of IoChannel

* validator set factory

* register weak client with ValidatorContract

* check chain security

* add address array to generator

* register provider contract

* update validator set on notify

* add validator contract spec

* simple list test

* split update and contract test

* contract change

* use client in tendermint

* fix deadlock

* step duration in params

* adapt tendermint tests

* add storage fields to test spec

* constructor spec

* execute under wrong address

* create under correct address

* revert

* validator contract constructor

* move genesis block lookup

* add removal ability to contract

* validator contract adding validators

* fix basic authority

* validator changing test

* more docs

* update sync tests

* remove env_logger

* another env_logger

* cameltoe

* hold EngineClient instead of Client

* add a comment about lock scope
2017-01-10 12:23:59 +01:00
keorn fa504e510f Merge branch 'master' into auth-bft 2016-12-12 21:28:46 +01:00
Gav Wood 58b72c521d
Rename ethcore -> parity in licenses. 2016-12-11 19:31:31 +01:00
Robert Habermeier 9252ebf93d block: enforce gas limit falls within engine bounds 2016-12-11 12:50:48 +01:00
arkpar c777362d02 Sync channel for consensus test 2016-12-11 12:32:01 +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
keorn 56e9dab9de add Engine stop method 2016-12-09 14:52:08 +01:00
keorn 3ebfa1481d better proposal block handling 2016-12-08 12:03:34 +01:00
keorn 8f641e67f3 Merge branch 'engine-password' into auth-bft 2016-12-06 13:13:02 +00:00
keorn 81a756394a Merge branch 'master' into engine-password 2016-12-05 17:08:57 +00:00
keorn 529a7fc33c add password and AccountProvider 2016-12-05 17:08:16 +00:00
keorn 6fc943ca6d Merge branch 'master' into auth-bft 2016-12-05 16:37:35 +00:00
keorn c61a0e97b3 make engine determine block order 2016-12-05 15:20:32 +00:00
Gav Wood 2911c549e3
Encode networkid as a u64. 2016-12-04 10:48:26 -08:00
keorn e0f2fac441 new error type 2016-12-02 13:32:00 +00:00
keorn 34d5017950 hold password in engine, add rpc 2016-11-30 12:59:33 +00:00
keorn 294e89e5c0 use EngineError instead of BlockError 2016-11-29 12:51:27 +00:00
keorn 340d377930 Revert "dont keep account provider in miner"
This reverts commit 11ccacd6d0.
2016-11-22 16:05:27 +00:00
keorn 9d61071dd7 Merge branch 'miner-no-ap' into auth-bft 2016-11-17 22:04:07 +00:00
keorn 11ccacd6d0 dont keep account provider in miner 2016-11-17 18:32:12 +00:00
keorn ce711e321a remove unused vote accumulators 2016-11-17 13:28:29 +00:00
keorn 9563ccfbd2 message broadcasting methods 2016-11-17 12:18:20 +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 55a5402bf5 simplify messages 2016-11-15 10:20:14 +00:00
keorn 49f2a72d5d Merge branch 'master' into auth-round 2016-11-09 10:35:00 +00:00
keorn ea960f1c27 Merge remote-tracking branch 'parity/master' into bft 2016-11-07 11:34:45 +00:00
Tomasz Drwięga f31d42d0c5 Exposing engine extra info in block RPC (#3169)
* Exposing extra info in RPC

* Proper serialization and client trait API
2016-11-04 17:35:02 +01: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 a03db2ff29 add is_new_best method to engines 2016-10-05 14:30:44 +01:00
keorn 76d7ec84bb new block ordering engine method 2016-09-30 14:43:52 +01:00
keorn 28cf91c7a5 remove mocknet stuff, clean up debug 2016-09-27 15:50:16 +01:00
keorn 0c69d4a1ce Merge remote-tracking branch 'parity/master' into auth-round
Conflicts:
	devtools/src/random_path.rs
2016-09-27 12:39:25 +02:00
keorn fd6900bbb3 Merge remote-tracking branch 'parity/master' into bft
Conflicts:
	Cargo.lock
2016-09-27 12:37:43 +02:00
keorn ec058cdb50 reseal on timeout 2016-09-27 12:12:18 +02:00
Tomasz Drwięga 15488b3e40 Fixing output of eth_call and Bytes deserialization (#2230)
* Fixing eth_call to builtins

* Fixing bytes deserialization

* Removing comment
2016-09-22 14:50:00 +02:00
keorn 167cfd4caa Enable sealing if Engine provides internal sealing given author (#2084)
* enable internal sealing based on author

* add tests, keep track of engine sealing status

* method to check if default address is_sealer

* simplify constructors

* fix typo
2016-09-15 12:12:15 +02:00
keorn 7f05021075 Merge remote-tracking branch 'parity/should-seal' into auth-round 2016-09-14 10:59:33 +02:00
keorn 0880d4ad8f method to check if default address is_sealer 2016-09-14 10:49:44 +02:00
keorn 2bd82269e8 add tests, keep track of engine sealing status 2016-09-14 00:00:26 +02:00
keorn fef94205e3 enable internal sealing based on author 2016-09-13 19:59:34 +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 d98f69cf58 Merge remote-tracking branch 'parity/split-internal-seal' into auth-round 2016-09-12 11:36:16 +02:00
keorn c0201bd891 replace cli with engine method, simplify 2016-09-12 11:07:40 +02:00
keorn 3a68fab066 new simple authority engine 2016-09-08 12:12:24 +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 2f3d162f57 Merge remote-tracking branch 'parity/master' into bft 2016-08-31 18:19:24 +02:00
keorn 4025645188 accumulate seal in precommit 2016-08-29 12:09:51 +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 a12a764d6c add rounds check, simplify tests 2016-08-26 19:27:50 +02:00
keorn fcae03e55f propose message test 2016-08-25 19:22:10 +02:00
keorn 77f06be7fb fix error propagation 2016-08-24 15:55:47 +02:00
keorn 1cb3c164da propose step 2016-08-24 11:58:49 +02:00
keorn 99a143eb37 change broadcast interface, add basic message handling 2016-08-23 17:19:23 +02:00
keorn 3aa862c9c2 add test, start tendermint 2016-08-23 12:58:40 +02:00
keorn 2f5aeda44f reusable voting on hashes 2016-08-22 13:19:23 +02:00
keorn 74939a43d6 fix types and lifetimes 2016-08-21 15:27:39 +02:00
keorn 8da38fa98b intro simple seal bft engine 2016-08-19 17:18:30 +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
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