Commit Graph

120 Commits

Author SHA1 Message Date
Milo Davis
a8e984c1af Alpha: adds an RPC to get the storage of a contract 2017-07-24 15:04:46 +02:00
Milo Davis
733be3fa17 Michelson: adds missing instructions from language BNF 2017-07-24 14:42:52 +02:00
Benjamin Canou
4a9fee3f11 Michelson: also display types inside lambdas. 2017-07-22 23:00:49 +02:00
Benjamin Canou
d083add61f Michelson: pretty print typechecking errors when using run program 2017-07-22 00:14:40 +02:00
Milo Davis
77433a5f15 Michelson: show type_map for programs with type errors 2017-07-22 00:14:40 +02:00
Milo Davis
23c814c783 Michelson: Adds DEFAULT_ACCOUNT instruction 2017-07-21 10:45:57 +02:00
Milo Davis
b320d43259 Michelson: removes NOP instruction from surface syntax 2017-07-21 10:34:22 +02:00
Milo Davis
b52d4a78d9 Michelson: adds -amount flag to run program 2017-07-19 18:13:03 +02:00
Benjamin Canou
800f4b555d Alpha: fix contract deletion. 2017-07-19 15:39:59 +02:00
Grégoire Henry
5d33b2ce22 Revert "Alpha: add a faucet counter to prevent replay."
This reverts commit 512fde82e4.
2017-06-12 11:08:41 +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
3b7a314669 Shell/Proto: more complete "begin_construction".
The `begin_construction` function now accepts an optional argument
`proto_header`. This is to be used by a new RPC that ease forging the
shell header of a block (i.e. it will compute the fitness and, in a
near future, the hash of the resulting context).
2017-06-12 11:05:49 +02:00
Grégoire Henry
89814a3d4e Proto/Alpha: more RPCs 2017-06-12 11:05:48 +02:00
Grégoire Henry
d06fcebd1f Proto/Alpha: minor renaming 2017-06-12 11:05:48 +02:00
Grégoire Henry
4995864316 Shell: regroups basic data types in Tezos_data 2017-06-12 11:04:43 +02:00
Guillem Rieu
58587258dc Proto/Alpha: add a RPC /context/voting_period_kind 2017-06-12 09:48:02 +02:00
Benjamin Canou
afda65fef1 Alpha: fix pre-execution typechecking. 2017-06-11 21:39:55 +02:00
Grégoire Henry
3b38720fb6 Minor fix in contract deletion 2017-06-07 16:41:41 +02:00
Grégoire Henry
81b720fee0 Add: tezos-client set delegate ... 2017-06-07 16:38:59 +02:00
Benjamin Canou
e69662efa5 Alpha: consistent typechecking of contract storage initialization. 2017-06-06 19:39:46 +02:00
Benjamin Canou
90f87bec4a Alpha: update bootstrap parameters. 2017-06-01 01:53:54 +02:00
Benjamin Canou
512fde82e4 Alpha: add a faucet counter to prevent replay. 2017-05-31 16:36:12 +02:00
Grégoire Henry
9480d411a2 Proto: add an RPC that return all the 'parsed' operations of a block 2017-04-17 00:49:49 +02:00
Grégoire Henry
8a20ec8b0f Shell/Proto: export more information to the RPC handler 2017-04-17 00:49:49 +02:00
Grégoire Henry
729ca9887d Shell/Protocol: minor renaming 2017-04-17 00:49:49 +02:00
Grégoire Henry
c316dc00a8 Minor improvement in the docker image. 2017-04-14 20:54:43 +02:00
Guillem Rieu
b861d45b14 Proto/Alpha: fix proposal checking location in Amendment.record_ballot 2017-04-14 20:54:43 +02:00
Guillem Rieu
3c44f1dfba Proto/Alpha: replace Vote.set_current_proposal by init_current_proposal 2017-04-14 20:54:43 +02:00
Grégoire Henry
0f247adea6 Shell: add the protocol level in the header of block 2017-04-12 18:29:12 +02:00
Grégoire Henry
2b0df39115 Context: simplify the storage of 'test_network'.
This prepares the context to the inclusion the hash of the context in
the block header. By "looking" into the resulting context of a block,
we are now know able to determine whether:

- no testnet is currently associated to the branch;
- a testnet must be forked after the block;
- a previously forked testnet is running.
2017-04-12 12:43:34 +02:00
Grégoire Henry
495e887538 RPC: minor improvements in naming consistency 2017-04-12 12:41:35 +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
6212af55f1 Proto/Alpha: use uint16 for mining priority. 2017-04-12 12:39:08 +02:00
Grégoire Henry
a731a47d3c Proto: explicit fitness/timestamp in the signature
This remove the data fomr the context where they "duplicate" the
block header.
2017-04-12 12:39:04 +02:00
Benjamin Canou
5a21f3c159 Reengineer the PROTOCOL signature to prepare for the multi-step validator. 2017-04-10 23:30:43 +02:00
Grégoire Henry
cfb7e35914 Client: a bit of Error_monad in Hash 2017-04-10 18:31:37 +02:00
Vincent Bernardoff
329b72d1aa RPC: batch operation parsing/retrieval 2017-04-04 16:11:18 +02:00
Grégoire Henry
5449cbbfe6 Proto/Alpha: use record for mining slot. 2017-04-02 16:18:44 +02:00
Grégoire Henry
ef3180c561 Shell: Smaller Net_id. 2017-04-02 15:40:04 +02:00
Benjamin Canou
5bfe8f90f2 Alpha: document and classify more errors. 2017-03-31 17:03:02 +02:00
Benjamin Canou
62ed003957 Alpha: remove assets. 2017-03-31 17:02:52 +02:00
Benjamin Canou
2ed66ea569 Alpha: take origination burn from source and not destination. 2017-03-31 17:02:36 +02:00
Benjamin Canou
02a67a7976 Alpha: fix typo in error registration. 2017-03-31 17:02:20 +02:00
Grégoire Henry
c2bf738079 Merge branch 'merkle' 2017-03-31 16:47:32 +02:00
Vincent Bernardoff
0a48a2e14a alpha: expose to_int32 for some types 2017-03-31 16:46:55 +02:00
Grégoire Henry
245fa66140 Shell: Split the operations list out of the (minimal) block header.
The minimal header now (classically) contains the root of a Merkle tree,
wrapping a list of lists of operations. Currently, the validator only
accept a single list of operations, but the 3+pass validator will
requires at least two lists.
2017-03-31 01:19:34 +02:00
Benjamin Canou
66cb6a8567 Alpha: remove unused storage key. 2017-03-28 14:37:26 +02:00
Benjamin Canou
31bc331063 Switch to OCaml version 4.04.0. 2017-03-28 14:37:26 +02:00
Benjamin Canou
ed6e91a47d RPCs: make the result of [/blocks/X] compatible with Alpha's [/helpers/parse/block]. 2017-03-28 14:37:26 +02:00
Benjamin Canou
9872ff8b36 RPCs: make the result of [/operations/X] compatible with Alpha's [/helpers/parse/operation].
fixes #160
2017-03-28 14:37:26 +02:00
Benjamin Canou
70e31054d1 Alpha: classified public key revelation error. 2017-03-16 18:49:31 +01:00
Vincent Bernardoff
215bd0e2d2 Alpha: simplify mining/endorsement slots RPCs. 2017-03-16 18:49:31 +01:00
Benjamin Canou
7ba73a5955 Alpha: classify and document mining errors. 2017-03-10 18:33:46 +01:00
Benjamin Canou
259972a3dd Alpha: classify and document qty errors. 2017-03-10 18:33:46 +01:00
Benjamin Canou
9caef6fae4 Alpha: classify and document contract errors. 2017-03-10 18:33:46 +01:00
Vincent Bernardoff
d845dc9740 Alpha: documentation of RPC wrappers. 2017-03-10 18:33:46 +01:00
Grégoire Henry
ec12edeb91 Proto/Alpha: fix mining right timestamp 2017-03-09 14:38:38 +01:00
Benjamin Canou
1d13908152 Alphanet: dictator in the alpha protocol 2017-03-03 18:20:38 +01:00
Benjamin Canou
7187f2d879 Proto: classify and document some errors. 2017-03-03 18:20:38 +01:00
Benjamin Canou
015f3edff3 Shell-level commit messages and timestamps. 2017-03-03 18:20:38 +01:00
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
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
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