Commit Graph

222 Commits

Author SHA1 Message Date
Grégoire Henry
66c2a60530 Client refactor: use the error_monad for all RPC services 2018-02-12 16:54:08 +01:00
Grégoire Henry
c9822abab7 Resto: minor simplification (remove RPC_service.map) 2018-02-11 19:45:40 +01:00
Grégoire Henry
f2b7897572 Resto: add RPC_path.subst{0,1,2,3} 2018-02-11 19:17:39 +01:00
Grégoire Henry
d78fa86372 Resto: Add Resto.forge_partial_request 2018-02-11 19:17:39 +01:00
Grégoire Henry
db500b5ebd RPC_service: hide the 'error type parameter 2018-02-08 17:23:30 +01:00
Grégoire Henry
2f295a3af8 P2p: less types in lib_base
Let's only have types required for the RPCs.
2018-02-08 17:23:29 +01:00
Vincent Bernardoff
3be9928e54 Tweetnacl: bugfix 2018-02-08 14:34:46 +01:00
Grégoire Henry
632233ea0c Opam: fix typo in tweetnacl package 2018-02-08 05:32:39 +01:00
Vincent Bernardoff
e1d1292c09 Crypto: drop libsodium
We now use simpler OCaml bindings much easier to review.
2018-02-07 11:16:39 +01:00
Grégoire Henry
575e367026 Update copyright notice (2018) 2018-02-05 23:34:05 +01:00
Grégoire Henry
bd8eaddc8c Resto: properly handle text/ocaml.exception. 2018-01-25 12:33:13 +01:00
Milo Davis
2595c14944 Build: add -safe-string to more places 2017-12-12 11:42:18 +01:00
Grégoire Henry
0871911920 RPC: split modules RPC/RPC_server 2017-12-11 17:53:51 +00:00
Grégoire Henry
4aa1b14ba6 RPC: introduce Resto_cohttp.Client and RPC_clients. 2017-12-11 17:53:49 +00:00
Grégoire Henry
02fd021aa9 Resto: allow optional/multi argument in query string 2017-12-11 17:53:48 +00:00
Grégoire Henry
26d1c463f9 Resto: split Resto_cohttp.Server 2017-12-11 17:53:48 +00:00
Grégoire Henry
ebd067a261 Resto: now depends on package 'uri' 2017-12-11 17:53:47 +00:00
Grégoire Henry
34cca61f7b Resto: minor renaming 2017-12-11 17:53:45 +00:00
Grégoire Henry
d2708740c8 Opam: fix some dependencies and add some scripts/opam-*.sh.
Installation:

   `./scripts/opam-pin.sh && opam install tezos-node tezos-client`

Upgrade installed packages after a `git pull` (opam2 only):

   `./scripts/opam-upgrade.sh`

Remove and cleanup every from the opam repo:

   `./scripts/opam-unpin.sh`
2017-12-08 02:50:03 +01:00
Grégoire Henry
ab77eb250e Resto/Jbuilder: fix test packaging 2017-12-08 02:50:03 +01:00
Grégoire Henry
5b50279851 Import new version of vendors/ocplib-resto
The new version of ocplib-resto :

- uses jbuilder ;
- is functorized over `Json_encoding` rather than `Json_repr` ;
- handles query parameters ;
- handles HTTP methods (GET, POST, DELETE, PUT, PATCH) ;
- replaces `custom_service` by a more generic trailer argument ;
- replaces generic answer `(code, body)` by a more ad-hoc sum type
  (allowing distinct encoding for success and error) ;
- includes a minimal HTTP-server based on Cohttp
  (includings CORS and media type negotiation).
- adds a function `Directory.transparent_lookup` to lookup/call
  a service handler without serializing the various parameters
  (path, query, request body).

As a first consequences in Tezos, this patch allows binary
communication between the client and the node.

This patch tries to be minimal inside the tezos source code and
therefore it introduces a minimal compatibility layer in
`RPC.ml`. This code should be removed as soon as possible.
2017-12-04 15:51:59 +01:00
Grégoire Henry
485d8bc26a Context: quick-and-dirty leveldb backend for Irmin
This is a dirty and non-optimized backend, it is still faster than the
current git backend.

Main drawbacks:
- the leveldb binding is non-coopertive, the node will
  block while committing a block to the disk ;
- the leveldb use 'string' while internally we use 'cstruct',
  this implies a lot of time-consuming 'memcpy'.
2017-11-26 22:49:17 +00:00