Grégoire Henry
54a21fdb46
Shell: properly reexport P2p_types.Peer_id
.
2017-11-03 15:12:04 +00:00
Grégoire Henry
d4ac1389e3
Shell: add comparison operators to Tezos_data
2017-11-03 15:12:04 +00:00
Grégoire Henry
a7a4564670
Node: add an explicit type for Block_locator.t
2017-11-03 15:12:03 +00:00
Grégoire Henry
201b851f69
Node: store the mempool in State
.
...
This simplifies the interaction between the `validator` and the
`distributed_db` by removing some "callbacks".
2017-11-03 15:12:03 +00:00
Grégoire Henry
57109435d5
Node/Validator: minor renaming
2017-11-03 15:12:02 +00:00
Grégoire Henry
22fd758239
Node/Validator: minor renaming
2017-11-03 15:12:01 +00:00
Milo Davis
79cdb9d023
CLI: No print source flag for large programs
2017-11-03 15:51:11 +01:00
Benjamin Canou
54dd73e28b
Michelson: Update the documentation
2017-11-03 15:51:11 +01:00
Benjamin Canou
cdfd7ddcad
Michelson: Propagate more annotations
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
Benjamin Canou
b22f02868f
Michelson: Switch parser/printer/representation to Micheline
2017-11-03 15:51:11 +01:00
Benjamin Canou
e18802b32e
Introducing Micheline, the IR of Michelson
2017-11-03 15:39:04 +01:00
Milo Davis
a63ab3b77b
Client: makes contracts non-spendable by default
2017-11-03 12:49:29 +00:00
Milo Davis
466831c179
CLI: Autocomplete
2017-11-03 10:59:02 +01:00
Milo Davis
7d20da9a7b
CLI: Show existing alias in error message
2017-11-01 21:02:36 +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
Arthur Breitman
4fb3874fea
mining -> baking
2017-11-01 04:07:33 -07:00
Grégoire Henry
108fe7799f
Jbuilder: Wrap Tezos_protocol_environment_sigs
2017-10-31 20:33:57 +00:00
Grégoire Henry
05da5a73b8
Jbuilder: Wrap the Tezos_protocol_compiler
2017-10-31 20:33:57 +00: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
Milo Davis
47d77acfd7
Rename client_alpha.cmx
into client_embedded_alpha.cmx
2017-10-31 20:33:52 +00:00
Grégoire Henry
c40d6f0a55
Rename tezos_protocol_sigs_packer
2017-10-31 20:33:52 +00:00
Grégoire Henry
9c90e2e514
Merge node_compiler_main.ml
into node_main.ml
2017-10-31 20:33:51 +00:00
Grégoire Henry
3d21245959
Rename tezos_compiler.ml
2017-10-31 20:33:51 +00:00
Grégoire Henry
dc5c4910cf
Rename tezos_compiler_embedded_cmis.ml
2017-10-31 20:33:50 +00:00
Grégoire Henry
2e477ebb26
Rename tezos_protocol_registerer.ml
2017-10-31 20:33:50 +00:00
Grégoire Henry
0afb67dd10
Remove tezos_protocol_packer
2017-10-31 20:33:50 +00:00
Milo Davis
1cb48bbb3a
Rename store_sigs.mli
into store_sigs.ml
2017-10-31 20:33:49 +00:00
Milo Davis
9a056eef23
Improved error message
2017-10-31 20:33:49 +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
ceeb3f7eac
Remove dead code
2017-10-31 20:33:46 +00:00
Grégoire Henry
dc2cd4db1c
Utils: add Data_encoding.delayed
...
This allows a better representation for `Error_monad.error_encoding`,
capturing the side-effect of new error registration.
2017-10-31 20:33:45 +00:00
Grégoire Henry
79f2dca33a
Shell: fix possible stack overflow in validation.
...
Ouch! That was a subtle Lwt misuse.
With the current (very-old) validator code, when the validation of
block is waiting to the validation of its predecessor, a "pending" Lwt
thread is created. The validation of the predecessor might also wait
on its own predecessor, potentially creating a very long chain of
pending validation"... If in the process one of the block is tagged
invalid, all the pending "successors" in the chain are 'wakeuped'
immediatly and in sequence, potentially blowing the stack in the
process.
A quick fix is to add an `Lwt_unix.yield` to break the recursion.
A better fix is to not create such long chain of "pending" validations.
See merge request !59 .
2017-10-31 17:59:14 +01:00
Milo Davis
93b1f69418
Michelson: Timestamp operations
2017-10-20 08:30:54 +00:00
Benjamin Canou
1344e69934
Michelson: Add documentation for SIZE on lists
2017-10-20 10:08:28 +02:00
Fabrice Le Fessant
26c9047349
Michelson: Implement SIZE on lists
2017-10-20 10:08:03 +02:00
Milo Davis
ecd861ca70
Michelson: Add typechecking context
2017-10-11 17:48:40 +02: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
dc74acba56
Validator: better error message for operations that exceed max size
2017-10-10 14:03:44 +02:00
Milo Davis
b5e53191e2
CLI: New argument parsing and help messages
2017-10-04 15:27:56 +02:00
Milo Davis
5028c8a845
Build: fix dependencies to synchronize irmin and irmin-unix
2017-09-28 11:31:28 +02:00
Grégoire Henry
c2fd13f3ab
Reset the chain
2017-09-22 19:11:21 +02:00
Grégoire Henry
76bf007660
Shell/Irmin: tag the commit of the head as the "git branch"
2017-09-22 19:07:54 +02:00
Grégoire Henry
1384253447
Proto: cleanup nonces once the seed is computed
2017-09-22 19:07:54 +02:00
Grégoire Henry
8da6c1cbf4
Client/Nonce: also reveal the last block of cycle.
...
Fix small delay in nonce revelations when the current head is the last
block of a cycle.
2017-09-22 17:36:43 +02:00
Grégoire Henry
1af2885d72
Proto: fix level_in_cycle
.
...
It was missing the initial 'hop' by `Storage.first_level`.
2017-09-22 17:35:12 +02:00
Milo Davis
e440dfea18
Michelson: adds key_hash type
2017-09-22 15:17:45 +02:00
Milo Davis
46cec6fe76
CLI: adds show identity command
2017-09-22 15:17:43 +02:00
Grégoire Henry
b49491587f
Reset the chain.
2017-09-22 11:37:57 +02:00
venator
99d8357115
Storage: store rolls in subpathes named after their first 2 bytes
2017-09-22 11:37:48 +02:00
Benjamin Canou
8b4c94de67
Michelson: add tests and doc for SET_CADDAADR and MAP_CADDAADR
2017-09-21 15:55:39 +02:00
Benjamin Canou
7512f2df0b
Michelson: update the documentation to the new syntax.
2017-09-21 15:55:39 +02:00
Milo Davis
f1c6a01a0e
Michelson: Adds macros section to docs
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
d644c32676
Removes webclient
2017-09-13 15:06:48 +02:00
Milo Davis
f184be8ddc
Logging of RPCs
2017-08-29 13:12:06 +00:00
Milo Davis
f2f4682606
Contracts: makes origination balance check inclusive
2017-08-29 13:09:43 +00:00
Grégoire Henry
d2ad611c3d
Node/Sandbox: allow 'private' address
...
Allows any kind of 'private' listening address (as defined by IANA)
rather than only allowing `[::1]`.
Also document the error.
2017-08-28 21:25:19 +02:00
Milo Davis
5bf5f09fbc
Emacs: vertical stack printing and suggestions
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
Grégoire Henry
2c8b46a835
Utils: fix Utils.take_n
in presence of duplicates
2017-08-22 22:07:29 +02:00
Zhenya Roubinchtein
662cc6a8ee
Michelson: small documentation fix-up.
2017-08-22 20:40:26 +02:00
Alex Coventry
04ce0c1f5d
Utils: various doc improvements
2017-08-22 20:39:59 +02:00
Alex Coventry
59b5b2df49
Utils: fix list_rev
complexity.
...
Using fold_left here iterates over the entire list, whereas you only
need to iterate over the first `n` elements.
2017-08-22 20:22:27 +02:00
Grégoire Henry
4c7d4a8348
P2p: comment out dead code
2017-08-22 14:56:15 +02:00
Grégoire Henry
90f9ab4200
Makefile: fix node.top
2017-08-19 12:45:09 +02:00
Grégoire Henry
777ff19dcd
Michelson: remove a spurious rule
...
This should have been removed when floats were removed from the
language.
2017-08-19 12:13:13 +02:00
Bayle Shanks
1436286fd6
doc typo set::MEM (again)
...
This pull request is identical to recently closed #19 , but applied to the current head. I think #19 may have been closed erroneously. If MEM takes as an input a set of elements of type 'elt, then if it also takes another input which is an element to test for membership, clearly that other input must be of type 'elt.
If #19 was not closed erroneously, then please explain, and i will stop reopening this issue.
2017-08-19 10:55:09 +02:00
Milo Davis
8d852993ff
Michelson: Add LAMBDA to the language spec
2017-08-18 19:09:46 +00: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
Benjamin Canou
7c586aaf25
Reset the chain (on-disk storage updated)
2017-08-17 14:54:34 +02:00
Grégoire Henry
a01f786de4
Update to irmin.1.3
2017-08-16 11:12:51 +02:00
Grégoire Henry
571e87dacb
Update to mtime.1.0
2017-08-16 10:53:43 +02:00
Grégoire Henry
b8ccfeb0cf
Makefile: fix utop
rules
2017-08-16 10:52:36 +02:00
Benjamin Canou
9ae9f3f4b7
Node: fix misplaced logging message
2017-08-11 15:24:38 +02:00
Milo Davis
299ebe3865
Testing: Tests multiple nodes
2017-08-11 13:01:46 +00:00
Milo Davis
4c31d084e1
Improves error messages and defaults for transfer -arg
2017-08-10 09:03:28 +00:00
Grégoire Henry
30b2cd3e0e
Update protocol version
2017-08-08 16:49:56 +02:00
OCamlPro-Iguernlala
fbacfff9e6
P2p: use incremental encoding/decoding
2017-08-08 11:22:05 +02:00
Grégoire Henry
32fa712e13
Prevalidation: minor bugfix.
2017-08-07 08:29:52 +02:00
Benjamin Canou
31a2728909
Michelson: fix typo in runtime error message
2017-07-28 15:05:23 +02:00
Milo Davis
98c96be749
Michelson: updates spec to use int
and nat
2017-07-27 18:24:08 +02:00
Fabrice Le Fessant
ed04fc3d01
Michelson: add the .mli of the typechecker
2017-07-26 15:19:05 +02:00
Fabrice Le Fessant
4dd1ef9988
Michelson: replace all numbers with only int
and nat
2017-07-26 15:19:05 +02:00
Milo Davis
efdf8c74eb
Michelson: better propagation and printing of errors to the client
2017-07-26 14:08:49 +02:00
Justin Carter
df2d6713b5
Alpha: fix spelling of substraction
2017-07-25 17:46:36 +02:00
Justin Carter
8ba1130ee3
Client: derive the public key from the secret key when adding to wallet
...
That way we do not need to require the public key be added before hand
making the workflow nicer.
2017-07-25 17:46:25 +02:00
Wyatt Sullivan
cca69e409d
Node: fix typo in config variable name
2017-07-25 17:46:05 +02:00
Wyatt Sullivan
9b2d0882b1
Node: fix typos in help pages
2017-07-25 17:46:05 +02:00
Milo Davis
7bfaf2fe9b
Michelson: removes amount from calling convention
2017-07-25 11:18:43 +02:00
Milo Davis
110e0206e7
Michelson: allow CREATE_CONTRACT to set the spendable flag
2017-07-24 15:57:10 +02:00
Milo Davis
98424be5be
Michelson: TRANSFER_TOKENS no longer takes a burn
2017-07-24 15:57:10 +02:00
Milo Davis
74f23b238d
Alpha: fix error message for origination amount too low.
2017-07-24 15:57:10 +02:00
Benjamin Canou
26a5338b86
Alpha: adds a command to get the storage of a contract
2017-07-24 15:57:03 +02:00
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
Milo Davis
9e1ec0c159
Doc: fixes incorrect usage example
2017-07-24 14:42:16 +02:00
Benjamin Canou
4a9fee3f11
Michelson: also display types inside lambdas.
2017-07-22 23:00:49 +02:00
Benjamin Canou
6e215b7d3b
Michelson: Quick and Dirty Emacs mode.
2017-07-22 22:54:36 +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
Benjamin Canou
4bd9a864cf
Shell: document internal distributed_db error,
2017-07-21 16:16:39 +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
329c8b185a
Shell: implements Chain.live_blocks
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
747cdb1963
Shell: export Distributed_db.*.clear
2017-06-12 11:07:37 +02:00
Grégoire Henry
90780f3374
Shell: minor renaming
...
Let's be consistent with Lwt (and ourselves).
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
565654a242
Client: minor renaming
2017-06-12 11:05:48 +02:00
Grégoire Henry
f96ecbf667
Test: inject operation and block atomically
2017-06-12 11:05:46 +02:00
Grégoire Henry
f39eca214a
Shell: remove the on-disk index of operations
...
Let's get serious. The full index of operations is not sustainable in
the production code. We now only keep the index of operations not yet
in the chain (i.e. the mempool/prevalidation). Operations from the
chain are now only accesible through a block. For instance, see the
RPC:
/blocks/<hash>/proto/operations
2017-06-12 11:04:43 +02:00
Grégoire Henry
4995864316
Shell: regroups basic data types in Tezos_data
2017-06-12 11:04:43 +02:00
Grégoire Henry
61eb67cbca
Shell: do not keep tracks of 'invalid_successors'
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
OCamlPro-Iguernlala
4ded0660d6
p2p: check values of some options in P2p.create
2017-06-12 09:39:36 +02:00
Benjamin Canou
afda65fef1
Alpha: fix pre-execution typechecking.
2017-06-11 21:39:55 +02:00
Grégoire Henry
68f9851bce
Client: add option for forcing free mining.
2017-06-07 16:41:46 +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
Vincent Bernardoff
3b3428ddad
Shell: experimental leveldb backend
2017-06-06 23:12:33 +02:00
Benjamin Canou
e69662efa5
Alpha: consistent typechecking of contract storage initialization.
2017-06-06 19:39:46 +02:00
Vincent Bernardoff
35792ccc37
RPCs: fix node crash on SSL write error
2017-06-06 18:58:03 +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
Benjamin Canou
d351bb1608
Shell: small bugfix preventing mempool cleanup.
2017-05-31 16:36:07 +02:00
Grégoire Henry
443cee2bb3
Fix compilation with lwt.3.0.0
2017-05-07 12:26:27 +02:00
arthur.breitman@gmail.com
d2a2052a2e
transfering -> transferring typo fix
2017-05-06 20:53:09 -07:00
Benjamin Canou
442f2d00a0
RPCs: fix missing CORS headers.
2017-04-19 17:27:45 +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
fb04fc1c17
Shell: lazy access to all the operations of a block
...
This prepares the node to the new on-disk storage.
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
76b9cedcef
Tests: add test for switching unanimously to 'demo' protocol
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
Alain Mebsout
8777349a19
A few fixes to make things more posix compliant in build/test scripts
2017-04-14 17:41:18 +02:00
Grégoire Henry
42a4e4ecc0
Merge branch 'stream-binary-decoding' into 'master'
...
[data_encoding] add facilities to decode a stream of Mbytes.t incrementally
See merge request !173
2017-04-14 00:08:51 +02:00
OCamlPro-Iguernlala
7d214a19f7
data_encoding: read streams of Mbytes.t, tests, remove dead code (debug functions), expose a function that checks without reading the data
2017-04-13 18:05:41 +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
1b6ecbfc81
Shell/RPC: simplify block-watcher signature
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
2480bfd216
Shell: remove dead code
2017-04-12 12:39:41 +02:00
Grégoire Henry
ab76b8fbf5
Shell/State: consistent use of pred
vs. predecessor
.
2017-04-12 12:39:41 +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
Grégoire Henry
3b5a3eb509
Client: minor fix in the daemon.
2017-04-10 23:30:43 +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
e11e9c9ac5
Shell/P2p: Split the unit tests in smaller atom.
...
And use more `Error_monad`...
2017-04-10 23:14:31 +02:00
Grégoire Henry
413bddcd96
Shell/P2p: propagate all errors to {raw_,}write_sync
.
...
Those functions are only used in the testsuite.
2017-04-10 23:08:16 +02:00
Grégoire Henry
c187a0b792
Shell/P2p: implements raw_write_sync
.
...
For testing only: it allows to send 'gardled' messages to a peer.
2017-04-10 23:08:16 +02:00
Grégoire Henry
c2a4db2d81
Shell/P2p: propagate disconnection errors through the pool
.
2017-04-10 23:08:16 +02:00
Grégoire Henry
4523a67e7d
Shell/P2p: fix connection close on read error
2017-04-10 23:08:16 +02:00
Grégoire Henry
4537c8780e
Shell: introduce Error_monad._assert
.
2017-04-10 23:08:16 +02:00
Benjamin Canou
18e2edf6f4
Client: minor client output fixes and enhancements.
2017-04-10 18:31:37 +02:00
Grégoire Henry
dbdcca7dbb
Client/Alpha: simplify Client_proto_context
2017-04-10 18:31:37 +02:00
Grégoire Henry
a6c7f355cc
Test: simplify Makefile
2017-04-10 18:31:37 +02:00
Grégoire Henry
166801fc77
Client: more Error_monad
in Cli_entries
.
2017-04-10 18:31:37 +02:00
Grégoire Henry
cfb7e35914
Client: a bit of Error_monad
in Hash
2017-04-10 18:31:37 +02:00
Grégoire Henry
f5e2f7b481
Client: more Error_monad
in Client_aliases
2017-04-10 18:31:37 +02:00
Grégoire Henry
3226565b39
Client: more Error_monad
in Client_{node,proto}_rpcs
2017-04-10 18:31:37 +02:00
Benjamin Canou
f26dfdbe8e
RPC: fix CORS preflight.
2017-04-10 18:23:24 +02:00
Vincent Bernardoff
329b72d1aa
RPC: batch operation parsing/retrieval
2017-04-04 16:11:18 +02:00
OCamlPro-Iguernlala
cb2aa6ea2b
[Data_encoding.Binary] add a function 'to_bytes_list' to encode a given data as a list of 'small' blocks
2017-04-02 16:29:19 +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
Grégoire Henry
ffc8fa0383
RPC: rebind 'complete' for blocks and operations.
2017-04-02 15:33:32 +02:00
OCamlPro-Iguernlala
a330f3bcc5
[data_encoding] use MBytes.{get/set}_char to read/write binary data instead of int8
2017-03-31 17:46:44 +02:00
Guillem Rieu
9b3cde5df9
Client: add Client_proto_context.delegate_contract function
2017-03-31 17:26: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
24b5290a74
Opam: use the libev
backend of Lwt.
2017-03-31 16:58:59 +02:00
Grégoire Henry
852ba95a3c
Client: do no pat parse the config file and Sys.argv
twice.
2017-03-31 16:49:40 +02:00
Grégoire Henry
1879c4359f
Merge remote-tracking branch 'ocp/bugfix-in-data-encoding'
2017-03-31 16:48:07 +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
Grégoire Henry
618fb64129
Client/RPC: rename wait
into async
2017-03-31 01:19:34 +02:00
Grégoire Henry
e273cfa07f
Shell/Distributed_db: allow to precheck
data.
2017-03-31 01:19:34 +02:00
Grégoire Henry
a6307c40cf
Shell: add unit tests for Merkle tree
2017-03-31 01:19:33 +02:00
Grégoire Henry
9097809589
Shell: Merkle tree of operations
2017-03-31 01:19:33 +02:00
OCamlPro-Iguernlala
669a0249ca
add some asserts in data_encoding
2017-03-29 18:33:39 +02:00
OCamlPro-Iguernlala
dc32decd05
[bugfix in data_encoding] When writing a float (to binary format), MBytes.set_double should be used instead of MBytes.set_float (Float _ encodes doubles in the encoding, not singles)
2017-03-29 18:32:46 +02:00
OCamlPro-Iguernlala
f96fbe7d31
[bugfix in data_encoding] When reading a float (from binary format), MBytes.get_double should be used instead of MBytes.get_float (Float _ encodes doubles in the encoding, not singles)
2017-03-29 18:30:15 +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
Grégoire Henry
7e1cc171cc
Shell: fix unhandled exception in io_scheduler
.
2017-03-28 14:37:15 +02:00
Benjamin Canou
c46950b903
Shell: repack the context every 10 commits.
2017-03-16 18:49:31 +01:00
Benjamin Canou
d99d8f88a1
Utils: add [Lwt_utils.Idle_waiter].
2017-03-16 18:49:31 +01:00
Benjamin Canou
70e31054d1
Alpha: classified public key revelation error.
2017-03-16 18:49:31 +01:00
Guillem Rieu
4e82e94ef4
Client: add tags to aliases (enabled for contracts).
2017-03-16 18:49:31 +01:00
Guillem Rieu
9c2564391c
Client: lift some commands into functions.
2017-03-16 18:49:31 +01:00
Guillem Rieu
83f2e0dcd3
Client: switch to JSON config file and remove config-file dependency.
2017-03-16 18:49:31 +01:00
Guillem Rieu
04ef832ad3
Client: add optional seed argument to Client_keys.gen_keys
2017-03-16 18:49:31 +01:00
Guillem Rieu
c6c81345a8
RPC: add answer functions with HTTP code argument to RPC interface.
2017-03-16 18:49:31 +01:00
Guillem Rieu
cc44053229
RPC: add HTTP methods and Content-Type headers.
2017-03-16 18:49:31 +01:00
Guillem Rieu
a2758253ea
Utils: add [merge_list2] function
2017-03-16 18:49:31 +01:00
Benjamin Canou
967075f49a
CLient: fix endorse for
command.
2017-03-16 18:49:31 +01:00
Vincent Bernardoff
8962f324d4
Client: a bit of doc.
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
Vincent Bernardoff
b48187d43b
Client: fix .merlin file.
2017-03-16 18:49:31 +01:00
Arthur Breitman
76fad5a3db
Economic = economique
...
Economical = econome
2017-03-15 08:00:53 -07:00
Grégoire Henry
826f2ea4ba
P2p: implements peer swapping
2017-03-14 11:56:42 +01:00
Grégoire Henry
cf0d6d2580
Typo
2017-03-14 11:56:42 +01:00
Benjamin Canou
b5f0021016
Shell: add RPC to list network protocol versions.
2017-03-13 19:08:08 +01:00
Grégoire Henry
16bae53015
Makefile: do not compile the (old) webclient
2017-03-13 19:08:08 +01:00
Grégoire Henry
2d828060d5
Client: do not fail when the protocol is unknown...
2017-03-13 19:08:08 +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
c2ae0b278a
OPAM: more version contraint
2017-03-10 16:27:21 +01:00
Grégoire Henry
82628a6ca2
Client: avoid unrequired monitor
2017-03-09 14:38:39 +01:00
Vincent Bernardoff
556c965af7
RPC server: use ~on_exn
2017-03-09 14:38:39 +01:00
Grégoire Henry
ab4015b189
Shell: fix (part of) the memory leak in validator
2017-03-09 14:38:39 +01:00
Grégoire Henry
ec12edeb91
Proto/Alpha: fix mining right timestamp
2017-03-09 14:38:38 +01:00
Grégoire Henry
39403e243e
Shell: avoid operation leaks
2017-03-09 14:38:38 +01:00
Benjamin Canou
3b483811f5
Client/genesis: option to set the timestamp of the activation block.
2017-03-09 14:38:38 +01:00
Grégoire Henry
ccfdaa6bd0
FunView: fix recursive removal.
2017-03-09 14:38:38 +01:00
Grégoire Henry
534dc6af9d
Shell: the genesis block should not flag the node as 'bootstraped'
2017-03-09 14:38:38 +01:00
Grégoire Henry
8453a69e0b
Shell: no duplicates in Prevalidation
2017-03-09 14:38:38 +01:00
Grégoire Henry
9dd2e4963f
Makefile: add --warn-error 8
(incomplete pattern-matching)
2017-03-07 13:12:23 +01:00
Vincent Bernardoff
63e5ea5e79
Client: Add "network stat" command.
2017-03-07 13:07:18 +01:00
Vincent Bernardoff
9e823c7dfb
typo
2017-03-07 13:04:14 +01:00
Grégoire Henry
ee870722cf
Shell: fix Utils.read_file
2017-03-03 18:20:38 +01:00
Grégoire Henry
49392afd73
Validation: fetch new protocol on demand.
2017-03-03 18:20: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
Benjamin Canou
2e96a1377e
Genesis: unused error.
2017-03-03 18:20:37 +01:00
Grégoire Henry
bed575d506
Baker: fix operation ordering...
2017-03-02 16:19:22 +01:00
Grégoire Henry
257a3972df
Shell: do not forbid to restart the node.
2017-03-02 16:19:19 +01:00
Benjamin Canou
23869991ca
Alpha: update .merlin
.
2017-03-02 16:19:12 +01:00
Grégoire Henry
b087042d83
Shell: do not split the validation scheduler...
2017-03-02 16:19:06 +01:00
Benjamin Canou
85055aace6
Shell: do not validate blocks that don't increase the timestamp or fitness.
2017-03-02 16:18:51 +01:00
Grégoire Henry
cb90e3e5c5
Lwt: temporary Hack (waiting for Pierre's expertise)
2017-03-02 16:18:44 +01:00
Grégoire Henry
3f5bd7ea5b
Client: allow the baker te re-read keys
.
...
Is a new key is added, the baker will start baking for this key.
No need to relauch the baker anymore.
2017-03-02 16:18:16 +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
768cf91cd6
Client: implements ./tezos-client bootstrapped
...
It wait for the node to be synchronized with the network. The heuristic
is currently:
- the timestamp of current head is less than 1 minute old ;
- there was a period of 30 seconds without new block discovered.
2017-03-02 16:17:58 +01:00
Grégoire Henry
de050bfee1
Shell: tezos-node identity
should read the configuration file
2017-02-27 22:29:06 +01:00
Grégoire Henry
0b27503f30
Shell: exit properly on SIGTERM
.
2017-02-27 22:28:59 +01:00
Grégoire Henry
348aec3d10
Makefile: more fixes...
...
Sigh!
2017-02-27 17:21:37 +01:00
Grégoire Henry
3edace2720
Makefile: fix various dependencies errors
2017-02-27 09:49:03 +01:00
Grégoire Henry
eb89877d58
Shell: fix propagation of error in inject_block
2017-02-26 02:03:06 +01:00
Grégoire Henry
05ed4e7557
Error_monad: allow binary serialization of error.
2017-02-26 02:02:33 +01:00
Grégoire Henry
b461b6c0c6
Shell: protection against serialisation error.
2017-02-26 01:25:47 +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
2f6863da89
Client/Endorser: do not send endorsement for old blocks
2017-02-26 00:23:54 +01:00
Grégoire Henry
0b33e5a6da
Shell/RPC: Implements `/block/<hash>/predecessors
2017-02-26 00:23:52 +01:00
Grégoire Henry
fc7e4e56a6
Client/Baker: do not monitor endorsement while baking.
2017-02-25 18:25:00 +01:00
Grégoire Henry
285427bcba
Client: minor stylistic issue.
2017-02-25 18:24:58 +01:00
Benjamin Canou
c66db98bfa
Baker: don't bake over old loafs during the bootstrap stage.
2017-02-25 18:24:33 +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
Grégoire Henry
a2f1b6c889
Client: introduce Client_blocks
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
Grégoire Henry
300dd5ea6d
Makefile: praise the return of utop
.
...
The Makefile is really hackish...
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
Grégoire Henry
09dcb59c14
Makefile: praise the return of utop
.
...
The Makefile is really hackish...
2017-02-24 18:02:24 +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
69ebe7d0cc
Shell: minor doc improvement in RPC.
2017-02-24 16:22:56 +01:00
Grégoire Henry
bda80bf613
Shell: rename gid
into peer_id
2017-02-24 16:22:56 +01:00
Vincent Bernardoff
b0ed3cefac
Shell: Add RPCs for introspecting the state of the P2P layer
2017-02-24 16:22:55 +01:00
Pierre Chambart
a23d718515
Add utils/Watcher
2017-02-24 16:20:59 +01:00
Vincent Bernardoff
70491aea8c
Utils: Moving_average: use int64 for total
2017-02-24 16:20:59 +01:00
Vincent Bernardoff
92c339f732
P2P: more types
2017-02-24 16:20:59 +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
Vincent Bernardoff
efc6d285c6
Shell: limit known points table size
...
* Gc events still need to be recorded
2017-02-16 13:23:01 +01:00
Grégoire Henry
0a3ad7de53
Client: add rpc call ... with '{json}'
2017-02-15 15:26:39 +01:00
Grégoire Henry
9a0ac6b837
Client/Baker: improve logging.
2017-02-15 15:26:39 +01:00
Benjamin Canou
f77a2544cc
Client/Baker: fix baking of the first block.
2017-02-15 15:26:39 +01:00
Grégoire Henry
34e1764bce
Client/Baker: let the baking daemon reveal nonces
2017-02-15 15:26:39 +01:00