Commit Graph

39 Commits

Author SHA1 Message Date
Henry de Valence 22c3bdeb61 Prefix workspace crates with zebra- (#70)
* Update license and author metadata in workspace crates.

- ensure that the license field is set to GPL-3 for all GPL-3 licensed crates;
- ensure that the author field is set to "Zcash Foundation", responsible for maintenance;
- preserve the original authorship info in AUTHORS.md for human-readable history.

Updating the author field ensures that all of the machine systems that read
crate metadata list the ZF organization, not any single individual, as the
maintainer of the crate.

* Prefix all internal crate names with zebra-.

This does not move the directories containing these crates to also have zebra-
prefixes (for instance, zebra-chain instead of chain).  I think that this would
be preferable, but because it's a `git mv`, it will be simple to do later and
leaving it out of this change makes it easier to see the renaming of all of the
internal modules.

* Remove git dependency from eth-secp256k1

* Avoid an error seemingly related to Deref coercions.

This code caused an overflow while evaluating type constraints.  As best as I
can determine, the cause of the problem was something like so: the Rust
implementation of the Bitcoin-specific hash function used in the Bloom filter
doesn't operate on byte slices, but only on a `&mut R where R: Read`, so to
hash a byte slice, you need to create a mutable copy of the input slice which
can be consumed as a `Read` implementation by the hash function; the previous
version of this code created a slice copy using a `Deref` coercion instead of
`.clone()`, and when a tokio update added new trait impls, the type inference
for the `Deref` coercion exploded (somehow -- I'm not sure about the last
part?).

This commit avoids the problem by manually cloning the input slice.
2019-07-02 15:07:06 -04:00
Henry de Valence 891226069a Run cargo fmt 2019-06-28 15:26:18 -07:00
Svyatoslav Nikolsky 481ad468ce do not decode (and also hash) messages that will be ignored because of syncing 2019-03-20 12:50:01 +03:00
debris acb1cbdfd2 use tokio_io::AsyncRead in p2p lib 2017-03-25 16:05:49 +07:00
NikVolf f206634ce8 finalizing jsonrpc 2016-12-13 15:30:08 +01:00
NikVolf 8d42281804 refactoring on using context 2016-12-12 18:28:39 +01:00
NikVolf f302c3774e network api layout 2016-12-12 17:15:27 +01:00
debris ca49061df0 command line option to limit connections only to ipv4 or ipv6 2016-11-30 16:01:11 +01:00
debris 847cb36c6f chain verifier does not have hardcoded network constants 2016-11-25 18:38:21 +01:00
debris fe9828dbdc respect minimal protocol version, fixed #141 2016-11-17 01:02:43 +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 b32bf9f29f handshake tests 2016-10-30 11:44:10 +01: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
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 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 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 f7bfa16195 p2p in progress 2016-10-17 10:52:15 +02:00
debris 3c5d39c37b handling messages in progress 2016-10-13 15:24: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 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 4417a5d9c7 p2p error handling overhaul 2016-10-07 16:50:49 +02:00
debris 63ca383949 use H32 instead of [u8; 4] 2016-10-06 00:38:20 +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 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 5a535cf03c first correct handshake 2016-09-29 17:09:15 +02:00
debris 353a1d5b42 tcp stream wrapper 2016-09-29 01:23:54 +02:00
debris 2f90b65454 tokio p2p init 2016-09-21 08:54:08 +02:00