Commit Graph

18 Commits

Author SHA1 Message Date
Pierre Krieger 3d76417353 Remove HostTrait altogether (#8681) 2018-06-02 11:05:11 +02:00
Niklas Adolfsson 118588ef6c Fix some nits using clippy (#8731)
* fix some nits using clippy

* fix tests
2018-05-31 13:38:46 +02:00
André Silva 68d16b723a network-devp2p: handle UselessPeer disconnect (#8686) 2018-05-29 07:16:08 +00:00
Pierre Krieger fe5f5b28d9 Remove the error when stopping the network (#8671) 2018-05-22 12:35:13 +08:00
Pierre Krieger ee41fa6f30 Move connection_filter to the network crate (#8674) 2018-05-22 12:34:01 +08:00
Pierre Krieger 84ecab0eaf Remove HostInfo::client_version() and secret() (#8677) 2018-05-22 12:32:05 +08:00
Pierre Krieger 6552256981 Remove HostInfo::next_nonce (#8644) 2018-05-18 08:04:25 +02:00
Pierre Krieger 8e078b1d83 Remove NetworkContext::io_channel() (#8625)
* Remove io_channel()

* Fix warning
2018-05-15 17:03:09 +02:00
Tomasz Drwięga 08abf67a51 Fix packet count when talking with PAR2 peers (#8555)
* Support diferent packet counts in different protocol versions.

* Fix light timeouts and eclipse protection.

* Fix devp2p tests.

* Fix whisper-cli compilation.

* Fix compilation.

* Fix ethcore-sync tests.

* Revert "Fix light timeouts and eclipse protection."

This reverts commit 06285ea8c1d9d184d809f64b5507aece633da6cc.

* Increase timeouts.
2018-05-14 10:09:05 +02:00
André Silva a7a46f4253 Node table sorting according to last contact data (#8541)
* network-devp2p: sort nodes in node table using last contact data

* network-devp2p: rename node contact types in node table json output

* network-devp2p: fix node table tests

* network-devp2p: note node failure when failed to establish connection

* network-devp2p: handle UselessPeer error

* network-devp2p: note failure when marking node as useless
2018-05-07 13:11:12 +02:00
Pierre Krieger fac356c701 More code refactoring to integrate Duration (#8322)
* More code refactoring to integrate Duration

* Fix typo

* Fix tests

* More test fix
2018-04-14 21:35:58 +02:00
Tomasz Drwięga 9108a3bb50 Bump ethabi & ethereum-types. (#8258)
* Bump ethabi & ethereum-types.

* Fix test.

* Fix hex encodings.
2018-04-02 12:12:52 +01:00
Tomasz Drwięga 899c1a4b0e Warp-only sync with warp-barrier [blocknumber] flag. (#8228)
* Warp-only sync with warp-after [blocknumber] flag.

* Fix tests.

* Fix configuration tests.

* Rename to warp barrier.
2018-03-29 11:20:27 +02:00
Andrew Jones e3f7b70c38 Replace all Rlp usages with UntrustedRlp except for ethcore views (#8233)
* Replace Rlp with UntrustedRlp and unsafely unwrap

All Rlp methods return Result<_,DecoderError> now, so for this first
pass each will be marked with `expect("TODO")`. In the next pass we can
categorise figure out how to handle each case.

* Handle DecoderError for tendermint message

* Unwrap rlp results in TestBlockcChainClient

Rlp should be valid since created manually in tests

* Replace `use rlp::*` with explicit imports

* Remove rlp decode unwraps from light cli request

* Structured rlp encoding for curr best and latest in header chain

* Propogate decoder errors from send_packet

* Fix body uncles rlp index

* Use BodyView in sync and `expect` rlp errors

* Revert bbf28f removing original Rlp for this phase

This can be done again in the next phase, in order that we can leave the ethcore views unchanged

* Restore legacy Rlp and UntrustedRlp

Use legacy Rlp for ethcore views. Will redo replacing Rlp with UntrustedRlp in  a subsequent PR

* Fix tests

* Replace boilerplate Encodable/Decodable with derive

* Use BlockView instead of Rlp, remove unwrap

* Remove rlp test_cli unwraps by using BlockView instead of Rlp directly

* Remove unneccesary change to use borrowed hash

* Construct sync block using new_from_header_and_body
2018-03-29 11:19:45 +02:00
Pierre Krieger c4dd156113 Remove network stats (#8225) 2018-03-28 15:45:36 +09:00
André Silva 373036bb7a network: init discovery using healthy nodes (#8061)
* network: init discovery using healthy nodes

* network: fix style grumble

* network: fix typo
2018-03-16 22:39:23 +01:00
Arkadiy Paronyan e8106016c8 Limit incoming connections. (#8060)
* Limit ingress connections
* Optimized handshakes logging
2018-03-09 11:26:40 +01:00
Pierre Krieger eeee90def5 Abstract devp2p (#8048)
* Rename ethcore-network to ethcore-network-devp2p

* Fix typo

* Extract generic traits into util/network

* Simplify util/network

* Fix devp2p tests

* Remove old feature

* Fix RPC tests
2018-03-05 11:56:35 +01:00