Commit Graph

159 Commits

Author SHA1 Message Date
NikVolf f302c3774e network api layout 2016-12-12 17:15:27 +01:00
NikVolf a6e8f376ca p2p api changes 2016-12-12 15:18:05 +01:00
Svyatoslav Nikolsky 2b1fecb286 close connection when block verification failed with error 2016-12-02 18:12:20 +03:00
debris ca49061df0 command line option to limit connections only to ipv4 or ipv6 2016-11-30 16:01:11 +01:00
debris bcc84f6f6f updated dependencies and graph 2016-11-28 10:37:17 +01:00
debris 847cb36c6f chain verifier does not have hardcoded network constants 2016-11-25 18:38:21 +01:00
debris 355306e747 retarget 2016-11-24 23:33:51 +01:00
Svyatoslav Nikolsky 964ac87135 getting rid of sync waits 2016-11-18 16:06:14 +03:00
Svyatoslav Nikolsky b354b1e0cb post-merge fixes 2016-11-17 11:23:05 +03:00
Svyatoslav Nikolsky 035583fac1 Merge branch 'master' into respect_minimal_protocol_version 2016-11-17 08:23:01 +03:00
debris 712b016a6a fixed handshake tests 2016-11-17 01:15:58 +01:00
debris fe9828dbdc respect minimal protocol version, fixed #141 2016-11-17 01:02:43 +01:00
debris 56e2dc02b1 limit number of inbound and outbound connections for regtests 2016-11-17 00:33:35 +01:00
debris 2fd794be97 applied clippy suggestions to make code more idiomatic 2016-11-16 18:30:30 +01:00
debris 90c6f6fdc3 ServerTask::Ignore 2016-11-16 11:18:13 +01:00
debris dc6acc6eee polishing p2p synchronous syncing 2016-11-15 13:11:05 +01:00
debris 6713503add synchronous syncing almost finished 2016-11-15 12:48:12 +01:00
debris 86cff63c30 sync synchronizer part done 2016-11-14 09:56:58 +01:00
debris 6b38929222 cleanup session init and on_message 2016-11-09 22:36:29 +01:00
debris 078a71ba15 simplified threshold and configurable synchronizers 2016-11-09 21:42:17 +01:00
debris da769b253a response synchronizer 2016-11-09 15:46:34 +01:00
debris 68a3bb2d34 linting in progress 2016-11-08 16:37:06 +01:00
debris 436d925ba6 clippy lints enabled for crypto, message, p2p, pbtc, primitives and serialization 2016-11-08 11:51:34 +01:00
debris 5b93c5dc40 regression tests support 2016-11-05 15:32:57 +01:00
debris fc32423017 save node_table to $APP_DIR/p2p/nodes.csv 2016-11-04 12:08:58 +01:00
debris 2f9aaeb46f fixed issue with not connecting to enought peers 2016-11-03 10:50:44 +01:00
debris b0cbd8e12b fixed tracing and note inbound/outbound calls 2016-11-03 01:13:43 +01:00
debris 67aae38673 Merge branch 'master' of github.com:ethcore/parity-bitcoin into p2p_multiple_connections 2016-11-03 00:22:32 +01:00
debris 448259328d connect to multiple nodes automatically 2016-11-03 00:22:23 +01:00
Svyatoslav Nikolsky 0b212ec5eb Serving some sync requests (#73)
* started work on synchronization_server

* continue synchronization server

* added response to getblocks message

* renamed Synchronization to Client

* LocalNode parametrized by Server

* LocalNode parametrized by Client

* fixed test

* support connect to given port via command line

* fixed couple of sync server issues && added sync server trace

* fixing sync issues

* fixed grumbles
2016-11-02 11:15:37 +01:00
Svyatoslav Nikolsky 7bfd60940f added test_node_table_duplicates 2016-11-02 12:47:09 +03:00
Svyatoslav Nikolsky f200f4a874 fixed duplicates in node_table 2016-11-02 12:33:28 +03:00
Svyatoslav Nikolsky 36e30ef5ce support connect to given port via command line 2016-11-02 10:25:09 +03:00
debris a1a66f5df8 add protocol method on_close 2016-10-31 14:44:48 +01:00
Svyatoslav Nikolsky 543d66ce03 Fixed grumbles from #54 (#61)
* async verifying

* lost file

* removed debug timer

* fixed compilation && tests

* fixed typo

* async verification refactoring

* fixed sync stall

* fixed dead_code warning

* get rid of extra locks

* fixed tests

* * separated tasks executor from sync node
* local node mutex removed

* fixed grumbles from #54
2016-10-31 11:18:58 +01:00
debris 1b4bc9ad24 ping protocol tests 2016-10-30 13:32:26 +01:00
debris bcdbaf4a10 Merge branch 'master' of github.com:ethcore/parity-bitcoin into p2p_tests 2016-10-30 11:44:18 +01:00
debris b32bf9f29f handshake tests 2016-10-30 11:44:10 +01:00
Svyatoslav Nikolsky 68ddc7fa88 Async verification (#54)
* async verifying

* lost file

* removed debug timer

* fixed compilation && tests

* fixed typo

* async verification refactoring

* fixed sync stall

* fixed dead_code warning

* get rid of extra locks

* fixed tests

* * separated tasks executor from sync node
* local node mutex removed
2016-10-29 11:52:40 +02:00
debris 5e5b49fee7 unit tests for reading header, payload and message 2016-10-28 15:02:22 +02:00
debris a8904d05d8 removed commented out code 2016-10-27 15:04:48 +02:00
debris bdac1b825b handshake time limitied to 5 seconds 2016-10-27 14:57:14 +02:00
debris 5ea40e919b deadline future 2016-10-26 12:33:41 +02:00
Marek Kotewicz 1306a3905a disconnect from seednode 60 seconds after receiving addr message (#38) 2016-10-26 11:45:51 +02:00
debris 4d573ce1b6 clean up nested nested futures spawning in p2p connection 2016-10-25 11:02:37 +02:00
debris e1e532d5a6 updated dependencies and graph 2016-10-25 10:07:25 +02:00
Marek Kotewicz 6ac07659b6 seednodes dns lookup (#34)
* fixed compile error after merging 29 & 30

* dns lookup

* connect to seednode
2016-10-25 09:55:43 +02:00
Marek Kotewicz ec3aee6fab fixed compile error after merging 29 & 30 (#32) 2016-10-24 17:42:54 +03:00
Marek Kotewicz 36c61c0474 Improvements for `Session` (#29)
* Session::initialize does not return result

* SessionFactory
2016-10-24 16:39:20 +02:00
Svyatoslav Nikolsky b081ca3d70 Continue synchronization protocol impl (#30)
* p2p <-> sync interfaces proposal

* updated with example

* send errors will be handled in p2p module => no need to return to the sync

* poc of outbound sync connection

* simplified send_to_peer

* context has cpu pool and enent loop handles

* on_message won't return ProtocolAction anymore

* session initialized sync protocol, remove retain cycles on P2P::drop

* removed ProtocolAction

* uncommented ping protocol

* node_table sorts nodes also by recently used time

* started work on sync package

* send getaddr on connect

* fixed node_table insert, added insert_many

* addr protocol

* sync headers response

* continue sync

* continue sync protocol

* separated sync connection start from sync connection creation

* switched to getblocks (instead of getheaders)

* starting to receive blocks in sync

* deal with orphaned blocks in sync::local_chain

* continue sync

* fix warnings

* removed TODOs

* protocol::sync is back to private state

* fixed grumbes
2016-10-24 16:38:33 +02:00
Marek Kotewicz 1c7bfc9a2e fixed on_message stackoverflow (#31) 2016-10-24 15:55:08 +03:00
Marek Kotewicz b4828294f5 impl PartialEq<&a str> for Command (#27)
* impl PartialEq<&a str> for Command

* additional test for Command PartialEq

* fixed comparing "ver" and "version"
2016-10-24 11:54:03 +03:00
Marek Kotewicz 6f6ad59113 removed unused code from p2p, clean up exported structs (#26)
* removed unused code from p2p module

* exposed p2p::NetConfig
2016-10-24 11:14:01 +03:00
Marek Kotewicz 02816aaa4e addr protocol && start of sync protocol (#25)
* p2p <-> sync interfaces proposal

* updated with example

* send errors will be handled in p2p module => no need to return to the sync

* poc of outbound sync connection

* simplified send_to_peer

* context has cpu pool and enent loop handles

* on_message won't return ProtocolAction anymore

* session initialized sync protocol, remove retain cycles on P2P::drop

* removed ProtocolAction

* uncommented ping protocol

* node_table sorts nodes also by recently used time

* send getaddr on connect

* fixed node_table insert, added insert_many

* addr protocol

* added TODO: remove
2016-10-24 10:42:11 +03:00
debris 189fd37835 ping->pong exchange 2016-10-21 10:55:37 +02:00
debris 72825fea50 session initialize and on_message in progress 2016-10-20 16:17:59 +02:00
debris 441c6cb883 session initialize, on_message, context send 2016-10-20 13:19:19 +02:00
debris 668e4a712a polishing p2p logging 2016-10-20 03:14:42 +02:00
debris 1349c3af4b p2p::Context, changed the way incomming messages read 2016-10-20 02:51:20 +02:00
debris 14e9fd041c additional log on disconnect 2016-10-19 14:49:50 +02:00
debris 49bb034bbd added logger to p2p, fixed reading messages 2016-10-19 14:17:18 +02:00
debris 716fd8d949 p2p in progress, connection shutdown on error 2016-10-18 14:29:38 +02:00
debris 4fb1d04955 p2p in progress 2016-10-18 12:15:07 +02:00
debris e039068772 renamed Services 2016-10-18 01:44:52 +02:00
debris f7bfa16195 p2p in progress 2016-10-17 10:52:15 +02:00
debris f283197a8d renamed PayloadType -> Payload, added common reexports in messages 2016-10-14 11:44:51 +02:00
debris d618e904c9 p2p reading and dispatching messages 2016-10-14 10:55:28 +02:00
debris 3c5d39c37b handling messages in progress 2016-10-13 15:24:37 +02:00
debris 2ea0310190 connections are accepted using pool 2016-10-13 09:59:09 +02:00
debris 67309678c0 removed printlns, updated deps 2016-10-13 09:23:37 +02:00
debris 850ad58e5d p2p listen 2016-10-13 09:17:29 +02:00
debris 25c7d20c1e p2p module in progress 2016-10-12 19:39:50 +02:00
debris 5169ea0016 p2p module in progress 2016-10-12 14:30:50 +02:00
debris 938db24d56 get rid of specific_ keyword 2016-10-12 11:35:08 +02:00
debris c2ea6c13ea get rid of specific_ keyword 2016-10-12 11:24:56 +02:00
debris e5e55866c7 subscriber 2016-10-12 11:20:49 +02:00
debris 3c5f0a5294 p2p compiling after message cleanup 2016-10-10 18:32:02 +02:00
debris ffc300f85a message cleanup in progress 2016-10-10 18:08:22 +02:00
debris 3873cf6b6b message cleanup 2016-10-10 11:56:01 +02:00
debris 4417a5d9c7 p2p error handling overhaul 2016-10-07 16:50:49 +02:00
debris 045b607216 read_message does return only message 2016-10-06 14:48:29 +02:00
debris 338e198ac5 read_message stream propagates errors up 2016-10-06 01:44:26 +02:00
debris b09708ca5b cleanup errors in message and p2p libs 2016-10-06 01:32:15 +02:00
debris 63ca383949 use H32 instead of [u8; 4] 2016-10-06 00:38:20 +02:00
debris c0448f3110 p2p streams... 2016-10-05 17:23:50 +02:00
debris 55c6584bcf few more functions producing messages 2016-10-04 16:49:41 +02:00
debris 3f06ab14ae connection ping pong 2016-10-04 16:29:33 +02:00
debris ffcb4d5a20 improved p2p interface 2016-10-04 12:33:23 +02:00
debris 5f2c7545b8 p2p overhaul 2016-10-03 17:17:34 +02:00
debris dc21039182 net lib renamed to message 2016-10-03 16:29:07 +02:00
debris c1184e4a9b listening for incomming connections and -connect works 2016-10-03 15:44:35 +02:00
debris b365ec90ff connecting to a node in progress 2016-10-03 03:01:46 +02:00
debris b896bb2985 listen stream 2016-10-02 17:45:25 +02:00
debris 5aacf6ea38 cli port option and parsing to config 2016-09-30 16:25:28 +02:00
debris 3fd20db47a connect future 2016-09-30 14:22:18 +02:00
debris 92a24417fa p2p rand and time utils 2016-09-29 19:30:17 +02:00
debris b33be279e0 validating message checksum 2016-09-29 18:53:18 +02:00
debris 1a118f79c9 negotiate version 2016-09-29 18:25:00 +02:00
debris 266a8ed1fb removed redundant fields from handshake.rs 2016-09-29 17:11:58 +02:00
debris 5a535cf03c first correct handshake 2016-09-29 17:09:15 +02:00