Commit Graph

73 Commits

Author SHA1 Message Date
Vincent Bernardoff
41f6757ef8 Everywhere: exception Not_found -> _opt 2018-07-13 01:31:04 +02:00
Benjamin Canou
edc1a6512f CI: fix p2p opam tests 2018-07-06 19:11:50 +02:00
Benjamin Canou
8aec39d8bb CI: use IPv4 in p2p tests 2018-07-06 18:05:10 +02:00
Pierre Boutillier
140bd6b1ca Tezos is now Open Source 2018-06-30 17:41:32 +02:00
Vincent Bernardoff
2830ca3232 P2p: P2p_pool.Peers.ban now also kick target 2018-06-29 15:27:26 +00:00
Raphaël Proust
1c2a771832 Everywhere: return_{none,some,nil,true,false} 2018-06-27 10:57:21 +02:00
Raphaël Proust
103d5355f2 Everywhere: return_unit 2018-06-27 10:57:21 +02:00
Chris Martin
2f4c002acf Fix "bootstrapping" typos 2018-06-25 15:15:19 +02:00
Pierre Chambart
ce926e575a Teamwork: Prevent leaks with never_ending
Lwt_utils.never_ending is a global variable, hence a GC root. A promise
created by binding it cannot ever be garbage collected. This fixes the
known leak in the baker an endorser by allocating a fresh one for each
use (by turning it into a function). This porbably fix other slower
leaks.

High five Klakplok and Vincent.
2018-06-19 03:06:21 +02:00
Grégoire Henry
5fd5c1c5f7 Dune: upgrade to 1.0+beta20 2018-06-08 15:27:23 +00:00
Grégoire Henry
030630ec0f Data_encoding: mandatory title to case 2018-06-06 10:54:33 +02:00
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