Commit Graph

62 Commits

Author SHA1 Message Date
Grégoire Henry
c175cd1c65 Shell/RPC: use query parameters for /p2p 2018-06-06 10:54:33 +02:00
Grégoire Henry
95a56753df P2p: store connection_local_metadata in P2p_connection.Info.t 2018-06-05 13:51:25 +02:00
Grégoire Henry
e610fcaade P2p: read connection metadata before to accept connections
This will allow to decide whether to accept a connection or not
depending on its actual metadata.
2018-06-05 13:51:20 +02:00
Grégoire Henry
26c08672dd P2p: slighty less verbose debug 2018-06-05 13:51:12 +02:00
OCamlPro-Iguernlala
5456824960 P2p: do not propose private nodes for peers swap 2018-06-05 13:51:11 +02:00
OCamlPro-Iguernlala
d08cd57c69 P2p: do not broadcast private peers 2018-06-05 13:48:29 +02:00
OCamlPro-Iguernlala
6b287ba98e P2p: do not request new peers from known private peers 2018-06-05 13:41:33 +02:00
OCamlPro-Iguernlala
bcb56331b5 P2p: tag known peers as private until the first connection
This information will be needed to be able to know if a
point is/was eventually private.
2018-06-05 13:40:12 +02:00
OCamlPro-Iguernlala
4a16b3ef0b P2p: add "private node" information in Connection_metadata.
Add private_node flag in Connection_metadata.t and update Node,
Distributed_db, P2p and P2p_pool to propagate the information
2018-06-05 13:40:00 +02:00
OCamlPro-Iguernlala
65758d08ac P2p: add a warning in case of an incoming connection from an untrusted peer 2018-06-05 13:39:50 +02:00
OCamlPro-Iguernlala
6bbdf13bc5 P2p: do not send bootstrap message to peers in private mode 2018-06-05 13:39:43 +02:00
OCamlPro-Iguernlala
6663109639 P2p: disable some capabilities when creating a connection in private mode
This is mainly done in the creation of the callback functions of
the answerer's field of a 'connection'.
2018-06-05 13:38:53 +02:00
OCamlPro-Iguernlala
c1ccea3501 P2p: do not send peer swap requests in private mode 2018-06-05 13:34:50 +02:00
OCamlPro-Iguernlala
01648e7611 Node: rename option '--closed' to '--private-mode' 2018-06-05 13:29:06 +02:00
michael
aedf867e4a RPC: Add conn_metadata to peer_info rpcs 2018-06-04 15:55:41 +02:00
michael
d5925f088c P2p: Add option to disable the mempool
This allows a node to specify that it doesn't want to receive operations
that are not included in a block. To do so, one should use the new
--disable-mempool option.

A disabled mempool node announce its configuration during the ACK exchange.
This configuration should be easily expandable with other options.

Node will keep track of the ack exchange configuration for each nodes it
is connected to and will not propagate its mempool to disabled mempool
nodes.

A disabled mempool node will ignore non-empty mempool received.
In the future, this incident should be punish by a decrement of its score
and / or ban.
2018-06-04 15:35:22 +02:00
michael
5b21610985 P2p: fix weird partial application 2018-06-04 15:17:37 +02:00
Grégoire Henry
6faaeaf5e8 P2p: properly export connection metadata 2018-06-04 15:17:35 +02:00
Grégoire Henry
0d8990887c Jbuilder: fix the target @runtest_indent 2018-05-26 20:08:03 +02:00
michael
3f1363b9ba P2P/Shell: Split metadata into peer_metadata and conn_metadata
Peer_metadata is meant to keep track of peer's score.

Conn_metadata is meant to keep track of connection configuration given
during Ack exchange.
2018-05-25 11:39:22 +02:00
Grégoire Henry
5023e1a261 Data_encoding: rename Binary.to_bytes into to_bytes_exn 2018-05-24 15:43:15 +00:00
Grégoire Henry
72fc71be67 Data_encoding: rename Binary into Binary_writer 2018-05-24 15:43:15 +00:00
Grégoire Henry
aee6718148 Data_encoding: use CPS for the stream reader 2018-05-24 15:43:15 +00:00
Grégoire Henry
1f358b7f9a Data_encoding: move cut_bytes into MBytes 2018-05-24 15:43:15 +00:00
Fabrice Le Fessant
8986640a98 P2p: make nonces unpredictable when connecting
Avoid replay-attacks by preventing a node from determining one of the
nonces used in the encryption of a channel between two nodes.
2018-05-24 12:11:42 +02:00
OCamlPro-Iguernlala
4caf7cf679 P2p_maintenance: improve 'try_to_contact' and 'connectable'
To avoid eventual infinite loops in 'try_to_contact', we
accumulate the set of points that have been seen to discard them
during recursive calls.
2018-05-22 12:20:04 +02:00
OCamlPro-Iguernlala
6b8c3f7d31 P2p_maintenance.connectable: ignore non-trusted points if option --closed is set 2018-05-12 23:42:20 +02:00
Vincent Bernardoff
b48ba96106 Stdlib: use bigstring to implement MBytes 2018-05-12 23:11:35 +02:00
Pietro
b27bb84861 [p2p] fix space for semicolon and pipe 2018-05-03 16:03:01 +02:00
Pierre Chambart
d71ff759dc Remove uses of Time.now in P2p_acl 2018-05-03 16:03:01 +02:00
Pietro
4d9292fcbb Fix other minor comments 2018-05-03 16:03:01 +02:00
Pietro
c5d41465a2 p2p: temp ban point on invalid auth 2018-05-03 16:03:01 +02:00
Pietro
ce92f70883 P2p: Fix Hashtbl for PeerRing
Export hash in INTERNAL_HASH. now Peer_id.Id is hashable
2018-05-03 16:03:01 +02:00
Vincent Bernardoff
b3df4e63c8 [P2P] ACLs: cosmetics, renamings, comments 2018-05-03 16:03:01 +02:00
Pietro
02838a4cbc p2p,node,client: Add Greylists
- add admin commands to ban and unban ips and peers
- add greylist_timeout option to configuration file (node)
- Add greylist modules + RPC
2018-05-03 16:03:01 +02:00
Milo Davis
7a43c5bc41 P2p_pool: fix ambiguous JSON union case 2018-04-26 22:52:21 +02:00
Milo Davis
ebfdeea8d5 Data_encoding: add descriptions to encodings 2018-04-26 22:52:21 +02:00
Arthur B
21efb2dc9d Jbuilder: update to beta.19.1 2018-04-06 11:47:22 +02:00
bruno
bdf6a5e564 General: update jbuilder to 1.0+beta19 2018-03-20 06:49:52 +01:00
Grégoire Henry
76a59af376 Opam: use jbuilder.1.0.0-beta18 2018-03-08 14:38:57 +01:00
Grégoire Henry
ad330db7e1 Opam: require jbuilder = 1.0.0-beta17 2018-03-07 18:12:12 +01:00
Vincent Bernardoff
684fe1110b P2P: doc and associated minor changes. 2018-03-01 14:16:33 +01:00
bruno
5a37f6acf1 Shell: mv p2p errors to shell services
Notes:
1. P2p_socket.Rejected -> P2p_errors.Rejected_socket_connection
   to avoid conflict with P2p_pool.Rejected
2. Connection_closed error in P2p_pool unused and redundant with one
   in P2p_io_scheduler
2018-03-01 12:28:04 +00:00
Grégoire Henry
322fc1e353 RPC: move p2p services registration in tezos-p2p 2018-02-15 00:29:15 +01:00
Grégoire Henry
a70a0788d3 Test: quick and dirty port to alcotest 2018-02-12 02:09:00 +01:00
Grégoire Henry
1f0c10bc6f Client refactor: Rename stdlib-lwt into stdlib-unix 2018-02-08 17:23:30 +01:00
Grégoire Henry
484b5b5b08 Client refactor: move stdlib_lwt out of base 2018-02-08 17:23:30 +01:00
Grégoire Henry
84d8ae9222 Client refactor: Move Data_encoding_ezjsonm.read_file into Lwt_utils_unix 2018-02-08 17:23:30 +01:00
Grégoire Henry
24c6f4ea98 Client refactor: Move Lwt_utils_unix.protect into Error_monad 2018-02-08 17:23:30 +01:00
Grégoire Henry
8c58d7a610 Client refactor: Move non-unix part of Data_Encoding_Ezjsonm into Data_Encoding.Json 2018-02-08 17:23:30 +01:00