Commit Graph

663 Commits

Author SHA1 Message Date
Tomasz Drwięga
f157461ee1 Multi-call RPC (#6195)
* Removing duplicated pending state accessors in miner.

* Merge miner+client call.

* Multicall & multicall RPC.

* Sensible defaults.

* Fix tests.
2017-08-04 15:58:14 +02:00
debris
88cc4cd17a Merge branch 'master' into split 2017-07-29 23:44:55 +02:00
debris
c4989ddc44 removed util::common 2017-07-29 22:49:10 +02:00
debris
eecd823d32 util reexports less std 2017-07-29 21:10:14 +02:00
Joseph Mark
b5f1524e78 Refactor --allow-ips to handle custom ip-ranges (#6144)
* Add checks for additional reserved ip addresses

100.64.0.0/10 and 240.0.0.0/4 are both reserved but not currently
filtered.

* Add check for special purpose addresses

192.0.0.0/24 - Used for the IANA IPv4 Special Purpose Address Registry

* Refactor ip_utils (#5872)

* Add checks for all ipv4 special use addresses
* Add comprehensive ipv4 test cases

* Refactor Ipv6 address checks (#5872)

* Refactor AllowIP (#5872)

* Add IpFilter struct to wrap predefined filter (AllowIP) with custom
allow/block filters.
* Refactor parsing of --allow-ips to handle custom filters.
* Move AllowIP/IpFilter from ethsync to ethcore-network where they
are used.

* Revert Cargo.lock

* Tests for custom ip filters (#5872)

* Add "none" as a valid argument for --allow-ips to allow narrow
custom ranges, eg.: --allow-ips="none 10.0.0.0/8"
* Add tests for parsing filter arguments and node endpoints.
* Add ipnetwork crate to dev dependencies for testing.

* Add ipv6 filter tests (#5872)

* Revert parity-ui-precompiled to master

* Fix minor detail in usage.txt (#5872)

* Spaces to tabs

* Rename IpFilter::new() to ::default()

* Small readability improvements

* Test (#5872)

* Revert "Test (#5872)"

This reverts commit 7a8906430a6dad633fe29df3dca57f1630851fa9.
2017-07-28 19:06:39 +02:00
Robert Habermeier
7d348e2260 light client fixes (#6148)
* light client fixes

* fix memory-lru-cache

* clear pending reqs on disconnect
2017-07-26 15:48:00 +02:00
Robert Habermeier
298ea1d748 Bump snap version and tweak importing detection logic (#6079)
* bump last tick just before printing info and restore sync detection

* bump kovan snapshot version

* Fixed sync tests

* Fixed rpc tests
2017-07-18 16:59:33 +02:00
Robert Habermeier
99075ad22a Initial Whisper implementation (#6009)
* whisper skeleton

* basic message store

* rallying and message logic

* pass host info to network protocol handlers

* choose who starts rally based on node key

* module reshuffling

* mining messages

* prune messages by low PoW until below size target

* associated error type for ethkey generators and `OsRng` generator

* beginnings of RPC

* generic message handler for whisper

* reshuffle code order

* standard payload encoding and decoding

* basic crypto

* minor restructuring of net code

* implement shh_post

* merge?

* implement filters

* rand trait for hash types

* filter RPCs for whisper

* symmetric encryption of payload

* pub-sub

* filter tests

* use only secure random IDs

* attach arbitrary protocols to network

* basic integration of whisper into Parity

* eagerly prune low PoW entries

* broadcast messages with salted topics

* node info RPC

* fix import

* fix leading zeros calculation

* address minor grumbles
2017-07-14 20:40:28 +02:00
arkpar
debbfc117a Bumped version 2017-07-13 15:52:01 +02:00
Robert Habermeier
67c1f71b6e Proper light client informant and more verification of imported headers (#5897)
* do more validation of imported headers in light client

* generalize informant with traits

* informant implementation for light client

* make comment into TODO

* fix broken test

* disable full checking of headers in light client in sync tests
2017-07-10 13:21:11 +02:00
Robert Habermeier
cc718bb108 Merge pull request #5958 from Vurich/peer-status
Report whether a peer was kept from `Handler::on_connect`
2017-07-03 16:22:50 +02:00
Vurich
17de29e69a Prevent disconnect from within handler (and style cleanup) 2017-06-30 12:10:12 +02:00
Tomasz Drwięga
f22745eb0a TransactionQueue improvements (#5917)
* Order by id instead of hash.

* Minimal gas price bump.

* Avoid to construct oversized transaction packets.

* Fix RPC.

* Never construct oversized transactions packet.

* Never construct oversized packets.
2017-06-30 11:57:48 +02:00
Vurich
5eba9078fc Report whether a peer was kept from Handler::on_connect 2017-06-30 11:00:32 +02:00
Vurich
01ce28bc9a Fix tests 2017-06-29 13:05:33 +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
Guanqun Lu
547031aa0e sync: make it more idiomatic rust (#5938) 2017-06-27 18:23:53 +02:00
Robert Habermeier
c8e176b2e3 Merge pull request #5874 from paritytech/track-bad-snapshot-hashes
blacklist bad snapshot manifest hashes upon failure
2017-06-19 17:57:06 +02:00
Robert Habermeier
d168479a85 blacklist bad manifest hashes upon failure 2017-06-19 16:24:07 +02:00
Guanqun Lu
41fed96d96 convert try!() to ? 2017-06-18 22:16:34 +08:00
Nikolay Volf
e1fef5c732 Update dependencies and bigint api (#5685)
* update to latest bigint

* bump elastic array and deps

* fix rlp tests

* also update all smallvec deps

* fix doc test

* reduce parking in attempt to fix CI bug

* fix from/into electum bug

* remove duplicate imports
2017-05-24 12:31:33 +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
4c5e4ac8da PoA warp implementation (#5488)
* separate modules for consensus snapshot chunks

* bulk of authority warp logic

* finish authority warp implementation

* squash warnings and enable authority snapshot mode

* test harness for PoA

* fiddle with harness

* epoch generation proof fixes

* update constructor code

* store epoch transition proof after block commit

* basic snap and restore test

* use keyvaluedb in state restoration

* decompress chunks

* fix encoding issues

* fixed-to-contract-to-contract test

* implement ancient block import

* restore genesis transition in PoW snapshot

* add format version method to snapshot components

* supported version numbers in snapshot_components

* allow returning of ancient epoch transitions

* genesis hash mismatch check

* remove commented code
2017-05-17 12:41:33 +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
Arkadiy Paronyan
b50fb71dd1 EIP-86 (#4697)
* EIP-86

* Disable EIP-86 auto activation for now
2017-04-19 14:30:00 +02:00
keorn
d3b2bcdd79 Tendermint fixes (#5415)
* more resilience

* refactor commit

* fix proposal broadcast

* list encoding

* address grumbles

* to into
2017-04-10 20:03:18 +02:00
Adrian Brink
144d6c2379 Update light_sync test to include cache dependency 2017-04-07 21:35:42 +02:00
Adrian Brink
645b8e4b0b Fix failing tests 2017-04-07 21:35:42 +02:00
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
Marek Kotewicz
64c098627e updating dependencies (#5028)
* updated docopt, env_logger, semver and regex crates

* updated parking_lot to 0.4

* fixed compiling on linux

* updated igd to 0.6

* updated jsonrpc

* fixed regex related compiler error on linux
2017-03-28 19:06:08 +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