Commit Graph

630 Commits

Author SHA1 Message Date
Robert Habermeier
3eece20967 Merge branch 'master' into lightcli 2017-04-03 08:58:20 +02:00
arkpar
deef600caf Download unique receipts only 2017-03-31 15:20:27 +02:00
arkpar
3915943f57 Kovan warp sync fixed 2017-03-30 13:13:43 +02:00
arkpar
56ba9a30ac Fixed sync tests 2017-03-25 13:22:25 +01:00
arkpar
4ef89b5ccb Fine grained snapshot chunking 2017-03-25 13:22:25 +01:00
Arkadiy Paronyan
3b54b49b0b Resilient warp sync (#5018) 2017-03-24 18:55:57 +01:00
Robert Habermeier
e0a79699ea transaction propagation on a timer 2017-03-23 20:31:20 +01:00
Robert Habermeier
10a470a5fa better bookkeeping of requests in light sync 2017-03-23 15:44:16 +01: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
Robert Habermeier
b96eb45877 eth_syncing RPC for light client 2017-03-23 03:23:53 +01:00
Robert Habermeier
0abbd7ac97 Merge branch 'pip-msg' into lightcli 2017-03-22 22:08:39 +01:00
Robert Habermeier
83911a7290 complete quick'n'dirty light CLI 2017-03-22 22:00:52 +01:00
Robert Habermeier
73b2dd7a59 light client RPC dependencies 2017-03-22 21:09:43 +01:00
Robert Habermeier
e3d6525d83 store cumulative cost in pending request set. 2017-03-22 19:30:42 +01:00
Robert Habermeier
c718b5618e initial light CLI 2017-03-22 18:32:04 +01:00
Robert Habermeier
a9d75e2223 CLI options for light client 2017-03-22 16:45:50 +01:00
Robert Habermeier
a0619fc101 Merge branch 'master' into pip-msg 2017-03-22 15:56:09 +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
Robert Habermeier
dd1f8295c4 fix sync test compilation 2017-03-21 21:00:31 +01:00
Robert Habermeier
fe52e969b6 Merge branch 'master' into pip-msg 2017-03-21 15:24:47 +01:00
Marek Kotewicz
a555686bcd rlp serialization refactor (#4873)
* 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

* removed redundant comment, print

* removed redundant double-space

* replace usage of WriteBytesExt with ByteOrder
2017-03-20 19:14:29 +01:00
Robert Habermeier
8be41ad946 Merge branch 'master' into pip-msg 2017-03-17 14:13:10 +01:00
Robert Habermeier
fa42b6acec port ethsync to PIP messages 2017-03-16 23:51:47 +01:00
Marek Kotewicz
3fe3353696 removed redundant FixedHash trait, fixes #4029 (#4866) 2017-03-11 22:58:15 +04: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
keorn
d68ea777a2 Extend authority round consensus test (#4756)
* add auth round test case

* correct fork assertion
2017-03-03 22:32:22 +01:00
Robert Habermeier
d8b1cfe082 Merge branch 'master' into lightrpc 2017-02-20 18:01:29 +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
Robert Habermeier
9316eb4ad3 (most of) parity RPC for light client 2017-02-17 21:38:43 +01:00
Robert Habermeier
baf0dbc6bf LightProvider struct using light transaction queue 2017-02-09 18:42:18 +01:00
Robert Habermeier
028dbe5fe2 rename get_header to block_header by convention 2017-02-08 20:22:41 +01:00
Robert Habermeier
3b9ac7648c with_context on LightSync 2017-02-02 17:02:46 +01:00
Robert Habermeier
fd44dcda15 rename LES protocol ID 2017-02-02 15:22:38 +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
Svyatoslav Nikolsky
092e24b9f2 Integration with zgp whitelist contract (#4215)
* zgp-transactions checker

* polishing

* rename + refactor

* refuse-service-transactions cl option

* fixed tests compilation
2017-01-22 16:15:22 +01: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
Robert Habermeier
a791cb50a6 Light protocol syncing improvements (#4212)
* remove old lint silencer

* dispatch requests only to peers with higher TD

* dynamic target for sync rounds

* use round pivots instead of frames, fix test

* fix total difficulty calculation for test client

* fix broken reorg algorithm

* fork test, fix ancestor search
2017-01-20 12:41:59 +01:00
Robert Habermeier
3ff9324ec0 LES Peer Info (#4195)
* connected peers function for network service

* get LES peer info in sync API

* new peer info in RPC
2017-01-20 12:41:49 +01:00
Tomasz Drwięga
24aec5191a Fixing minimal transaction queue price (#4204)
* Fixing minimal transaction queue price

* Fixing tests
2017-01-18 19:44:24 +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
Robert Habermeier
7123f19a75 Test harness for lightsync (#4109)
* make on_connect/disconnect public

* free flow params constructor

* Shared ownership of LES handlers

* light provider impl for test client

* skeleton for testing light sync

* have test_client use actual genesis

* fix underflow in provider

* test harnesses for lightsync

* fix tests

* fix test failure caused by test_client changes
2017-01-11 14:39:03 +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
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
Arkadiy Paronyan
5c5244911e No reorg limit for ancient blocks (#4099) 2017-01-10 12:22:28 +01:00
keorn
8d256b223d Fix rebroadcast panic (#4084)
* fix

* fix compile

* remove peers trace

* simplify

* Fixing 'simplify'
2017-01-09 12:41:19 +01:00
Tomasz Drwięga
4c94878cf7 Sending transactions in chunks. (#4089) 2017-01-09 11:20:02 +01:00
Tomasz Drwięga
71e6e24a1f Improving logs for transactions sync and disable re-broadcasting while syncing (#4065)
* Improving logs for transaction propagation

* Propagate only on timer
2017-01-08 17:12:17 +01:00
Tomasz Drwięga
1b93d79a90 Re-broadcast transactions to few random peers on each new block. (#4054)
* Introduce predictable randomness in tests

* Re-broadcasting to few peers
2017-01-06 10:38:49 +01:00
Robert Habermeier
e6324a83f1 Merge branch 'master' into lightsync 2016-12-28 15:53:11 +01: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
592a3ac623 Merge pull request #3974 from ethcore/mock-net
make test network generic over peer type
2016-12-28 13:32:06 +01: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
84219a0094 make test network generic over peer type 2016-12-27 11:23:57 +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
Robert Habermeier
d0194f3ad3 Merge branch 'master' into lightsync 2016-12-23 13:39:06 +01:00
Nikolay Volf
af501e6467 Custom attribute for binary serialization (#3922)
* derive(Binary) -> binary

* ethcore types refact

* fixup ethcore

* make binary optional

* fix common types

* fix updater

* remove condition
2016-12-21 15:09:35 +01:00
Robert Habermeier
a48435ca60 Merge branch 'master' into lightsync 2016-12-19 13:15:37 +01:00
Robert Habermeier
d765611050 allow queue to drain fully when idle 2016-12-19 12:41:00 +01:00
Robert Habermeier
ccdf5d5873 increase tick timer and limit peers to one req 2016-12-19 12:28:42 +01:00
Robert Habermeier
893892ca12 remove request limiting from sync service 2016-12-17 00:31:21 +01:00
Robert Habermeier
be914ddfc7 fix check for moving backwards 2016-12-16 23:53:36 +01:00
Robert Habermeier
e57ab96731 fix reverse start block check 2016-12-16 23:21:59 +01:00
Robert Habermeier
08587a1f56 fix subchain request ordering 2016-12-16 23:21:51 +01:00
Robert Habermeier
653363c572 limit to one pending request per peer 2016-12-16 23:21:17 +01:00
Robert Habermeier
a7505be627 fix deadlocks 2016-12-16 22:09:29 +01:00
Robert Habermeier
8b88ef1844 add light sync service to ethsync 2016-12-16 17:38:16 +01:00
Robert Habermeier
f85313fbff Merge branch 'master' into lightsync 2016-12-16 15:29:11 +01:00
Robert Habermeier
ce84215d93 naive and bad request dispatcher 2016-12-16 15:26:39 +01:00
arkpar
65f07e5aa7 Renamed some functions 2016-12-16 14:54:26 +01:00
Robert Habermeier
0d7b638a2d ancestor search response handler 2016-12-16 14:53:36 +01:00
arkpar
6c9de9e6f8 Merge branch 'master' of github.com:ethcore/parity into tx-block 2016-12-16 13:36:07 +01:00
Gav Wood
6e5a583cb4 Merge pull request #3505 from ethcore/check-updates
Auto-updating
2016-12-16 13:01:49 +01:00
Gav Wood
b437265082
Fix build. 2016-12-16 11:27:00 +01:00
Gav Wood
396ab5b361
Refactor and make is_syncing. 2016-12-16 10:31:10 +01:00
Robert Habermeier
a1f32de2d9 Merge branch 'master' into lightsync 2016-12-15 23:55:04 +01:00
keorn
447196398a fix start_step 2016-12-15 23:36:06 +01:00
Robert Habermeier
8622ab66dc skeleton for maintain_sync: all but dispatch 2016-12-15 22:42:24 +01:00
Robert Habermeier
9c7340307e handle events, minimal state machine 2016-12-15 21:51:08 +01:00
arkpar
f8961484c1 Merge branch 'master' of github.com:ethcore/parity into tx-block 2016-12-15 19:10:33 +01:00
Robert Habermeier
5346539ef8 minimal header import and client service 2016-12-15 18:47:26 +01:00
arkpar
2952ea1b85 Delayed transactions 2016-12-15 18:19:19 +01:00
Robert Habermeier
f776f48023 drain prepared headers from sync round 2016-12-15 17:33:25 +01:00
Robert Habermeier
71e96aca10 handle abandoned requests 2016-12-15 16:19:28 +01:00
Robert Habermeier
ec88a992e3 provide response context to response handler 2016-12-15 15:50:36 +01:00
Robert Habermeier
5d8bfd8758 handle responses for round scaffold and frames 2016-12-15 13:05:38 +01:00
Robert Habermeier
0768a61944 light: add LightChainClient trait 2016-12-14 23:26:15 +01:00
Robert Habermeier
1bcfc9348d light: specialize Downloader to SyncRound 2016-12-14 23:25:51 +01:00
Robert Habermeier
91b8fa7039 light: downloader state machine stub 2016-12-14 22:57:30 +01:00
Robert Habermeier
0d466fa8d0 light: tests for response module 2016-12-14 20:27:03 +01:00
Robert Habermeier
887bcfb88a light: response decoding and verification module 2016-12-14 19:36:48 +01:00
Robert Habermeier
359d433292 light: pass incoming responses to peer state machine 2016-12-13 22:26:06 +01:00
Robert Habermeier
6fb71527e4 light: search for common ancestor with peers 2016-12-13 21:09:57 +01:00
Robert Habermeier
8c64400654 light: change sync module name 2016-12-13 21:09:43 +01:00
arkpar
49ae375605 Don't coneect peers on each sync 2016-12-13 13:23:10 +01:00
Robert Habermeier
c2264bed27 light: skeleton for sync service 2016-12-13 00:08:39 +01:00
keorn
fa504e510f Merge branch 'master' into auth-bft 2016-12-12 21:28:46 +01:00
keorn
19adb84527 TestNet flushing and cleanup 2016-12-12 19:44:24 +01:00
keorn
722cd4d086 AuthorityRound fork test 2016-12-12 17:24:48 +01:00
keorn
8ed89bb74f propagate proposal to all peers 2016-12-12 13:00:51 +01:00