Milo Davis
fbeff067c3
lib_RPC: bonary -> binary
2018-01-21 16:27:16 +00:00
Milo Davis
6e56b7b5e7
Client: Typo in michelson error reporting
2018-01-19 13:59:09 +01:00
Milo Davis
4433395c6e
Proto/Env: export the Option
module
2018-01-19 13:59:04 +01:00
Milo Davis
b8063b40fe
Storage: add omitted case to storage_error_encoding
2018-01-19 13:59:01 +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
Pietro
d9405292a4
Move all packages to src/
...
Modify Makefile accordingly
2018-01-16 23:11:39 +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
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
78d838059f
Jbuilder: move protocol-compiler
in its own OPAM package
2017-12-04 16:05:54 +01:00
Grégoire Henry
e24b1dda75
Jbuilder: move protocol_environment_sigs
in its own OPAM package
2017-12-04 16:05:54 +01:00
Grégoire Henry
92d166175f
Jbuilder: move Micheline in its own OPAM package
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
5b50279851
Import new version of vendors/ocplib-resto
...
The new version of ocplib-resto :
- uses jbuilder ;
- is functorized over `Json_encoding` rather than `Json_repr` ;
- handles query parameters ;
- handles HTTP methods (GET, POST, DELETE, PUT, PATCH) ;
- replaces `custom_service` by a more generic trailer argument ;
- replaces generic answer `(code, body)` by a more ad-hoc sum type
(allowing distinct encoding for success and error) ;
- includes a minimal HTTP-server based on Cohttp
(includings CORS and media type negotiation).
- adds a function `Directory.transparent_lookup` to lookup/call
a service handler without serializing the various parameters
(path, query, request body).
As a first consequences in Tezos, this patch allows binary
communication between the client and the node.
This patch tries to be minimal inside the tezos source code and
therefore it introduces a minimal compatibility layer in
`RPC.ml`. This code should be removed as soon as possible.
2017-12-04 15:51:59 +01:00
Pierre Chambart
6c679d2e2c
Michelson: compute depth for type size check
...
This allows to ensure that the depth to look at is updated when
michelson is.
2017-12-02 23:02:50 +00:00
Pierre Chambart
fedeb6c8fd
Michelson: enforce a maximum stack item type size
2017-12-02 23:02:50 +00:00
Milo Davis
b4495568cb
Fixes OSX select exception
...
This patch is primarily authored by @chambart
2017-11-30 14:50:36 +01:00
Benjamin Canou
97d983285e
Node: allow identity.json to stay when clearing the data-dir
2017-11-28 17:28:56 +01:00
Benjamin Canou
e91f5bc588
Node: Cleanup a few error messages.
2017-11-28 15:43:58 +01:00
Benjamin Canou
606c6e55e4
Node: update shutdown order to prevent some leveldb read errors.
2017-11-28 15:43:47 +01:00
Pietro Abate
6e68fb425a
Fix #66 and #59
2017-11-27 17:26:36 +01:00
Grégoire Henry
8f30934220
Validator: always log invalid block
2017-11-27 10:40:43 +00:00
Grégoire Henry
471006b2dd
Validator: properly handle termination of Block_validator.
2017-11-27 10:40:43 +00:00
Grégoire Henry
10d1b08c85
Validator: do not try to validate twice an invalid block
2017-11-27 10:40:42 +00:00
Milo Davis
7bed296525
Client: stuck node debug command
2017-11-27 10:40:42 +00:00
Benjamin Canou
61f7a95102
RPCs: fix encoding of list_invalid RPC
2017-11-27 10:40:41 +00:00
Milo Davis
9f45ae9126
Node: listing of invalid blocks
2017-11-27 10:40:41 +00:00
Milo Davis
42e29c8f4a
Node: allow invalid block errors to be stored
2017-11-27 10:40:40 +00:00
Milo Davis
059e4cac79
Fix spelling mistake
2017-11-27 10:40:39 +00:00
Grégoire Henry
c6b4a83e2b
Reset the chain.
2017-11-26 22:49:20 +00:00
Grégoire Henry
667d4fd575
Alphanet: never more than 5 faucet operations per block
2017-11-26 22:49:20 +00:00
Grégoire Henry
a648c34f0a
Alphanet: let the number of rolls never reach 100000.
...
This is a hack! This is a possible mitigation for the 'faucet war'.
2017-11-26 22:49:19 +00:00
Grégoire Henry
7bd5ef32d9
Alpha: better spreading of roll storage
...
This greatly reduces the time spent reading roll, while it only
slightly increase the time spent while 'freezing' rolls at the end of
a cycle.
2017-11-26 22:49:18 +00:00
Grégoire Henry
485d8bc26a
Context: quick-and-dirty leveldb backend for Irmin
...
This is a dirty and non-optimized backend, it is still faster than the
current git backend.
Main drawbacks:
- the leveldb binding is non-coopertive, the node will
block while committing a block to the disk ;
- the leveldb use 'string' while internally we use 'cstruct',
this implies a lot of time-consuming 'memcpy'.
2017-11-26 22:49:17 +00:00
Grégoire Henry
3fcc6df975
Alpha: use recursive removal when possible
2017-11-26 22:49:16 +00:00
Benjamin Canou
450d0dba4e
Client: remove trace of the web client.
2017-11-26 23:32:04 +01:00
Pietro Abate
b4573fb323
Client: duplicates results in list versions
.
2017-11-26 23:31:58 +01:00
Pietro Abate
4c30016af3
Client: add -protocol to the client command line.
2017-11-26 23:30:38 +01:00
Milo Davis
f2c27c78ab
Fixes Github issue #141 (no implementation of EndianBigstring)
2017-11-22 16:07:05 +00:00
Grégoire Henry
f9e6831363
Shell: enforce maximum operation size
2017-11-20 05:03:00 +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
3c06879deb
Shell: add Error_monad.{iter2_p,iteri2_p}
2017-11-20 04:57:09 +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
42681dfea5
Jbuilder: better error reporting
2017-11-20 01:21:54 +01:00
Benjamin Canou
ac62538eb6
Alpha: remove some fixme and assert false
2017-11-17 15:54:36 +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
b6b59be5fd
Jbuilder: minor improvement in error reporting.
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
49b7db258d
Move Persist
from the shell to the protocol.
...
It is not used anymore in the shell.
2017-11-17 15:54:36 +01:00
Benjamin Canou
1d357587d0
Node: register error Validator.Inactive_network
2017-11-17 14:13:55 +01:00
Grégoire Henry
659d1aa63a
Shell: remove unrequired net_id
from network messages
2017-11-17 14:13:55 +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
4d2bc49960
Shell: memorize the current list of live blocks and operations
2017-11-17 14:13:55 +01:00
Grégoire Henry
1d71ea5718
Fix docstring attachment
2017-11-17 14:13:55 +01:00
Grégoire Henry
6a00c55c4e
Shell: add docstrings for the validator.
2017-11-17 14:13:55 +01:00
Grégoire Henry
119f724e64
Mempool: also broadcast 'branch_{delayed,refused}' operations
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
1163c19213
Shell: add configuration variable for various timeouts.
2017-11-17 14:13:55 +01:00
Grégoire Henry
910b43726b
Shell: add CLI options for bootstrap_threshold
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
529795efd7
Reset the chain
2017-11-17 02:51:39 +01:00
Grégoire Henry
72c414aaeb
P2p: fix bound checks
...
Credit to `tomjack` on freenode.
2017-11-17 01:58:41 +01:00
Pietro Abate
472f1d53d1
Some docstrings in src/proto/alpha
2017-11-15 13:14:37 +01:00
Pietro Abate
3e1c4008c3
Add docstrings in src/environment/v1/
2017-11-15 13:14:16 +01:00
Grégoire Henry
1429a6c8e6
Almost too late for copyright update.
2017-11-15 13:13:16 +01:00
Grégoire Henry
b810b360ea
Add missing copyright headers.
2017-11-15 13:11:11 +01:00
Benjamin Canou
94295fa281
Micheline: resilient parser for better error reporting
2017-11-15 11:57:37 +00:00
Pietro Abate
102ba49149
Proto: Rename Public_key to Delegates_pubkey
2017-11-14 16:56:15 +01:00
Pietro Abate
de8967540f
Proto: store the public key of the manager in the contract
2017-11-14 16:56:15 +01:00
jevonearth
e37974c64f
Spelling and consistency fixes
...
From doing a quick grep, the rest of the code-base tends to hyphenate
the term 'hard-coded'.
2017-11-14 00:22:19 +01:00
jevonearth
e9d1dbcce1
Spelling fixes and grammar improvements
2017-11-14 00:22:19 +01:00
jevonearth
f4937fd8ef
Change data dir error messages to use present tense
2017-11-14 00:22:19 +01:00
Grégoire Henry
44364295ee
Jbuilder: use --dev
for running test and other minor improvments
2017-11-14 00:12:40 +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
Benjamin Canou
6a38f76956
Reset the chain.
2017-11-13 22:18:17 +01:00
Benjamin Canou
42734ee4a2
Node: Make sure fatal errors are properly printed
2017-11-13 22:18:16 +01:00
Benjamin Canou
602a10651c
Prevalidator: log_debug canceled operation fetches
2017-11-13 22:18:16 +01:00
Benjamin Canou
d5a2bd9604
Distributed_db: register new internal errors
2017-11-13 22:17:56 +01:00
Grégoire Henry
6cb428c1a2
Utils/Data_encoding: add missing case in merge_objs
.
2017-11-13 11:04:17 +00:00
Grégoire Henry
5beb62c83e
P2p: more debug in P2p_connection
.
2017-11-13 11:04:17 +00:00
Grégoire Henry
d866b1bfa5
Distributed_db: add primitive for sending 'message'.
2017-11-13 11:04:17 +00:00
Grégoire Henry
e98e175c21
Lwt_pipe: do not force the size function to count bytes.
...
For now, we were always bounding a queue size by the total amount of
allocated bytes. We might want to use ather kind of bounds (e.g. the
total number of elements).
2017-11-13 11:04:16 +00:00
Grégoire Henry
2d08ba778f
Utils: fix Lwt_utils.with_timeout
...
The function will never fail with `Timeout`, if the concurrent
computation terminates at the same "time".
2017-11-13 11:04:16 +00:00
Grégoire Henry
f0acd2e4da
Utils: introduce Lwt_dropbox
.
...
This is a blocking "dropbox" containing a single element. Writing in
the dropbox is a non-blocking operation, that might overwrite the
current element. Reading in the dropbox is blocking while the
'dropbox' is empty.
2017-11-13 11:04:16 +00:00
Grégoire Henry
f63c5acbf5
Distributed_db: inline the header when broadcasting a new block.
...
This adds a small size overhead in the network message, but in most
cases it will avoid a subsequent 'fetch' of the header.
2017-11-13 11:04:15 +00:00
Grégoire Henry
06873da197
Distributed_db: add an argument timeout
to 'prefetch`.
2017-11-13 11:04:15 +00:00
Grégoire Henry
e5c931c6a3
Shell: rename Distributed_db.state
-> net_state
2017-11-13 11:04:14 +00:00
Grégoire Henry
16cc5b7ec8
Shell: add more timeout in the prevalidator
2017-11-13 11:04:14 +00:00
Grégoire Henry
f4c045b126
Shell: reintroduce lost call to 'git repack'.
...
When updating to 'irmin-1.3' we merged the branch too quickly and we
incidentally removed the support for 'git repack'. This induced heavy
usage of inodes.
This is still a temporary hack, while waiting for a proper backend for
irmin (e.g. based LevelDB).
2017-11-13 11:31:09 +01:00
Pietro Abate
b25f35e2b5
Rename last occurences of miner into baker
2017-11-10 13:41:52 +01:00
Grégoire Henry
ed75bc5acd
Distributed_db: handle timeout in fetch
.
2017-11-10 09:52:35 +00:00
Grégoire Henry
a8a906b1ae
Distributed_db: use the error monad for fetch
.
2017-11-10 09:52:34 +00:00
Grégoire Henry
f40c418d0f
Distributed_db: remove the last "lol-object".
2017-11-10 09:52:33 +00:00
Grégoire Henry
41c82d7481
Distributed_db: handle cancelation
of call to fetch
.
...
We properly count the number of waiters and cleanup the table when the
count drops to zero.
2017-11-10 09:52:33 +00:00
Grégoire Henry
2b4e898407
Distributed_db: use a record instead of a tuple.
2017-11-10 09:52:30 +00:00
Grégoire Henry
f3abee1fdf
Utils: add Lwt_pipe.pop_all
.
2017-11-10 09:52:29 +00:00
Grégoire Henry
1a10504959
Shell: fixme broken invariant in Distributed_db_functors.
...
The invariant of the `clear` function was not properly inforced by the
module interface. This patch remove the inappropriate invariant and
properly rename the function.
2017-11-10 09:52:29 +00:00
Milo Davis
673f70c5d0
Client Keys: Vanity keys
2017-11-09 12:57:18 +00:00
Benjamin Canou
6de9c68e81
Remove reminiscent trace of Sha256
2017-11-08 23:30:34 +00:00
Grégoire Henry
cb1e5cc396
P2p: missing Lwt_utils.protect
in the reader worker.
2017-11-08 23:30:33 +00:00
Grégoire Henry
c9fe53eb10
P2p: reduce the default value of "expected connections".
2017-11-08 23:30:33 +00:00
Grégoire Henry
6f5c51f050
Client: ignore empty files
2017-11-08 23:30:32 +00:00
Grégoire Henry
0e2a751408
P2p: better logging on read timeout.
2017-11-08 23:30:32 +00:00
Grégoire Henry
dad0793353
P2p: better logging on failing "Swap".
2017-11-08 23:30:31 +00:00
Grégoire Henry
ee2cb59731
Remove reminiscent trace of Base48
.
...
A long time ago we were using a custom Base48 encoding instead of the
standard Base58.
2017-11-08 23:30:31 +00:00
Milo Davis
f83e0fd7c0
Node: adds version to data directory
2017-11-08 17:49:19 +01:00
Milo Davis
5109db2813
Node: adds error for directory parsing failure
2017-11-08 17:41:54 +01:00
Alex Coventry
14597b8f7e
Utils: OcamlDoc for Data_encoding module.
...
This patch is coathored with @milodavis, @abate,
and @klakplok.
2017-11-08 16:42:35 +01:00
Pietro Abate
48d7ba29e8
Generate html API documentation
...
- add a new targert "make doc-html" to generate the html doc via
jbuilder
- this patch adds public_name to jbuild files for all libraries
2017-11-08 15:55:40 +01:00
Grégoire Henry
0c3a54c2f9
Distributed_db: export disconnect
2017-11-03 15:12:09 +00:00
Grégoire Henry
06e4ec4d9b
Distributed_db: proper logging
...
New category:
- node.distributed_db.p2p_reader
log all incoming message, from any peer (debug)
- node.distributed_db.scheduler.*
log the request scheduler of the given ressources (notice/debug),
where '*' might be:
- Operation_hash (individual operation)
- Block_hash (block header)
- operation_hashes (aggregated operation_hashes of a block)
- operations (aggregated operations of a block)
- Protocol_hash (protocol)
2017-11-03 15:12:08 +00:00
Grégoire Henry
616ca33498
Distributed_db: randomly selecting peer
2017-11-03 15:12:08 +00:00
Grégoire Henry
c05c739475
Distributed_db: reset next_request
delay
...
When registring a new peer as a provider for a ressource,
reset the next request delay.
2017-11-03 15:12:07 +00:00
Grégoire Henry
79ae54625d
Distributed_db: fix concurency issue
...
Some `events` might be lost in case of the timeout happens before
concomitantly. We avoid this by storing the `events` promise into the
worker state.
2017-11-03 15:12:07 +00:00
Grégoire Henry
5c03d92457
Distributed_db: fix concurency issue
...
Concurent request of the same ressource might insert multiple 'Pending
request' in the request tracking table. Resulting, only one of them
will ever be satisfied and some worker might be stuck for ever. We
avoid this be removing any cooperation between lookup and insertion in
the table.
2017-11-03 15:12:07 +00:00
Grégoire Henry
5c1f96f3a1
Shell: add the number of validation passes in the block header.
2017-11-03 15:12:06 +00:00
Grégoire Henry
f7aed9d45d
Shell: keep a reference to 'State.t' in 'State.Net.t'
2017-11-03 15:12:05 +00:00
Grégoire Henry
3909baaedc
Raw_store: document the Missing_key
error
2017-11-03 15:12:05 +00:00
Grégoire Henry
900f16228b
Distributed_db: properly reexport the error Missing_data
2017-11-03 15:12:04 +00:00
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