Commit Graph

776 Commits

Author SHA1 Message Date
Benjamin Canou
9cb50f01b2 P2P: ignore spurious SIGPIPE signals 2017-12-04 19:27:30 +01:00
Benjamin Canou
0967c7fde7 Tests: cleanup P2P tests output 2017-12-04 19:27:30 +01:00
Grégoire Henry
d3f91f05a2 Fix CI for new repository structure 2017-12-04 19:27:30 +01:00
Grégoire Henry
82857dcb94 Jbuilder: split lib_node_net
- `lib_node_p2p_base`: Base datatypes for the P2P layers
- `lib_node_services`: RPC service definitions (depends on `node_p2p_base`)
- `lib_node_http`: RPC http server
- `lib_node_p2p`: the P2P workers
2017-12-04 19:15:26 +01:00
Grégoire Henry
3f354e7d78 Jbuildet: tezos-node-db -> tezos-storage 2017-12-04 19:15:26 +01:00
Grégoire Henry
ab5b597eb1 Jbuilder: Move client & node libraries in their own OPAM packages 2017-12-04 19:15:26 +01:00
Benjamin Canou
cecd042daa Move Michelson specification to /docs 2017-12-04 19:15:26 +01:00
Grégoire Henry
9cb498eee6 Jbuilder: Move alpha/genesis/demo in their own two OPAM packages
One package for the embedded version. One for the functorized one.
2017-12-04 16:05:54 +01:00
Grégoire Henry
78d838059f Jbuilder: move protocol-compiler in its own OPAM package 2017-12-04 16:05:54 +01:00
Grégoire Henry
e24b1dda75 Jbuilder: move protocol_environment_sigs in its own OPAM package 2017-12-04 16:05:54 +01:00
Grégoire Henry
92d166175f Jbuilder: move Micheline in its own OPAM package 2017-12-04 16:05:54 +01:00
Grégoire Henry
b6449cae87 Jbuilder: split src/utils/ in multiple OPAM packages
* `lib_stdlib`: basic extended OCaml stdlib and generic data structures

* `lib_data_encoding`: almost independant 'Data_encoding'
* `lib_error_monad`: almost independant 'Error_monad'

* `lib_stdlib_lwt`: extended Lwt library
* `lib_crypto`: all the crypto stuff (hashing, signing, cryptobox).

* `lib_base`:
  - basic type definitions (Block_header, Operation, ...)
  - a module `TzPervasives` to bind them all and to be the
    single module opened everywhere.

In the process, I splitted `Tezos_data` and `Hash` in multiple
submodules, thus removing a lot of `-open`.

The following two modules may not have found their place yet:
- Base58 (currently in `lib_crypto`)
- Cli_entries (currently in `lib_stdlib_lwt`)
2017-12-04 16:05:54 +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
Pierre Chambart
6c679d2e2c Michelson: compute depth for type size check
This allows to ensure that the depth to look at is updated when
michelson is.
2017-12-02 23:02:50 +00:00
Pierre Chambart
fedeb6c8fd Michelson: enforce a maximum stack item type size 2017-12-02 23:02:50 +00:00
Milo Davis
b4495568cb Fixes OSX select exception
This patch is primarily authored by @chambart
2017-11-30 14:50:36 +01:00
Benjamin Canou
97d983285e Node: allow identity.json to stay when clearing the data-dir 2017-11-28 17:28:56 +01:00
Benjamin Canou
e91f5bc588 Node: Cleanup a few error messages. 2017-11-28 15:43:58 +01:00
Benjamin Canou
606c6e55e4 Node: update shutdown order to prevent some leveldb read errors. 2017-11-28 15:43:47 +01:00
Benjamin Canou
4b0896300d Fix alphanet_constants.patch 2017-11-28 15:43:40 +01:00
Pietro Abate
6e68fb425a Fix #66 and #59 2017-11-27 17:26:36 +01:00
Grégoire Henry
8f30934220 Validator: always log invalid block 2017-11-27 10:40:43 +00:00
Grégoire Henry
471006b2dd Validator: properly handle termination of Block_validator. 2017-11-27 10:40:43 +00:00
Grégoire Henry
10d1b08c85 Validator: do not try to validate twice an invalid block 2017-11-27 10:40:42 +00:00
Milo Davis
7bed296525 Client: stuck node debug command 2017-11-27 10:40:42 +00:00
Benjamin Canou
61f7a95102 RPCs: fix encoding of list_invalid RPC 2017-11-27 10:40:41 +00:00
Milo Davis
9f45ae9126 Node: listing of invalid blocks 2017-11-27 10:40:41 +00:00
Milo Davis
42e29c8f4a Node: allow invalid block errors to be stored 2017-11-27 10:40:40 +00:00
Milo Davis
059e4cac79 Fix spelling mistake 2017-11-27 10:40:39 +00:00
Grégoire Henry
c6b4a83e2b Reset the chain. 2017-11-26 22:49:20 +00:00
Grégoire Henry
667d4fd575 Alphanet: never more than 5 faucet operations per block 2017-11-26 22:49:20 +00:00
Grégoire Henry
a648c34f0a Alphanet: let the number of rolls never reach 100000.
This is a hack! This is a possible mitigation for the 'faucet war'.
2017-11-26 22:49:19 +00:00
Grégoire Henry
7bd5ef32d9 Alpha: better spreading of roll storage
This greatly reduces the time spent reading roll, while it only
slightly increase the time spent while 'freezing' rolls at the end of
a cycle.
2017-11-26 22:49:18 +00: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
Grégoire Henry
3fcc6df975 Alpha: use recursive removal when possible 2017-11-26 22:49:16 +00:00
Benjamin Canou
450d0dba4e Client: remove trace of the web client. 2017-11-26 23:32:04 +01:00
Pietro Abate
b4573fb323 Client: duplicates results in list versions. 2017-11-26 23:31:58 +01:00
Pietro Abate
4c30016af3 Client: add -protocol to the client command line. 2017-11-26 23:30:38 +01:00
Milo Davis
f2c27c78ab Fixes Github issue #141 (no implementation of EndianBigstring) 2017-11-22 16:07:05 +00:00
Grégoire Henry
f9e6831363 Shell: enforce maximum operation size 2017-11-20 05:03:00 +01:00
Grégoire Henry
84a2f1ee29 Shell: enforce the maximum number of operation per block 2017-11-20 05:03:00 +01:00
Grégoire Henry
3c06879deb Shell: add Error_monad.{iter2_p,iteri2_p} 2017-11-20 04:57:09 +01:00
Grégoire Henry
06a6cf5b9a Proto: allow to update 'max_number_of_operations'
The constant is now defined per block and not per protocol.
Also allows to set a limit per validation pass.
2017-11-20 04:57:09 +01:00
Grégoire Henry
13dd470d06 More renaming: 'mine' -> 'bake' 2017-11-20 04:27:27 +01:00
Grégoire Henry
42681dfea5 Jbuilder: better error reporting 2017-11-20 01:21:54 +01:00
Grégoire Henry
5bcb2593a3 Docker: fix leveldb installation 2017-11-20 01:11:38 +01:00
Benjamin Canou
ac62538eb6 Alpha: remove some fixme and assert false 2017-11-17 15:54:36 +01:00
Grégoire Henry
17644e0fa3 Proto: reimplements Storage_functors with iterable indexes
The new `Storage_functors` is now a "functional" equivalent of the
"imperative" `Store_helpers` used in the shell.
2017-11-17 15:54:36 +01:00
Grégoire Henry
b6b59be5fd Jbuilder: minor improvement in error reporting. 2017-11-17 15:54:36 +01:00
Grégoire Henry
a7364f0ed5 Proto_env: remove Context.list
This was a reminder of old-time (before irmin-1.0). It is now replaced
with: `Context.{fold,keys}`.
2017-11-17 15:54:36 +01:00