Grégoire Henry
6a00c55c4e
Shell: add docstrings for the validator.
2017-11-17 14:13:55 +01:00
Grégoire Henry
c5b5a87ab7
P2p: add regression test for oversized message
2017-11-17 13:46:27 +01:00
Grégoire Henry
72c414aaeb
P2p: fix bound checks
...
Credit to `tomjack` on freenode.
2017-11-17 01:58:41 +01:00
Grégoire Henry
1429a6c8e6
Almost too late for copyright update.
2017-11-15 13:13:16 +01:00
Pietro Abate
6ecfca9396
Reindent all files
...
Now `make test` fails when sources are not indented correctly, the
indentation test is also executed in the CI.
2017-11-13 23:13:34 +01:00
Milo Davis
32a466556e
Jbuilder: use --dev option
2017-11-13 22:30:35 +01:00
Grégoire Henry
5beb62c83e
P2p: more debug in P2p_connection
.
2017-11-13 11:04:17 +00:00
Grégoire Henry
e98e175c21
Lwt_pipe: do not force the size function to count bytes.
...
For now, we were always bounding a queue size by the total amount of
allocated bytes. We might want to use ather kind of bounds (e.g. the
total number of elements).
2017-11-13 11:04:16 +00:00
Grégoire Henry
cb1e5cc396
P2p: missing Lwt_utils.protect
in the reader worker.
2017-11-08 23:30:33 +00:00
Grégoire Henry
0e2a751408
P2p: better logging on read timeout.
2017-11-08 23:30:32 +00:00
Grégoire Henry
dad0793353
P2p: better logging on failing "Swap".
2017-11-08 23:30:31 +00:00
Pietro Abate
48d7ba29e8
Generate html API documentation
...
- add a new targert "make doc-html" to generate the html doc via
jbuilder
- this patch adds public_name to jbuild files for all libraries
2017-11-08 15:55:40 +01:00
Grégoire Henry
0c3a54c2f9
Distributed_db: export disconnect
2017-11-03 15:12:09 +00:00
Grégoire Henry
54a21fdb46
Shell: properly reexport P2p_types.Peer_id
.
2017-11-03 15:12:04 +00:00
Milo Davis
0a7f9a39a9
Switch to Jbuilder
...
This is a rewrite of the build system with `jbuilder`, with just a
minimal toplevel Makefile for backward compatibility.
This first patch preserves the project architecture, we only gain
proper dependencies handling and always up-to-date `.merlin` files.
A latter patch may split the project in smaller "sub-package",
i.e. multiple `.opam` files.
The embedded versions of the economic protocol are now compiled with
`jbuilder` instead of `tezos-protocol-compiler`, potentially allowing
proper inlining at the cost of slightly-less-stricter
sandboxing. Nevertheless, dynamically loaded protocol are still
compiled with the `tezos-protocol-compiler` and thus strictly
sandboxed ; and a CI rule also checks the proper sandboxing of
embedded protocols.
This patch is coauthored with @hnrgrgr
2017-10-31 20:33:56 +00:00
Grégoire Henry
d2ad611c3d
Node/Sandbox: allow 'private' address
...
Allows any kind of 'private' listening address (as defined by IANA)
rather than only allowing `[::1]`.
Also document the error.
2017-08-28 21:25:19 +02:00
Grégoire Henry
4c7d4a8348
P2p: comment out dead code
2017-08-22 14:56:15 +02:00
Grégoire Henry
571e87dacb
Update to mtime.1.0
2017-08-16 10:53:43 +02:00
OCamlPro-Iguernlala
fbacfff9e6
P2p: use incremental encoding/decoding
2017-08-08 11:22:05 +02:00
Grégoire Henry
f39eca214a
Shell: remove the on-disk index of operations
...
Let's get serious. The full index of operations is not sustainable in
the production code. We now only keep the index of operations not yet
in the chain (i.e. the mempool/prevalidation). Operations from the
chain are now only accesible through a block. For instance, see the
RPC:
/blocks/<hash>/proto/operations
2017-06-12 11:04:43 +02:00
OCamlPro-Iguernlala
4ded0660d6
p2p: check values of some options in P2p.create
2017-06-12 09:39:36 +02:00
Grégoire Henry
443cee2bb3
Fix compilation with lwt.3.0.0
2017-05-07 12:26:27 +02:00
Benjamin Canou
442f2d00a0
RPCs: fix missing CORS headers.
2017-04-19 17:27:45 +02:00
Grégoire Henry
413bddcd96
Shell/P2p: propagate all errors to {raw_,}write_sync
.
...
Those functions are only used in the testsuite.
2017-04-10 23:08:16 +02:00
Grégoire Henry
c187a0b792
Shell/P2p: implements raw_write_sync
.
...
For testing only: it allows to send 'gardled' messages to a peer.
2017-04-10 23:08:16 +02:00
Grégoire Henry
c2a4db2d81
Shell/P2p: propagate disconnection errors through the pool
.
2017-04-10 23:08:16 +02:00
Grégoire Henry
4523a67e7d
Shell/P2p: fix connection close on read error
2017-04-10 23:08:16 +02:00
Grégoire Henry
3226565b39
Client: more Error_monad
in Client_{node,proto}_rpcs
2017-04-10 18:31:37 +02:00
Benjamin Canou
f26dfdbe8e
RPC: fix CORS preflight.
2017-04-10 18:23:24 +02:00
Grégoire Henry
7e1cc171cc
Shell: fix unhandled exception in io_scheduler
.
2017-03-28 14:37:15 +02:00
Guillem Rieu
cc44053229
RPC: add HTTP methods and Content-Type headers.
2017-03-16 18:49:31 +01:00
Grégoire Henry
826f2ea4ba
P2p: implements peer swapping
2017-03-14 11:56:42 +01:00
Vincent Bernardoff
556c965af7
RPC server: use ~on_exn
2017-03-09 14:38:39 +01:00
Vincent Bernardoff
63e5ea5e79
Client: Add "network stat" command.
2017-03-07 13:07:18 +01:00
Grégoire Henry
b674c538b2
Shell: refactor the distributed DB.
...
This refactors `src/node/shell/state.ml` in order to trace the source of
blocks and operations. This prepares the node for the three-pass
validator.
In the procces, it adds an in-memory overlay for blocks and operations.
2017-02-25 18:14:05 +01:00
Grégoire Henry
69ebe7d0cc
Shell: minor doc improvement in RPC.
2017-02-24 16:22:56 +01:00
Grégoire Henry
bda80bf613
Shell: rename gid
into peer_id
2017-02-24 16:22:56 +01:00
Vincent Bernardoff
b0ed3cefac
Shell: Add RPCs for introspecting the state of the P2P layer
2017-02-24 16:22:55 +01:00
Vincent Bernardoff
70491aea8c
Utils: Moving_average: use int64 for total
2017-02-24 16:20:59 +01:00
Vincent Bernardoff
92c339f732
P2P: more types
2017-02-24 16:20:59 +01:00
Vincent Bernardoff
efc6d285c6
Shell: limit known points table size
...
* Gc events still need to be recorded
2017-02-16 13:23:01 +01:00
Benjamin Canou
f7a70f355c
Node: shutdown on an RPC server error.
2017-02-15 15:26:39 +01:00
Grégoire Henry
55e2429758
P2p: more debug traces.
2017-02-15 15:26:39 +01:00
Grégoire Henry
48da8299a6
P2p: various small fixes.
...
* fix bad "locking" in `p2p_io_scheduler.shutdown`
* add missing exception handler in `P2p_io_scheduler`
* wake-up `P2p.recv_any` when a new connection is established
* reintroduce version negotiation
* fix typo in greylisting
2017-02-15 15:26:39 +01:00
Vincent Bernardoff
6d41b3d38c
Shell: Improve the CLI of tezos-node
...
* Use subcommands:
* `tezos_node run`
* `tezos_node config`
* `tezos_node identity`
* Regroup all on-disk data in `--data-dir`
* Split `Node_main` in multiple files.
* Add DNS resolution for `--net-addr` and `--rpc-addr`
* Hardcode `bootstrap.tezos.com` as bootstrap peer(s)
* Add `--no-bootstrap-peers`
* Rename `--expected-connections` -> `--connections`
2017-02-15 15:26:17 +01:00
Grégoire Henry
ec0e7d4d48
Merge branch 'lwt_pipes_limit' into 'master'
...
Lwt_pipe: limit by content size in bytes
See merge request !137
2017-01-24 00:05:07 +01:00
Grégoire Henry
0820744619
Lwt_pipe: minor style issue
2017-01-23 23:59:16 +01:00
Grégoire Henry
b228904bc7
Node: more CLI argument
2017-01-23 22:15:36 +01:00
Grégoire Henry
2da0c83b5a
P2p: postpone the first maintenance step.
2017-01-23 22:01:35 +01:00
Grégoire Henry
5ee3581d60
P2p: fix in P2p_maintenance
2017-01-23 22:01:35 +01:00