Commit Graph

119 Commits

Author SHA1 Message Date
Grégoire Henry
bed575d506 Baker: fix operation ordering... 2017-03-02 16:19:22 +01:00
Grégoire Henry
22e3aee362 Alphanet: remove the secret bootstrap keys 2017-03-02 16:18:09 +01:00
Grégoire Henry
2b938802f3 Alphanet: trivial faucet 2017-03-02 16:18:02 +01:00
Grégoire Henry
20057079c6 Client/Revelation: reduce the size of RPC requests 2017-02-26 00:24:02 +01:00
Grégoire Henry
863869eb40 Proto/Env: remove Bytes.unsafe_of_string 2017-02-25 18:18:35 +01:00
Grégoire Henry
c277b5b56d Proto: let genesis be agnostic on fitness 2017-02-25 18:14:06 +01:00
Grégoire Henry
e88e4b0848 Shell: Proto.fitness -> Context.set_fitness.
Intead of providing a `fitness` function, an economic protocol should
now call `Context.set_fitness`.

This simplify the shell's code and avoid complexity on protocol
change. Previously the fitness of a context produced by the old protocol
had to be read by the new protocol. Now, the shell read the context
without requesting the help of the economic protocol.
2017-02-25 18:14:06 +01:00
Grégoire Henry
3c035da25c Proto: unit testing for the genesis protocol
- Let the `sandbox` change the public key
- Adapt `test_basic.ml` and `test_basic.sh`
- Do not duplicate the fitness in the block header

Client:
- allow the `bootstrap` command to lookup keys in the `head` rather than
  in `genesis`.
2017-02-25 18:14:06 +01:00
Grégoire Henry
639b4c0c5c Shell: add Data_encoding.unit 2017-02-25 18:14:06 +01:00
Vincent Bernardoff
8f5f5a2106 Genesis protocol 2017-02-25 18:14:06 +01:00
Grégoire Henry
d5d5cc7c09 Proto: rename bootstrap into alpha 2017-02-25 18:14:05 +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
26ce119072 Alphanet: bootstrap accounts should always have 1/2 of the mining rights 2017-02-25 18:14:05 +01:00
Benjamin Canou
d0e9d0d584 Proto: allow decreasing baking slot durations. 2017-02-25 18:05:17 +01:00
Benjamin Canou
bc16b027c2 Proto: allow origination of two contract with the same properties.
fixes #124
2017-02-24 16:24:27 +01:00
Grégoire Henry
bda80bf613 Shell: rename gid into peer_id 2017-02-24 16:22:56 +01:00
Grégoire Henry
fc53f3b233 Switch to Base58.
Base48 was fun but... hell yeah... let's stay standard.

Public encoding of hash:

```
  Block:      "B..." (len: 51)
  Operation:  "o..." (len: 51)
  Protocol:   "P..." (len: 51)

  Ed25519:    "tz1.." (len: 36)
  Contract:   "TZ1.." (len: 36)

  NetworkdId: "id.." (len: 30)
```

Other internal prefixes (in the RPC):

```
  Hash of Michelson's expression: "expr..." (len: 54)

  Ed25519 public key: "edpk..." (len: 54)
  Ed25519 secret key: "edsk..." (len: 98)
  Ed25519 signature:  "edsig.." (len: 99)

  Hash of a random seed nonce: "nce...." (len: 53)
  Random seed:                 "rng...." (len: 53)
```
2017-02-24 15:44:21 +01:00
Benjamin Canou
8f618a0f94 Proto: remove voting proposal cleanup when there is none. 2017-02-15 15:26:39 +01:00
Cagdas Bozman
a7c8975ec6 Proto: check the 'delegatable-ity' before to remove a delegate key.
We use the `remove` function instead of `delete` to check the
delegatable-ity to avoid a storage error (`remove` does nothing if the
bucket does not exist).
2017-02-15 15:26:39 +01:00
Grégoire Henry
d475d1ac29 Proto: fix freeze_rolls_for_cycle
That's what happen when no-one review the code...
2017-02-15 15:26:39 +01:00
Pierre Chambart
90c5314c4f Proto: Initialize a nonce for the genesis block 2017-02-15 15:26:39 +01:00
Grégoire Henry
c8376198c8 Proto: refill bootstrap contracts at the end of a cycle 2017-02-15 15:26:39 +01:00
Benjamin Canou
d72746c990 Michelson (docs): fixed forward example. 2017-01-20 13:25:28 +01:00
Benjamin Canou
52ec257e1d Michelson (docs): fixed scrutable reservoir example. 2017-01-20 13:25:28 +01:00
Benjamin Canou
5e06b9c719 Michelson (docs): fixed reservoir example. 2017-01-20 13:25:28 +01:00
Benjamin Canou
c472dbdfa4 Michelson: towards better typechecking error reports. 2017-01-20 13:25:28 +01:00
Benjamin Canou
3cce0f3d1d Michelson: fix and extend macro expansion.
fixes #114
fixes #115
2017-01-20 13:25:14 +01:00
Benjamin Canou
507c46bbcb Michelson: get rid of tagged data notation. 2017-01-20 13:25:14 +01:00
Benjamin Canou
26e1adc143 Michelson: rename void into unit. 2017-01-20 13:25:14 +01:00
Benjamin Canou
98859dbf30 Michelson (docs): rewrite intro + doc fixes. 2017-01-20 13:25:09 +01:00
Benjamin Canou
6bfbb0d300 Michelson: enforce case sensitivity. 2017-01-20 13:24:46 +01:00
Benjamin Canou
8b8ce63590 Michelson: fix missing type equality.
fixes #111
2017-01-20 13:24:24 +01:00
Arthur Breitman
86039e5d88 typo left/right in language description 2016-12-25 08:39:49 -08:00
Benjamin Canou
e7c39578b4 Extract the js_of_ocaml compatible part of utils. 2016-12-01 18:27:53 +01:00
Grégoire Henry
17475aa743 Shell: switch to Blake2b (closes #87 #89)
Also drop the dependencies on Cryptokit.
2016-11-25 19:46:50 +01:00
Grégoire Henry
46cca127a6 Merge branch 'uint64_comparison_in_proof_of_work' into 'master'
Use unsigned comparison in proof of work

See merge request !114
2016-11-21 09:55:46 +01:00
Grégoire Henry
b9c3d95406 Proto: use integer comparison while checking proof-of-work. 2016-11-17 14:58:09 +01:00
Grégoire Henry
c842140f74 Shell: introduce Compare.Uint{32,64} 2016-11-17 14:58:09 +01:00
Benjamin Canou
3b071cac46 Merge branch 'work-on-script' into 'master'
Tracing interpreter and type checker

Implements:
  * a typechecker that optionally dumps the types of each instruction
  * an interpreter that drops the stack at each execution step

Incidentally:
  * adds some RPCs to pretty print the traces
  * drops floats and imperative structures from the language
  * fixes the typing of `FAIL`
2016-11-17 14:57:54 +01:00
Grégoire Henry
938ff6404b Shell: export Bytes.{get,set}_intXX to the proto 2016-11-17 02:06:50 +01:00
Benjamin Canou
8edfc84ae6 Proto: tracing interpreter, RPCs and command line. 2016-11-16 17:38:53 +01:00
Benjamin Canou
db6a68a08f Proto: RPC to run an arbitrary program on arbitrary data. 2016-11-16 17:38:53 +01:00
Benjamin Canou
6eda849ce9 Proto: drop imperative constructs and instructions from the language. 2016-11-16 17:38:53 +01:00
Benjamin Canou
1e2911dd94 Proto: tracing script translator. 2016-11-16 17:38:53 +01:00
Benjamin Canou
0f91192769 Proto: script translator code indentation cleanup. 2016-11-16 17:38:53 +01:00
Benjamin Canou
472258b1bf Proto: Fix typechecking of FAIL. 2016-11-16 17:38:53 +01:00
Benjamin Canou
f284714fba Proto: drop floats in the contract language. 2016-11-16 17:38:53 +01:00
Benjamin Canou
b4b3aece97 Dropped unnecessary script_typed_ir.mli (duplicate of .ml). 2016-11-16 17:38:53 +01:00
Grégoire Henry
d61220f4f9 Compiler: use explicit functor in Environment
Previously, the functor applications were hidden in a module generated
by `tezos-protocol-compiler`.
2016-11-16 00:53:40 +01:00
Grégoire Henry
b16a644e55 Proto: Completion of Base48-encoded public keys and contracts
This required some modifications in the Base48 module, in order not to
share the 'resolver' between distinct version of the economical protocol.
2016-11-16 00:53:40 +01:00
Grégoire Henry
9062c405ad Proto: minor fix in Storage.Key 2016-11-16 00:53:40 +01:00
Grégoire Henry
b82ad19806 Shell: Consistently use Ed25519.Public_key_hash 2016-11-16 00:53:40 +01:00
Grégoire Henry
1ce2643dc7 Shell: add Base48.decode_partial 2016-11-16 00:52:48 +01:00
Grégoire Henry
07ba685b8d Base48: encode the "data" before its "hash" 2016-11-16 00:52:48 +01:00
Grégoire Henry
cbca39d4ea Shell: proper handling of uint{8,16} in Data_encoding 2016-11-16 00:38:58 +01:00
Grégoire Henry
5cea09bcb5 Merge remote-tracking branch 'ocp/protocol-db' 2016-11-08 12:53:00 +01:00
Vincent Bernardoff
f2e581c168 rolls: improve mli 2016-11-07 15:27:06 +01:00
Vincent Bernardoff
96b55369e4 typo: froze -> freeze 2016-11-07 15:26:54 +01:00
Vincent Bernardoff
ccf6ed4a9d TEZOS_PROTOCOL: use json syntax 2016-10-25 19:03:14 +02:00
Vincent Bernardoff
488373551b add protocol store + rpcs 2016-10-25 19:03:13 +02:00
Grégoire Henry
026007e7f1 Rename "block_header" into "block". 2016-10-19 20:47:04 +02:00
Grégoire Henry
6c9cfde9be Update to the latest ocplib-resto. 2016-10-16 21:59:44 +02:00
Benjamin Canou
e0c039e244 Proto+client: add RPCs and CLI entries to typecheck / hash / sign data. 2016-09-12 14:06:23 +02:00
Benjamin Canou
7044576b3f Docs: add language documentation. 2016-09-09 18:17:31 +02:00
Benjamin Canou
c9efaa2a64 Proto: fix interpretation of tez constants. 2016-09-09 18:05:23 +02:00
Benjamin Canou
e262a334dc Proto: transfer_funds is now transfer_tokens. 2016-09-09 17:12:28 +02:00
Benjamin Canou
d2d78dc8d6 Proto: Implement new JSON structure for script expressions. 2016-09-09 17:04:55 +02:00
Benjamin Canou
e80ce1e8d5 Shell: add assoc combinator to Data_encoding. 2016-09-09 17:02:43 +02:00
Tezos
f42e9d12ac First public release 2016-09-08 19:29:33 -07:00