Commit Graph

125 Commits

Author SHA1 Message Date
Grégoire Henry
f3abee1fdf Utils: add Lwt_pipe.pop_all. 2017-11-10 09:52:29 +00:00
Milo Davis
673f70c5d0 Client Keys: Vanity keys 2017-11-09 12:57:18 +00:00
Benjamin Canou
6de9c68e81 Remove reminiscent trace of Sha256 2017-11-08 23:30:34 +00:00
Grégoire Henry
dad0793353 P2p: better logging on failing "Swap". 2017-11-08 23:30:31 +00:00
Grégoire Henry
ee2cb59731 Remove reminiscent trace of Base48.
A long time ago we were using a custom Base48 encoding instead of the
standard Base58.
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
616ca33498 Distributed_db: randomly selecting peer 2017-11-03 15:12:08 +00:00
Grégoire Henry
5c1f96f3a1 Shell: add the number of validation passes in the block header. 2017-11-03 15:12:06 +00:00
Grégoire Henry
d4ac1389e3 Shell: add comparison operators to Tezos_data 2017-11-03 15:12:04 +00:00
Milo Davis
466831c179 CLI: Autocomplete 2017-11-03 10:59:02 +01:00
Arthur Breitman
1bdae93ffd Mining -> Baking 2017-11-01 08:42:37 -07:00
Arthur Breitman
4fb3874fea mining -> baking 2017-11-01 04:07:33 -07: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
Milo Davis
490ce840f9 Remove all .merlin 2017-10-31 20:33:54 +00:00
Grégoire Henry
dc2cd4db1c Utils: add Data_encoding.delayed
This allows a better representation for `Error_monad.error_encoding`,
capturing the side-effect of new error registration.
2017-10-31 20:33:45 +00:00
Grégoire Henry
370112f9b8 Makefile: simplify the compilation process.
This patch is co-authored with: cagdas.bozman@ocamlpro.com

With this patch the economic protocol is now compiled as as
"functor-pack", parameterized over the environment. This will ease the
protocol reusability outside of the tezos source tree (e.g. for a
michelson Web IDE) and will allow proper unit testing of the economic
protocol.

This functorization allows to break the dependency of the
'tezos-protocol-compiler' on various '.mli' of the node, and hence
we don't need anymore the unusual compilation schema:

  a.mli -> b.mli -> b.ml -> a.ml

where 'A' is linked after 'B' but 'a.mli' should still be compiled
before 'b.mli'. This will simplify a switch to 'ocp-build' or 'jbuiler'.
2017-10-11 13:44:09 +00:00
Milo Davis
b5e53191e2 CLI: New argument parsing and help messages 2017-10-04 15:27:56 +02:00
Grégoire Henry
b49491587f Reset the chain. 2017-09-22 11:37:57 +02:00
Milo Davis
d644c32676 Removes webclient 2017-09-13 15:06:48 +02:00
Grégoire Henry
571e87dacb Update to mtime.1.0 2017-08-16 10:53:43 +02:00
Milo Davis
efdf8c74eb Michelson: better propagation and printing of errors to the client 2017-07-26 14:08:49 +02:00
Grégoire Henry
2bc63854a8 Shell: Liveness of operations
Operations now include a block hash in their header. Such an operation
could only be included in a successor of this block.

Furthermore, when validating a block, the economic protocol now
returns---together with the context---an integer `max_operations_ttl`.
Then, when validating a successor, the shell will fail if it contains
an operation whose header's block hash is not one the
`max_operations_ttl` predecessors of the block.

As a bonus, the shell is now able to detect and forbid replayed
operations. Then, we might decide to remove some replay
detection-mechanism that we previously implemented in the economic
protocol.
2017-06-12 11:07:37 +02:00
Grégoire Henry
90780f3374 Shell: minor renaming
Let's be consistent with Lwt (and ourselves).
2017-06-12 11:07:37 +02:00
Grégoire Henry
4bbc97aeb6 Shell: rework the preapply RPC
It now takes a `proto_header` in parameter, and it returns a full
`shell_header`. This prepares the inclusion of the context's hash in the
`shell_header`.
2017-06-12 11:07:35 +02:00
Grégoire Henry
f96ecbf667 Test: inject operation and block atomically 2017-06-12 11:05:46 +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
Grégoire Henry
4995864316 Shell: regroups basic data types in Tezos_data 2017-06-12 11:04:43 +02:00
Grégoire Henry
e11e9c9ac5 Shell/P2p: Split the unit tests in smaller atom.
And use more `Error_monad`...
2017-04-10 23:14:31 +02:00
Grégoire Henry
4537c8780e Shell: introduce Error_monad._assert. 2017-04-10 23:08:16 +02:00
Benjamin Canou
18e2edf6f4 Client: minor client output fixes and enhancements. 2017-04-10 18:31:37 +02:00
Grégoire Henry
166801fc77 Client: more Error_monad in Cli_entries. 2017-04-10 18:31:37 +02:00
Grégoire Henry
cfb7e35914 Client: a bit of Error_monad in Hash 2017-04-10 18:31:37 +02:00
Grégoire Henry
f5e2f7b481 Client: more Error_monad in Client_aliases 2017-04-10 18:31:37 +02:00
Grégoire Henry
3226565b39 Client: more Error_monad in Client_{node,proto}_rpcs 2017-04-10 18:31:37 +02:00
Grégoire Henry
ef3180c561 Shell: Smaller Net_id. 2017-04-02 15:40:04 +02:00
Grégoire Henry
ffc8fa0383 RPC: rebind 'complete' for blocks and operations. 2017-04-02 15:33:32 +02:00
Grégoire Henry
24b5290a74 Opam: use the libev backend of Lwt. 2017-03-31 16:58:59 +02:00
Grégoire Henry
a6307c40cf Shell: add unit tests for Merkle tree 2017-03-31 01:19:33 +02:00
Grégoire Henry
9097809589 Shell: Merkle tree of operations 2017-03-31 01:19:33 +02:00
Grégoire Henry
7e1cc171cc Shell: fix unhandled exception in io_scheduler. 2017-03-28 14:37:15 +02:00
Benjamin Canou
d99d8f88a1 Utils: add [Lwt_utils.Idle_waiter]. 2017-03-16 18:49:31 +01:00
Guillem Rieu
83f2e0dcd3 Client: switch to JSON config file and remove config-file dependency. 2017-03-16 18:49:31 +01:00
Arthur Breitman
76fad5a3db Economic = economique
Economical = econome
2017-03-15 08:00:53 -07:00
Vincent Bernardoff
556c965af7 RPC server: use ~on_exn 2017-03-09 14:38:39 +01:00
Grégoire Henry
cb90e3e5c5 Lwt: temporary Hack (waiting for Pierre's expertise) 2017-03-02 16:18:44 +01:00
Grégoire Henry
05ed4e7557 Error_monad: allow binary serialization of error. 2017-02-26 02:02:33 +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
300dd5ea6d Makefile: praise the return of utop.
The Makefile is really hackish...
2017-02-25 18:14:05 +01:00
Grégoire Henry
09dcb59c14 Makefile: praise the return of utop.
The Makefile is really hackish...
2017-02-24 18:02:24 +01:00
Pierre Chambart
a23d718515 Add utils/Watcher 2017-02-24 16:20:59 +01:00