Commit Graph

46 Commits

Author SHA1 Message Date
David c313039526 Update a few parity-common dependencies (#9663)
* Update a few parity-common dependencies

* cleanup

* cleanup

* revert update of ethereum/tests

* better reporting of network rlp errors

* Use rlp 0.3.0-beta.1

* fix util function get_dummy_blocks

* Already a Vec

* encode_list returns vec already

* Address grumble

* No need for betas

* Fix double spaces
2018-10-09 22:07:25 +02:00
Niklas Adolfsson 6888a968f9 Light `clippy(fy)` (#9473)
* wasm tests

* `clippyfy` light-client

* Revert inefficient change `collect_ready()`
2018-09-06 15:44:40 +02:00
Afri Schoedon 8dd4db5d85 docs: update repository links (#9159)
* docs: update repository links

* docs: update repository links in contribution guide
2018-07-23 13:58:50 +02:00
Niklas Adolfsson 98b7c07171 Update `license header` and `scripts` (#8666)
* Update `add_license` script

* run script

* add `remove duplicate lines script` and run it

* Revert changes `English spaces`

* strip whitespaces

* Revert `GPL` in files with `apache/mit license`

* don't append `gpl license` in files with other lic

* Don't append `gpl header` in files with other lic.

* re-ran script

* include c and cpp files too

* remove duplicate header

* rebase nit
2018-06-04 10:19:50 +02:00
David 28c731881f
Rlp decode returns Result (#8527)
rlp::decode returns Result

Make a best effort to handle decoding errors gracefully throughout the code, using `expect` where the value is guaranteed to be valid (and in other places where it makes sense).
2018-05-08 11:22:12 +02:00
Andrew Jones a04c5b180a Replace legacy Rlp with UntrustedRlp and use in ethcore rlp views (#8316)
* WIP

* Replace Rlp with UntrustedRlp in views, explicity unwrap with expect

First pass to get it to compile. Need to figure out whether to do this or to propogate Errors upstream, which would require many more changes to dependent code. If we do this way we are assuming that the views are always used in a context where the rlp is trusted to be valid e.g. when reading from our own DB. So need to fid out whether views are used with data received from an untrusted (e.g. extrernal peer).

* Remove original Rlp impl, rename UntrustedRlp -> Rlp

* Create rlp views with view! macro to record debug info

Views are assumed to be over valid rlp, so if there is a decoding error we record where the view was created in the first place and report it in the expect

* Use $crate in view! macro to avoid import, fix tests

* Expect valid rlp in decode functions for now

* Replace spaces with tabs in new file

* Add doc tests for creating views with macro

* Update rlp docs to reflect removing of UntrustedRlp

* Replace UntrustedRlp usages in private-tx merge
2018-04-16 15:52:12 +02:00
Tomasz Drwięga f044b61f42 Extract some parts of miner from ethcore. (#7353)
* Move miner away from ethcore.

* Fix ethcore to use miner/transaction.

* Fix tests and warnings.

* fixed incorrect merge of the test in the documentation
2018-01-11 17:49:10 +01:00
Marek Kotewicz e95b093483 dissolve util (#7460)
* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor in progress

* ethereum-types refactor finished

* removed obsolete util/src/lib.rs

* removed commented out code
2018-01-10 15:35:18 +03:00
debris 16d84f8ecf finished removing ipc 2017-10-16 18:18:43 +02:00
Lorenzo Manacorda aab1cf020c
Rename builder module to batch 2017-09-24 20:09:40 +02:00
Lorenzo Manacorda 5f025cc1b8
Rename Requests to Batch 2017-09-24 20:09:30 +02:00
Arkadiy Paronyan 4dc7d3dc45 Fixed receipt serialization and RPC (#6555) 2017-09-21 10:11:53 +02:00
Hawstein dd7a60c7a8 rename trie to patricia-trie 2017-09-15 11:49:26 +08:00
Hawstein ade37be25b separate trie from util and make its dependencies into libs:
* bytes
* hashdb
* memorydb
* nibbleslice
* nibblevec
2017-09-15 11:03:53 +08:00
Robert Habermeier ad39446e87 Revert "fixed master (#6465)"
This reverts commit 899538ae25.
2017-09-05 17:54:05 +02:00
Marek Kotewicz 899538ae25 fixed master (#6465)
* fixed master

* Revert "Merge pull request #6370 from paritytech/light-poa"

This reverts commit 3c60f99def, reversing
changes made to b731ccea18.
2017-09-05 14:53:09 +02:00
Fredrik 2b39af1f09 Updating imports that were introduced with merge 2017-09-05 12:08:02 +02:00
Fredrik Harrysson dccdedc001 Merge branch 'master' into fo-6418-dont-export-bigint 2017-09-05 10:48:54 +02:00
Fredrik 308f36a532 Don't reexport bigint from util 2017-09-04 16:36:49 +02:00
Robert Habermeier 871a9c063e Merge branch 'master' into light-poa 2017-08-23 15:49:02 +02:00
Robert Habermeier 2ff3dff6ea serve epoch signals over network and check them 2017-08-23 15:37:35 +02:00
Marek Kotewicz 407c8c3fb9 rlp_derive (#6125)
* rlp_derive

* RlpEncodableWrapper, RlpDecodableWrapper

* use rlp_derive in parity

* fixed broken transaction Action serialization
2017-08-20 12:01:46 +08:00
Robert Habermeier 826a4ca0a2 Implement skeleton for transaction index and epoch transition proof PIP messages (#5908)
* add transaction index message without implementing

* add epoch proof fetch and response messages
2017-07-03 12:25:10 +02:00
Vurich 3d8dc11442 Upgrade `elastic-array` to 0.9.0
This is a huge change, which includes some changes to replace code that
originally cloned to reuse allocations instead. The updated
`elastic-array` crate renames its consuming `Vec`-conversion method to
`into_vec`, which means that I can do a simple
`sed -i 's/to_vec/into_vec/'` and then fix the compilation errors.

This commit is probably a minor performance win and definitely a
significant readability win.
2017-06-29 13:05:33 +02:00
Robert Habermeier 386cdb830d Back-references for the on-demand service (#5573)
* header back-references for on demand

* initial back-reference implementation for on demand requests

* answer requests from cache

* answer requests from cache, add tests

* strongly typed responses for vectors of homogeneous requests

* fix fallout in RPC without optimizing
2017-05-23 12:39:25 +02:00
Robert Habermeier aa41b48ba0 Dynamically adjust PIP request costs based on gathered data (#5603)
* beginnings of load timer

* initial load timer implementation

* saturating adds

* create flow params from distribution

* update request credits and acknowledgement

* mark cumulative cost dead code

* fix compilation

* tests

* supply load share and other params to  lightprotocol params

* add file store

* fix ethsync compilation

* reshuffle constants
2017-05-23 12:31:09 +02:00
Robert Habermeier d19232a848 use cache in on-demand again 2017-04-06 17:22:05 +02:00
Robert Habermeier 574cfae470 dispatch batched requests 2017-04-06 15:34:48 +02:00
Robert Habermeier 08d8709ef6 checked request for OnDemand 2017-04-05 18:56:01 +02:00
Robert Habermeier 35740456a4 generalize RequestBuilder 2017-04-05 15:02:44 +02:00
Robert Habermeier 3eece20967 Merge branch 'master' into lightcli 2017-04-03 08:58:20 +02:00
Tomasz Drwięga d2394d3ac3 Updating paths to repos. (#5330)
* Updating paths to repos.

* Updating rotor and libusb

* Fixing other occurrences
2017-03-29 15:17:27 +02:00
Robert Habermeier 5700f4ac81 fix block response decoding 2017-03-23 18:31:16 +01:00
Robert Habermeier 974f89d5bf correct workaround for RLP issue 2017-03-23 16:00:00 +01:00
Robert Habermeier 10a470a5fa better bookkeeping of requests in light sync 2017-03-23 15:44:16 +01:00
Robert Habermeier c75b49667e workaround for #5008 2017-03-23 14:49:02 +01:00
Robert Habermeier 54eb575000 request tests that demonstrate broken RLP behavior 2017-03-23 14:38:23 +01:00
Robert Habermeier a1df49ef3e add test for request vec deserialization 2017-03-23 14:04:26 +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 a0619fc101 Merge branch 'master' into pip-msg 2017-03-22 15:56:09 +01:00
Robert Habermeier fe52e969b6 Merge branch 'master' into pip-msg 2017-03-21 15:24:47 +01:00
Robert Habermeier cbb9314531 use PIP messages in on_demand, old API 2017-03-16 20:23:59 +01:00
Robert Habermeier 599f81daa9 split request filling into fill,complete 2017-03-13 16:06:58 +01:00
Robert Habermeier f0a587d310 request builder improvements 2017-03-13 13:36:03 +01:00
Robert Habermeier 391eb4b66c get network tests working 2017-03-09 16:55:13 +01:00
Robert Habermeier 8fb0a2d417 move request_builder -> request::builder 2017-03-08 20:11:22 +01:00