Commit Graph

1230 Commits

Author SHA1 Message Date
5chdn
98f86d553a
Only keep a single debug log file, ref #1100 2017-08-21 15:33:31 +02:00
debris
10914c8346 avoid runtime underflow if nibbles are empty 2017-08-21 14:36:59 +02:00
debris
b68375d462 less unsafe code 2017-08-21 10:19:53 +02:00
debris
a247d5b2dc Merge branch 'master' into itertools 2017-08-21 09:12:36 +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
debris
7de4a3a2df move plain hasher to a crate 2017-08-17 20:40:10 +02:00
debris
209e8eff35 updated bigint with optimized mul and from_big_indian 2017-08-17 18:11:34 +02:00
debris
32d2cd74d4 ping ci 2017-08-17 17:35:00 +02:00
debris
4cb610d9ae Itertools are no longer reexported from util, optimized triedb iter 2017-08-17 16:05:26 +02:00
debris
697d17ae9b Optimized PlainHasher hashing 2017-08-17 14:59:43 +02:00
debris
455ecf700c updated tiny-keccak to 1.3 2017-08-07 10:06:02 +02:00
NikVolf
d30e47a50e add test 2017-08-03 21:49:40 +03:00
NikVolf
6b3f5c977a overflow check in addition 2017-08-03 21:35:51 +03:00
debris
af8c5bb31a fix for util on linux 2017-08-01 15:53:50 +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
Feynman Liang
5eb8cea6e7 Tendermint epoch transitions (#6085)
* Adds signals_epoch_end to tendermint

* Adds is_epoch_end

* Adds snapshot_components

* Adds tendermint Epoch Verifier

* Fix documentation typos

* Change check_finality_proof to panic

* Fix compilation

* Adds Unconfirmed path to epoch_verifier

* Verify if address is validator in EpochVerifier

* check_finality_proof errors on failure

* Don't share combine/destructure_proofs

* Remove invalid import

* Remove duplicate epoch verifier trait

* Fix docs

* Adds recover stub to tendermint EpochVerifier

* Adds verify_light test

* Avoid boxed closure

* Style fixes
2017-07-26 16:25:32 +01: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
Arkadiy Paronyan
4c32177ef3 Fixed node address detection on incoming connection (#6093) 2017-07-19 15:44:08 +02:00
Andre Silva
c7af702270 Refactor price_info (#6003)
* refactor PriceInfo to use Fetch and reuse the client

* forget Fetch future to keep it running in the background

* update Debug message for price_info::Client

* wrap underlying errors in price_info client

* use debug_struct in price_info client debug implementation

* use global fetch service in price_info client

* rename gas_pricer parameter in RunCmd

* move price_info to its own crate

* fix price_info tests

* replace rustc_serialize with serde_json in price_info

* add documentation for price_info

* remove unused rustc-serialize dependency from ethcore

* fix price_info formatting

* re-export fetch crate in price_info

* remove unused cfg attributes in price_info

* add tests for price_info
2017-07-16 18:22:45 +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
Tomasz Drwięga
1aaafa2d11 Limit transaction queue memory & limit future queue (#6038)
* Remove confusing gas_limit in the pool.

* Change defaults

* Limit transaction queue by memory usage.

* Change defaults to something lower.

* Fix rpc test.

* Fix js issues.

* Renamed block_gas_limit
2017-07-13 15:12:25 +02:00
Tomasz Drwięga
4936e99f30 Node Health warnings (#5951)
* Health endpoint.

* Asynchronous health endpoint.

* Configure time api URL via CLI.

* Tests for TimeChecker.

* Health indication on Status page.

* Adding status indication to tab titles.

* Add status to ParityBar.

* Fixing lints.

* Add health status on SyncWarning.

* Fix health URL for embed.

* Nicer messages.

* Fix tests.

* Fixing JS tests.

* NTP time sync (#5956)

* use NTP to check time drift

* update time module documentation

* replace time_api flag with ntp_server

* fix TimeChecker tests

* fix ntp-server flag usage

* hide status tooltip if there's no message to show

* remove TimeProvider trait

* use Cell in FakeNtp test trait

* share fetch client and ntp client cpu pool

* Add documentation to public method.

* Removing peer count from status.

* Remove unknown upgrade status.

* Send two time requests at the time.

* Revert "Send two time requests at the time."

This reverts commit f7b754b1155076a5a5d8fdafa022801fae324452.

* Defer reporting time synchronization issues.

* Fix tests.

* Fix linting.
2017-07-11 12:23:46 +02:00
debris
61d8f90530 updated serde to version 1.0 2017-07-06 11:36:15 +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
Jef
72094a8bee Reduce unnecessary allocations (#5944) 2017-06-28 09:36:42 +02:00
Guanqun Lu
59488769cf network: make it more explicit about StreamToken and TimerToken (#5939) 2017-06-27 18:24:18 +02:00
Arkadiy Paronyan
4d5280e43c removed panic handlers (#5895) 2017-06-22 19:00:53 +02:00
Guanqun Lu
a5531e83fd ArchiveDB: add a new test case 2017-06-18 23:13:27 +08:00
Guanqun Lu
7f07f7d567 ArchiveDB: add a contains() test for long history test case 2017-06-18 23:13:27 +08:00
Robert Habermeier
ed20fa4da1 Merge pull request #5766 from guanqun/db-tests
three small commits for HashDB and MemoryDB
2017-06-18 04:24:45 +02:00
Guanqun Lu
1efa7e7b10 add one more test case for consolidate, both are negative 2017-06-18 09:02:44 +08:00
Guanqun Lu
ce8f8f40d7 move MemoryDB's tests into tests module 2017-06-18 09:02:44 +08:00
Guanqun Lu
4efd673c19 add a bit clarification to HashDB's remove() interface 2017-06-18 09:02:44 +08:00
Guanqun Lu
cd3a1c1a94 use rust 1.18's new feature to boost the purge performance 2017-06-09 01:34:10 +08:00
Arkadiy Paronyan
9418fcafb6 Disable compression for RLP strings (#5786) 2017-06-08 17:24:23 +02:00
Guanqun Lu
05aa960c25 use NULL_RLP, remove NULL_RLP_STATIC (#5742) 2017-06-07 11:58:39 +02:00
Arkadiy Paronyan
ad6ea4fa49 Bump mio (#5763)
* Bump mio

* Fixed warnings

* Update mio to crates.
2017-06-05 20:40:40 +02:00
Guanqun Lu
a246278727 typo fix (#5699) 2017-05-27 23:35:18 +03: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
Guanqun Lu
86b00a9271 typo fix (#5669) 2017-05-20 11:22:35 +02:00
Tomasz Drwięga
3ff72794e5 Create an account for chain=dev (#5612)
* implement From<&'static str> for Secret

* Dev account.

* Fix Secret semantics.
2017-05-19 17:06:36 +02:00
Robert Habermeier
8c86bd1b31 bump RLP version 2017-05-11 15:35:38 +02:00
Robert Habermeier
f299190e46 relicense ethcore-bigint 2017-05-11 15:34:35 +02:00
Robert Habermeier
a2fe46f8b3 use bigint on crates.io 2017-05-10 13:16:24 +02:00
Robert Habermeier
bccf58df51 relicense RLP to MIT/Apache2 2017-05-10 13:03:30 +02:00
Arkadiy Paronyan
da2f684f18 Memory usage optimization (#5526) 2017-05-02 11:40:03 +02:00
Robert Habermeier
a33b4cc73b fix tests 2017-04-20 15:04:07 +02:00
Robert Habermeier
a278dd5a0a store epoch transition proofs in DB 2017-04-19 14:58:19 +02:00
Robert Habermeier
6da6c755a5 iterate DB by prefix 2017-04-18 15:45:15 +02:00
arkpar
b840ab8f8b Compact chunks 2017-03-31 16:31:12 +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
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
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
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
Tomasz Drwięga
7e87e9e8ad Updating JSON-RPC crates (#4934)
* New version of jsonrpc.

* Better invalid encoding messages

* Fixing deprecated methods of tokio_core

* Using dedicated branch for jsonrpc

* Bump
2017-03-22 07:02:14 +01:00
Marek Kotewicz
d530cc86f3 splitting part of util into smaller crates (#4956)
* split path module from util

* moved RotatingLogger from util to logger crate

* fix tests

* fix tests

* use only one version of ansi_term crate
2017-03-22 06:23:40 +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
Marek Kotewicz
8a67a0a80a removed redundant (and unused) FromJson trait (#4871) 2017-03-13 11:42:27 +01:00
Marek Kotewicz
3fe3353696 removed redundant FixedHash trait, fixes #4029 (#4866) 2017-03-11 22:58:15 +04:00
Arkadiy Paronyan
bc9464fcbd Removed link directive (#4841) 2017-03-10 15:25:02 +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
Arkadiy Paronyan
ae3f85bd5b v1.7 (#4730) 2017-03-07 17:29:27 +01:00
Robert Habermeier
da3c13f0a2 split adding and dropping columns tests 2017-02-27 18:57:22 +01:00
Robert Habermeier
868624c6a9 return correct path for in-place migration 2017-02-26 19:30:54 +01:00
Robert Habermeier
ac82a838b8 test case and handle in-place migration correctly 2017-02-26 19:22:51 +01:00
Robert Habermeier
ed0a2567d8 docs 2017-02-26 19:11:19 +01:00
Robert Habermeier
c2c699abb9 change migration to v11 to be faster 2017-02-26 18:41:40 +01:00
Robert Habermeier
3cc007b4d6 add and remove column families dynamically 2017-02-26 18:29:35 +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
Tomasz Drwięga
1949d44d0c Hash-fetch errors in case upstream returns non-200 (#4599) 2017-02-20 16:30:14 +01:00
Arkadiy Paronyan
0aad8a87ae Added pending transaction info to eth_getTransactionByHash (#4570)
* Return condition info for pending transactions

* Fixed warnings
2017-02-20 16:19:43 +01:00
Robert Habermeier
7a857a24ae use new histogram/corpus 2017-02-17 16:18:31 +01:00
Robert Habermeier
59315b0cb7 stats utility in its own crate 2017-02-17 15:16:28 +01:00
Arkadiy Paronyan
c2540dc215 Check for matching session before deregistering (#4563) 2017-02-17 12:20:25 +01:00
Tomasz Drwięga
f1e99ea2e4 Serde 0.9 (#4508)
* Porting json

* Dapps

* Rpc & Ethstore

* New ethabi

* Last bunch of fixes

* Fixing last test

* Removing build script

* Adding ethcore-ipc-tests back

* Fixing grumbles

* Fixing blockchain tests (inference regression?)
2017-02-13 18:38:47 +03:00
Robert Habermeier
6bf97de9d8 Merge branch 'master' into lightrpc 2017-02-10 02:44:12 +01:00
arkpar
cdc09a6d8a Static link for snappy 2017-02-08 22:43:23 +01:00
Robert Habermeier
0246d5c734 Merge branch 'master' into lightrpc 2017-02-08 19:20:35 +01:00
keorn
b0248cad0b sort corpus when hitting genesis (#4470) 2017-02-08 08:55:56 +01:00
Robert Habermeier
4172a5369c Include total difficulty in CHTs and hide implementation details from consumers (#4428)
* CHT builder and prover

* use CHT abstraction in provider

* hide CHT internals from header chain

* fix itertools conflict by updating all to 0.5

* cht proof checker, use it in on_demand
2017-02-06 17:21:35 +01:00
Robert Habermeier
484b93abdc Merge branch 'cht-td' into lightrpc 2017-02-04 17:14:47 +01:00
Robert Habermeier
ca11138ce8 fix itertools conflict by updating all to 0.5 2017-02-04 17:07:39 +01:00
Robert Habermeier
02142e3a57 Merge branch 'master' into cht-td 2017-02-03 19:56:52 +01:00
Robert Habermeier
e874df5155 hide CHT internals from header chain 2017-02-03 19:50:23 +01:00
Tomasz Drwięga
015425d447 Restarting fetch client every now and then (#4399) 2017-02-02 19:11:28 +01:00
Robert Habermeier
3b9ac7648c with_context on LightSync 2017-02-02 17:02:46 +01:00
Robert Habermeier
5b2b4717f6 fix earliest_era on empty db (#4316) 2017-01-30 17:20:41 +01:00
Arkadiy Paronyan
43cc4ea13d Fixed deadlock in external_url (#4354) 2017-01-30 17:08:21 +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
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
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
Arkadiy Paronyan
8852a05301 Prevent duplicate incoming connections (#4180) 2017-01-17 16:02:29 +01:00
Arkadiy Paronyan
cfb6dd2ea8 Optimized hash lookups (#4144)
* Optimize hash comparison

* Use libc
2017-01-13 08:52:23 +00:00