Commit Graph

205 Commits

Author SHA1 Message Date
Grégoire Henry
ea500256f0 P2p: tentative fix for #98 2018-01-27 15:30:09 +01:00
Grégoire Henry
6e629584ff Jbuilder: fix rule runtest_indent 2018-01-27 11:32:57 +01:00
Milo Davis
311f10aa83 Test: adds environment variable to disable contract typechecking 2018-01-22 16:23:22 +01:00
Milo Davis
13c506ab16 Test: remove duplicate typechecking of contracts 2018-01-19 13:59:07 +01:00
Grégoire Henry
525b09259f Fix d9405292a4 2018-01-18 16:08:20 +01:00
Vincent Bernardoff
e6f773f697 Base58: encode secret keys as seed 2018-01-18 10:45:47 +01:00
Grégoire Henry
009d562e08 Shell: add context in block header 2018-01-15 18:32:00 +01:00
Grégoire Henry
270dc3e9e8 Context: remove the default message
If we want to includes hash of the context in the block header, we
cannot have a (default) commit message that includes the block hash.
We break this circular dependency by removing the default commit
message.
2018-01-15 18:29:22 +01:00
Grégoire Henry
881186c58f Client/Genesis: let's use 'preapply'.
This will be mandatory once the context hash is stored in block
header.
2018-01-15 18:29:22 +01:00
Pierre Chambart
46d7830af4 Shell: Memoize locator computations 2018-01-15 18:18:42 +01:00
Grégoire Henry
9405b702e9 OPAM: use the hex package
It replaces our own `Hex_encode` module.
2018-01-15 15:05:07 +01:00
Milo Davis
0c9592bca7 Michelson: SELF instruction implemented 2018-01-15 13:43:42 +00:00
Milo Davis
f1132b8044 Michelson: Collection literals are now sequences 2018-01-09 19:59:02 +01:00
Milo Davis
a7617f527d Michelson: Contract creation from literal 2017-12-21 11:15:43 +01:00
Benjamin Canou
2e859f14a3 Michelson: add regression test for hash consistency 2017-12-18 11:48:50 +01:00
Benjamin Canou
ac93872b2c Alpha: allow no commas in tez litterals 2017-12-14 18:48:52 +01:00
Milo Davis
319585dd80 Michelson: preliminary gas infrastructure
Costs are yet to be tweaked.

This patch is joint work between:
  Milo Davis <davis.mil@husky.neu.edu>
  Benjamin Canou <benjamin@canou.fr>
  Pierre Chambart <pierre.chambart@ocamlpro.com>
2017-12-14 18:11:26 +01:00
Milo Davis
82dcd5c179 Data_encoding: optimize binary serialization 2017-12-14 18:10:50 +01:00
Milo Davis
b2918c1387 Data_encoding: Adds ranged_int and ranged_float 2017-12-14 18:10:50 +01:00
Milo Davis
dc7a023e22 Data_encoding: Make tags on unions mandatory 2017-12-14 18:10:50 +01:00
Grégoire Henry
3c38458843 RPC: simplify the signature of Client_rpcs.ctxt 2017-12-11 17:53:54 +00:00
Grégoire Henry
4aa1b14ba6 RPC: introduce Resto_cohttp.Client and RPC_clients. 2017-12-11 17:53:49 +00:00
Benjamin Canou
6df701def2 Tests: add tests for tez constants parsing 2017-12-08 11:08:13 +00:00
Benjamin Canou
bf276fb017 Michelson: make parsing tests compile again 2017-12-08 11:08:13 +00:00
Pietro Abate
174ea10d6d Alpha: Add 4 more decimals to tez representation.
Now a tez cent is 10_000L. All constants are now in the
Constants_repr module and expressed as multiples of one_cent.

Add new function Qty_repr.mul_exn to multiply `tez` by `int`
  eg. `10 tez = Tez_repr.(mul_exn one 10)`
      `10 cents = Tez_repr.(mul_exn one_cents 10)`

Remove `Tez.{to,of}_cents` and replace them with `Tez.{to,of}_mutez`.
2017-12-08 11:08:12 +00:00
Grégoire Henry
de5935228f Opam: remove tezos-deps.opam
All dependencies are now inlined in the various opam packages.
2017-12-08 02:50:03 +01:00
Grégoire Henry
d8d54ce321 Jbuilder: install tezos-sandboxed-node.sh/tezos-init-sandboxed-client.sh 2017-12-08 02:50:03 +01:00
Grégoire Henry
7807f7aa4d Context: switch to blake2B
Get rid of the old SHA1 that was used by git...
2017-12-05 15:34:07 +00:00
Milo Davis
76e70a2799 Michelson macros: annotations permitted and better error handling 2017-12-05 12:08:54 +01:00
Milo Davis
ae2959b91c Client library refactor 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
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
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
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
84a2f1ee29 Shell: enforce the maximum number of operation per block 2017-11-20 05:03:00 +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
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
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
Grégoire Henry
178d839ee1 Shell: remove net_id from the block header. 2017-11-17 14:13:55 +01:00
Grégoire Henry
b7deebaf42 Shell: Remove net_id from the operation header.
The `branch` of the operation contains enough information to induce
the `net_id`, and the code of the validator/prevalidator is now mature
enough to efficiently determine the `net_id` of an incoming operation.
2017-11-17 14:13:55 +01:00
Grégoire Henry
3e39f82bee Shell/baker: inline full operation contents in RPC. 2017-11-17 14:13:55 +01:00
Grégoire Henry
f3555488c7 Shell: use one 'validation worker' per peer.
The single validation module is split in multiple (simpler)
modules. In the process, we introduce one "validation worker" per
peer. This worker handle all the `New_head` and `New_branch`
advertised by a given peer. For so, it sends "fetching request" and
"validation request" to respectively the `Distributed_db` and and the
`Block_validator`. These two global workers are responsible of the
'fair' allocation of network and CPU ressources amongst the connected
'peers'.
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
1429a6c8e6 Almost too late for copyright update. 2017-11-15 13:13:16 +01:00
Pietro Abate
de8967540f Proto: store the public key of the manager in the contract 2017-11-14 16:56:15 +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