Commit Graph

16 Commits

Author SHA1 Message Date
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
84a2f1ee29 Shell: enforce the maximum number of operation per block 2017-11-20 05:03:00 +01:00
Grégoire Henry
13dd470d06 More renaming: 'mine' -> 'bake' 2017-11-20 04:27:27 +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
1429a6c8e6 Almost too late for copyright update. 2017-11-15 13:13:16 +01:00
Arthur Breitman
1bdae93ffd Mining -> Baking 2017-11-01 08:42:37 -07:00
Grégoire Henry
c5d15d3640 Test/Alpha: allows distinct port for distinct test. 2017-10-31 20:33:53 +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
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
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
Benjamin Canou
90f87bec4a Alpha: update bootstrap parameters. 2017-06-01 01:53:54 +02:00
Grégoire Henry
f805507702 Shell: move level in th shell part of block. 2017-04-12 12:41:32 +02:00
Grégoire Henry
e276b0566e Alpha: minor changes in unit tests 2017-04-12 12:39:08 +02:00
Cagdas Bozman
c1e2d8eb25 Proto/Alpha: fix endorsement test 2017-04-10 18:31:37 +02:00
Cagdas Bozman
54027a701b Proto/Alpha: some unit tests for 'endorsement' 2017-04-10 18:31:37 +02:00