Commit Graph

61 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
Dimitris Apostolou cbf4c99d8b
Fix typos 2019-02-03 00:35:00 +02:00
Svyatoslav Nikolsky 3a1e6c9aa6 cleaning up 2018-11-13 14:20:25 +03:00
Svyatoslav Nikolsky 7e47bd3b28 flush 2018-05-18 12:04:36 +03:00
Svyatoslav Nikolsky d4a191aec1 segwit: initial flush 2017-08-22 14:39:10 +03:00
Svyatoslav Nikolsky 0e9b5fd89e merge good changes from sync_queue branch 2017-08-10 17:44:01 +03:00
debris 35c74d8948 use tokio_io::AsyncWrite in p2p lib 2017-03-25 16:20:45 +07:00
Svyatoslav Nikolsky 7c3bf1731c pass version message to sync 2017-01-11 17:54:30 +03:00
NikVolf 00e5c3c685 mock intervals 2016-12-27 18:30:14 +03:00
NikVolf 37e815b435 handy method & tests 2016-12-26 14:36:13 +03:00
NikVolf b3dff10cf9 remove misundestood fields 2016-12-26 14:23:15 +03:00
NikVolf 4caf69dff7 smoky test 2016-12-26 13:58:30 +03:00
NikVolf 56d95e4cb8 track ping-pong 2016-12-26 13:50:29 +03:00
NikVolf fc5f8cc21c wip 2016-12-21 18:19:24 +03:00
NikVolf 579bccb35c refactored to hashmaps 2016-12-21 18:08:41 +03:00
NikVolf fbdcdaefbb stats naive 2016-12-21 15:02:50 +03:00
NikVolf f206634ce8 finalizing jsonrpc 2016-12-13 15:30:08 +01:00
NikVolf 92b103deb8 p2p api changes 2016-12-13 14:23:16 +01:00
Svyatoslav Nikolsky 2b1fecb286 close connection when block verification failed with error 2016-12-02 18:12:20 +03: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
debris fe9828dbdc respect minimal protocol version, fixed #141 2016-11-17 01:02:43 +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 6b38929222 cleanup session init and on_message 2016-11-09 22:36:29 +01:00
debris 448259328d connect to multiple nodes automatically 2016-11-03 00:22:23 +01: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
Marek Kotewicz 36c61c0474 Improvements for `Session` (#29)
* Session::initialize does not return result

* SessionFactory
2016-10-24 16:39:20 +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 189fd37835 ping->pong exchange 2016-10-21 10:55:37 +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