Commit Graph

440 Commits

Author SHA1 Message Date
Robert Habermeier 60bb0de9d6 Calculate post-constructors state root in spec at load time (#5523)
* apply contract constructors at spec load time

* debugging

* do trie updates in two stages

* add lint exception to newly-dead constructor

* squash warning in RPC tests

* kill dead accountdb constructors

* restore accountdb constructors under test configuration

* use provided state root in spec, if it exists
2017-05-03 09:00:02 +02:00
Robert Habermeier 35958a0965 Merge pull request #5454 from paritytech/aura-contract-warp
Groundwork for generalized warp sync
2017-04-25 17:58:13 +02:00
Robert Habermeier 6a5702f27c address grumbles 2017-04-24 13:14:50 +02:00
Robert Habermeier 7ab92f0807 epoch generation proof fixes 2017-04-22 18:56:34 +02:00
Robert Habermeier 167d06d727 fix panickers in tree-route 2017-04-20 16:21:53 +02:00
Robert Habermeier 6652df03df Merge branch 'master' into aura-contract-warp 2017-04-19 20:43:24 +02:00
Robert Habermeier 2ec3397b7d snapshot chunk and restore traits 2017-04-19 20:31:53 +02:00
Robert Habermeier 4d3f137e1e iterate over all epochs 2017-04-19 16:28:16 +02:00
Robert Habermeier af868a7439 ensure genesis validator set in DB 2017-04-19 15:35:12 +02:00
Robert Habermeier a278dd5a0a store epoch transition proofs in DB 2017-04-19 14:58:19 +02:00
Arkadiy Paronyan b50fb71dd1 EIP-86 (#4697)
* EIP-86

* Disable EIP-86 auto activation for now
2017-04-19 14:30:00 +02:00
Robert Habermeier f6f9816ef4 epoch verifier rename 2017-04-18 14:19:10 +02:00
Robert Habermeier e1fa4ab8ec verify_external in verifier trait 2017-04-13 20:34:16 +02:00
Robert Habermeier 715d5daafe ChainVerifier for memoizing validator sets 2017-04-13 20:24:21 +02:00
arkpar 314af4cdae Use in-memory database in tests 2017-04-13 12:17:53 +02:00
Robert Habermeier e2dfea8c12 set gas limit before proving transactions 2017-04-05 12:05:55 +02:00
Robert Habermeier c9c8f920d2 Futures-based native wrappers for contract ABIs (#5341)
* initial native contract generator

* get generated code compiling

* unit tests for type codegen

* autogenerate registry contract

* native_contracts entry for registry

* service_transaction_checker

* fixed indentation
2017-04-03 09:40:18 +02:00
arkpar 3915943f57 Kovan warp sync fixed 2017-03-30 13:13:43 +02:00
keorn a61b1567d0 Strict validation transitions (#4988)
* ability to make validation stricter

* fix consensus

* remove logger
2017-03-28 10:46:52 +02:00
Robert Habermeier 64cec5ff7d Implement PIP messages, request builder, and handlers (#4945)
* return errors on database corruption

* fix tests, json tests

* fix remainder of build

* buffer flow -> request credits

* proving state backend

* generate transaction proofs from provider

* network messages for transaction proof

* transaction proof test

* test for transaction proof message

* fix call bug

* request transaction proofs from on_demand

* most of proved_execution rpc

* proved execution future

* initial request definitions

* RLP encoding and decoding for requests

* proofs of non-existance in ProvingBlockChainClient

* new requests in provider.

* encode and decode responses

* complete initial request changes

* handle request packet in LightProtocol

* handle response packets

* implement requesting from

* re-do cost table

* get tests compiling

* fix cost table RLP encoding

* roundtrip tests for request types

* request builder tests

* move request_builder -> request::builder

* get network tests working

* return only complete headers responses

* request builder improvements

* New version of jsonrpc.

* split request filling into fill,complete

* Better invalid encoding messages

* Fixing deprecated methods of tokio_core

* use PIP messages in on_demand, old API

* migrate oneshot::complete to send in on_demand

* get on_demand tests to compile

* port ethsync to PIP messages

* adjust to minor on_demand API changes in RPC

* Using dedicated branch for jsonrpc

* Bump
2017-03-23 13:17:05 +01:00
Marek Kotewicz 044d070667 rlp deserialization refactor, 30% faster (#4901)
* fixed naming of rlp modules

* RlpStream cleanup

* appending short rlp lists (0...55 bytes) is 25% faster

* RlpStream does not use bytes module, nor trait Stream

* removed unused code from rlp module

* compiling ethcore-util with new rlp serialization

* compiling parity with new rlp serialization

* fixed compiling ethcore-light with new rlp serialization

* fixed compiling ethsync with new rlp serialization

* moved rlp benches and rlp tests

* rlp deserialization refactor, 30% faster

* removed redundant comment, print

* fixed compiling parity with new rlp deserialization

* removed redundant double-space

* fixed failing test

* updated rlp docs, removed unused traits

* fixed rlp benchmarks

* replace usage of WriteBytesExt with ByteOrder

* removed unused, commented out code

* fixed merge conflict
2017-03-22 14:41:46 +01:00
Arkadiy Paronyan 43871e393c Additional kovan params (#4892) 2017-03-14 11:41:56 +01:00
Gav Wood 3041c95408 Chain-selection from UI (#4859)
* First little bits for chain-selection.

* Provide RPCs and get settings through to user defaults.

* Hasty stash.

* Fix updater accidentally redownloading.

* Finish up.

* Add JS tests.

* Hypervisor should never run a binary modified before itself.

* Style.

* Help tweak.

* Fix test compile.

* Fix JS test

* Build fix for tests.

* Revert default chain name

* Another test

* Use spec name via client.

* Fix mock up.

* whitespace

[ci:skip]

* whitespace

[ci:skip]

* remove exit/restart endpoints.
2017-03-13 12:10:53 +01:00
Marek Kotewicz 3fe3353696 removed redundant FixedHash trait, fixes #4029 (#4866) 2017-03-11 22:58:15 +04:00
keorn 98be191b25 Fix validator contract syncing (#4789)
* make validator set aware of various states

* fix updater build

* clean up contract call

* failing sync test

* adjust tests

* nicer indent [ci skip]

* revert bound divisor
2017-03-08 14:41:24 +01:00
Robert Habermeier 8a3b5c6332 Remote transaction execution (#4684)
* return errors on database corruption

* fix tests, json tests

* fix remainder of build

* buffer flow -> request credits

* proving state backend

* generate transaction proofs from provider

* network messages for transaction proof

* transaction proof test

* test for transaction proof message

* fix call bug

* request transaction proofs from on_demand

* most of proved_execution rpc

* proved execution future
2017-03-08 14:39:44 +01:00
Robert Habermeier 1bf2b27708 Propagate trie errors upwards from State (#4655)
* state backend trait mirroring state_db API

* minimal state backend trait

make state module public

* fix json tests

* return errors on database corruption

* fix tests, json tests

* fix remainder of build

* add Backend bound on state
2017-02-26 13:10:50 +01:00
Robert Habermeier 1fba73c15e minimal state backend trait
make state module public
2017-02-21 12:35:21 +01:00
Robert Habermeier 62b340f2b9 Save pending local transactions in the database (#4566)
* Create new column family for local node info

* remove DBTransaction::new reliance on DB

* KeyValueDB trait

* InMemory KeyValueDB implementation

* journaldb generic over KVDB

* make most of `ethcore` generic over KVDB

* fix json tests compilation

* get all tests compiling

* implement local store (just for transactions)

* finish local store API, test

* put everything into place

* better test for skipping bad transactions

* fix warning

* update local store every 15 minutes

* remove superfluous `{}`s
2017-02-20 17:21:55 +01:00
Tomasz Drwięga 248cd5e036 RPC middleware: Informant & Client.keep_alive (#4384)
* Adding RPC informant structs

* RPC informant

* Middleware counting RPC requests

* Moving client keep_alive to middleware
2017-02-04 22:18:19 +01:00
Arkadiy Paronyan 312aa72747 Transaction timestamp condition (#4419)
* Transaction timestamp condtiion

* Updated docs

* Updated docs

* Check agains last block timestamp
2017-02-03 19:32:10 +01:00
Arkadiy Paronyan c012dfc3ef EIP-98: Optional transaction state root (#4296)
* EIP98: Optional receipt state root

* Use if-else

* Fixing tests
2017-01-25 20:22:48 +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 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
Robert Habermeier 203fd8a471 Memory-based pruning history size (#4114)
* prune states based on memory param

* pruning memory CLI and usage in sync

* return purged value from memorydb

* calculate memory used incrementally in overlayrecentdb

* refactor shared history pruning code in client

* Fixed usage alignment

* journal_size function for fast memory calculation
2017-01-20 13:25:53 +01:00
Gav Wood c2f4716ee2 icarus -> update, increase web timeout. (#4165)
* icarus -> update, increase web timeout.

* Fix estimate gas
2017-01-13 16:30:16 +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
Gav Wood 311730ea95 Improvements and optimisations to estimate_gas (#4142)
* Return 0 instead of error with out of gas on estimate_gas

* Fix stuff up.

* Another estimate gas fix.

* Alter balance to maximum possible rather than GP=0.

* Only increase to amount strictly necessary.

* Improvements and optimisations to estimate_gas.

- Introduce proper error type
- Avoid building costly traces

* Fix tests.

* Actually fix testsActually fix tests
2017-01-12 11:06:12 +01:00
Gav Wood 56c546f465 Another minor estimation fix (#4133)
* Return 0 instead of error with out of gas on estimate_gas

* Fix stuff up.

* Another estimate gas fix.

* Alter balance to maximum possible rather than GP=0.

* Only increase to amount strictly necessary.
2017-01-11 17:51:48 +01:00
Gav Wood 7286d42b7d Fix call/estimate_gas (#4121)
* Return 0 instead of error with out of gas on estimate_gas

* Fix stuff up.
2017-01-11 14:28:27 +01:00
Tomasz Drwięga 21006da125 Get rid of unsafe code in ethkey, propagate incorrect Secret errors. (#4119)
* Implementing secret

* Fixing tests
2017-01-11 12:16:47 +01:00
Gav Wood 23feb7998f Use binary chop to estimate gas accurately (#4100)
* Initial sketch.

* Building.

* Fix a few things.

* Fix issue, add tracing.

* Address grumbles

* Raise upper limit if needed

* Fix test.
2017-01-10 18:56:41 +01: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
Tomasz Drwięga b24fc97cb6 Correct log index in transaction receipt (#3995)
* Moving logs to separate, testable function

* Adding test

* Fixing log index

* Adding transaction log index

* Fixing rpc tests

* Making interface of  a bit cleaner.
2016-12-29 18:48:28 +00:00
Robert Habermeier fe1f542c4f Owning views of blockchain data (#3982)
* owning views of blockchain data

* port blockchain and client traits to owning views

* fix ethcore tests

* use strong headers and bodies in ethcore_light

* port ethsync to use owning views

* port rpc to owning views

* port parity informant and blockchain export
2016-12-28 12:44:51 +00:00
Robert Habermeier 8125b5690c Port `try` macro to new `?` operator. (#3962)
* initial untry sweep

* restore try in ipc codegen, fix inference

* change a few missed try instances
2016-12-27 12:53:56 +01:00
Robert Habermeier 546246c56b Unknown block error for RPC (#3965) 2016-12-23 18:46:17 +01:00
keorn afc4cd2785 Allow contract constructors in chain spec (#3932)
* constructor spec

* execute under wrong address

* create under correct address

* revert

* move genesis block lookup

* remove env_logger
2016-12-23 18:44:39 +01:00
Arkadiy Paronyan 5a3c3bcb45 Sync reorg up to history size (#3874)
* Allow sync reorg up to pruning history size

* Peer difficulty tracking

* Abort downloading block if received with NewBlock

* Set pruning history to 1200

* Renamed history size field
2016-12-23 18:43:40 +01:00