Commit Graph

154 Commits

Author SHA1 Message Date
Grégoire Henry
f63c5acbf5 Distributed_db: inline the header when broadcasting a new block.
This adds a small size overhead in the network message, but in most
cases it will avoid a subsequent 'fetch' of the header.
2017-11-13 11:04:15 +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
a7a4564670 Node: add an explicit type for Block_locator.t 2017-11-03 15:12:03 +00:00
Milo Davis
96953d9895 Michelson: Adds typechecking test for michelson-lang.com contracts 2017-11-03 15:51:11 +01:00
Milo Davis
6c992b58df Michelson: adds LOOP_LEFT, ITER, MAP body 2017-11-03 15:51:11 +01:00
Milo Davis
c387ed823a Michelson: Propagate and check annotations 2017-11-03 15:51:11 +01:00
Arthur Breitman
1bdae93ffd Mining -> Baking 2017-11-01 08:42:37 -07:00
Arthur Breitman
6dd9f2289a mining -> baking, continued 2017-11-01 04:13:23 -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
a3aa8b60bb Remove Makefiles 2017-10-31 20:33:54 +00:00
Milo Davis
490ce840f9 Remove all .merlin 2017-10-31 20:33:54 +00:00
Grégoire Henry
c5d15d3640 Test/Alpha: allows distinct port for distinct test. 2017-10-31 20:33:53 +00:00
Milo Davis
47d77acfd7 Rename client_alpha.cmx into client_embedded_alpha.cmx 2017-10-31 20:33:52 +00:00
Milo Davis
26b05ae292 Remove unused open 2017-10-31 20:33:52 +00:00
Grégoire Henry
0afb67dd10 Remove tezos_protocol_packer 2017-10-31 20:33:50 +00:00
Grégoire Henry
dd9e5f5c95 Updater: simplify signature and error registration.
In particular, register the `Ecoproto_error` at the same time the
functor `Environment.Make` is applied.
2017-10-31 20:33:48 +00:00
Milo Davis
90f9f51421 Merge src/client/embedded/alpha/baker/* into src/client/embedded/alpha/ 2017-10-31 20:33:47 +00:00
Milo Davis
93b1f69418 Michelson: Timestamp operations 2017-10-20 08:30:54 +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
31cede5582 Test: fixes relative paths issue on OSX (https://github.com/tezos/tezos/issues/117) 2017-10-02 15:12:55 +02:00
Benjamin Canou
d8267a7674 Tests: increase timeouts in case the CI is too slow 2017-09-29 10:44:30 +02:00
Milo Davis
e440dfea18 Michelson: adds key_hash type 2017-09-22 15:17:45 +02:00
Milo Davis
a2d54d2d1c Michelson: improvements to bash test procedures 2017-09-22 11:44:19 +02:00
Benjamin Canou
8b4c94de67 Michelson: add tests and doc for SET_CADDAADR and MAP_CADDAADR 2017-09-21 15:55:39 +02:00
Milo Davis
abee4a8e52 Michelson: tests for new parser and macro expander 2017-09-21 15:55:39 +02:00
Benjamin Canou
f50a37e6f4 Michelson: new parser and macro expander. 2017-09-21 15:55:39 +02:00
Milo Davis
f2f4682606 Contracts: makes origination balance check inclusive 2017-08-29 13:09:43 +00:00
Grégoire Henry
d6348c009a Scripts/Test: more shared scripts...
- introduced `test/utils/test_lib.inc.sh` to simplify usage of
  sandboxed node/client in the testsuite

- it reuses code from `./script/{node,client}_lib.inc.sh`

- use `wait_for_the_node_to_be_ready` to properly wait for the node to
  be launched rather to use a fexed delay

- `test_multinode.sh` now launch 8 nodes.
2017-08-29 14:10:40 +02:00
Milo Davis
bbf9df021b Fix bug in launch node script 2017-08-24 21:07:58 +02:00
Milo Davis
62a10de372 Michelson: adds SIZE for sets and maps 2017-08-24 16:02:23 +02:00
Milo Davis
13c147016f Adds test for default account creation/deletion 2017-08-24 16:00:28 +02:00
Grégoire Henry
2c8b46a835 Utils: fix Utils.take_n in presence of duplicates 2017-08-22 22:07:29 +02:00
Milo Davis
804c3a4886 Michelson: Enforces ordering on data 2017-08-18 18:20:13 +02:00
Milo Davis
fe871e9ecd Michelson: Fixes reversed list bug 2017-08-18 18:14:17 +02:00
Grégoire Henry
a01f786de4 Update to irmin.1.3 2017-08-16 11:12:51 +02:00
Milo Davis
762e36abab Adds sandbox launching script 2017-08-11 13:01:46 +00:00
Milo Davis
299ebe3865 Testing: Tests multiple nodes 2017-08-11 13:01:46 +00:00
Milo Davis
866b316993 Michelson: adds tests for DEFAULT_ACCOUNT 2017-08-08 16:07:47 +00:00
OCamlPro-Iguernlala
fbacfff9e6 P2p: use incremental encoding/decoding 2017-08-08 11:22:05 +02:00
Grégoire Henry
974d4ddd9e Fix .dockerignore 2017-08-04 18:32:11 +02:00
Milo Davis
69736ec55b Michelson: updates test suite to use int and nat 2017-07-27 18:24:08 +02:00
Milo Davis
7bfaf2fe9b Michelson: removes amount from calling convention 2017-07-25 11:18:43 +02:00
Milo Davis
a663e43f18 Michelson: Add a test suite 2017-07-24 20:29:12 +02:00
Milo Davis
77433a5f15 Michelson: show type_map for programs with type errors 2017-07-22 00:14:40 +02:00
Milo Davis
18765aa8ad Michelson: adds DEFAULT_ACCOUNT test case 2017-07-21 10:46:07 +02:00
Milo Davis
b52d4a78d9 Michelson: adds -amount flag to run program 2017-07-19 18:13:03 +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
8d5155cf32 Proto: return the maximum TTL for operations 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
d06fcebd1f Proto/Alpha: minor renaming 2017-06-12 11:05:48 +02:00