Benjamin Canou
f7a70f355c
Node: shutdown on an RPC server error.
2017-02-15 15:26:39 +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
Grégoire Henry
55e2429758
P2p: more debug traces.
2017-02-15 15:26:39 +01:00
Grégoire Henry
48da8299a6
P2p: various small fixes.
...
* fix bad "locking" in `p2p_io_scheduler.shutdown`
* add missing exception handler in `P2p_io_scheduler`
* wake-up `P2p.recv_any` when a new connection is established
* reintroduce version negotiation
* fix typo in greylisting
2017-02-15 15:26:39 +01:00
Vincent Bernardoff
6d41b3d38c
Shell: Improve the CLI of tezos-node
...
* Use subcommands:
* `tezos_node run`
* `tezos_node config`
* `tezos_node identity`
* Regroup all on-disk data in `--data-dir`
* Split `Node_main` in multiple files.
* Add DNS resolution for `--net-addr` and `--rpc-addr`
* Hardcode `bootstrap.tezos.com` as bootstrap peer(s)
* Add `--no-bootstrap-peers`
* Rename `--expected-connections` -> `--connections`
2017-02-15 15:26:17 +01:00
Grégoire Henry
42f118f486
Publish some baker's code.
2017-01-26 13:38:25 +01:00
Vincent Bernardoff
9090559510
Node: typo
2017-01-25 00:18:11 +01:00
Grégoire Henry
ec0e7d4d48
Merge branch 'lwt_pipes_limit' into 'master'
...
Lwt_pipe: limit by content size in bytes
See merge request !137
2017-01-24 00:05:07 +01:00
Grégoire Henry
0820744619
Lwt_pipe: minor style issue
2017-01-23 23:59:16 +01:00
Grégoire Henry
854e2f0697
Merge branch 'work-on-script'.
2017-01-23 23:24:16 +01:00
Grégoire Henry
c194045f6e
Shell: Add missing CLI arguments.
...
- fix the semantics of `--base-dir` and `--sandbox`:
- `--sandbox path` becomes : `--base-dir path --sandbox`
- `--sandbox path --sandbox-param file.json` becomes `--base-dir path --sandbox=file.json`
- added `--generate-identity` for generating the node cryptographic identity and the associated stamp of proof-of-work. The amount of required work can be adjusted with `--expected-pow f` where `f` is float value such as the 256-bit stamp should be below `2^(256-f)`. For instance `--expected-pow 16` requires 16 zero-bits.
- added all the new p2p parameters: queue size, buffer size, ...
2017-01-23 22:28:44 +01:00
Grégoire Henry
b228904bc7
Node: more CLI argument
2017-01-23 22:15:36 +01:00
Grégoire Henry
2da0c83b5a
P2p: postpone the first maintenance step.
2017-01-23 22:01:35 +01:00
Grégoire Henry
5ee3581d60
P2p: fix in P2p_maintenance
2017-01-23 22:01:35 +01:00
Grégoire Henry
c87e88d84d
Shell: minor fix in RPC description
2017-01-23 22:01:35 +01:00
Grégoire Henry
197ac28f0b
Shell: Add Cryptobox.target_of_float
...
[target_of_float f] is `2 ^ (256 - f)`.
2017-01-23 21:33:01 +01:00
Grégoire Henry
3a70d88fe6
Shell: animated generation of P2p.Identity
2017-01-23 21:31:30 +01:00
Grégoire Henry
5e1eddf681
Shell: Use Error_monad in Data_encoding_ezjsonm
2017-01-23 21:31:30 +01:00
Grégoire Henry
a65ad52620
Shell: improve Lwt_utils
2017-01-23 21:31:30 +01:00
Grégoire Henry
31872eb1b1
Shell: Improve Logging
2017-01-23 21:31:30 +01:00
Grégoire Henry
866e7add2f
Shell: improve Utils
2017-01-23 21:31:30 +01:00
Vincent Bernardoff
1e4d090e2c
Lwt_pipe: limit by content size in bytes
2017-01-23 18:03:00 +01:00
Grégoire Henry
d87a6cd556
Docker: integration in CI
...
And minor fix:
- introduce configuration file for OCaml and alpine versions
- add missing `libssl1.0` in docker image
- remove the split call to `install_build_deps` (not required anymore)
- rename scripts
2017-01-23 11:28:04 +01:00
Grégoire Henry
52fab9528c
P2p: add error for invalid authentification
2017-01-23 09:18:56 +01:00
Vincent Bernardoff
ce986c4a9c
Shell: sign Ack message
2017-01-23 09:13:41 +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
3a149af667
Utils: include error id in the default error pretty printer.
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
Grégoire Henry
26ce72bc18
P2p: remove functors and rename recv
into recv_any
.
...
This allows to export the underlying `P2p_connection_pool.recv`
that will be used in the refactored distributed DB.
2017-01-19 10:26:45 +01:00
Vincent Bernardoff
e1692ed9bf
Shell: use the new P2P backend
2017-01-19 10:26:45 +01:00
Grégoire Henry
d9fc93a5c0
Shell: implement P2p_{maintenance,discovery}
.
2017-01-19 10:26:45 +01:00
Grégoire Henry
b694a62810
Shell: implement P2p_{connection_pool,welcome}
2017-01-19 10:26:45 +01:00
Grégoire Henry
6d47cb2c8f
Shell: implement P2p_connection
2017-01-19 10:21:21 +01:00
Grégoire Henry
2ed8bf2cfa
Shell: implement P2p_io_scheduler
2017-01-19 10:21:21 +01:00
Vincent Bernardoff
7f091b38b9
Shell: add Crypto_box.Public_key_hash
2017-01-19 10:21:21 +01:00
Vincent Bernardoff
0b6aa16ca7
Shell: improve logging (prepend the current time)
2017-01-19 10:21:21 +01:00
Vincent Bernardoff
5eb8d0077a
Shell: add Data_encoding.Binary.fixed_length
2017-01-19 10:21:21 +01:00
Vincent Bernardoff
22ae4dbf45
Shell: simplify the signature of Hash.Hash_table
2017-01-19 10:21:21 +01:00
Vincent Bernardoff
1f7f9b369d
Shell: improve Lwt_pipe
2017-01-19 10:21:21 +01:00
Vincent Bernardoff
6b3e002285
Shell: improve Lwt_utils
2017-01-19 10:21:21 +01:00
Vincent Bernardoff
0027d70158
Shell: improve Error_monad
2017-01-19 10:21:17 +01:00
Vincent Bernardoff
98fd45ab9f
Shell: add Ring
2017-01-19 10:21:17 +01:00
Vincent Bernardoff
ad035d7679
Shell: add Time.{Map,Set,Table}
2017-01-19 10:21:17 +01:00
Vincent Bernardoff
a891e23741
Shell: improve Utils
...
- unopt_map
- list_{sub,rev_sub}
- take_n
- Bounded
2017-01-19 10:21:17 +01:00
Grégoire Henry
df81d95614
Shell: update to lwt.2.7.0
2017-01-14 13:12:55 +01:00
Grégoire Henry
7689021810
CI: less build artifacts
2017-01-02 14:49:56 +01:00
Eitan Chatav
28b4c8e6ef
Minimal attacker node.
2017-01-02 13:33:11 +01:00
Grégoire Henry
61bea21033
Merge branch 'rpc-tls' into 'master'
...
Rpc tls
See merge request !128
2017-01-02 09:36:39 +01:00
Grégoire Henry
77ba592448
Opam: depends on ssl
.
2017-01-02 09:21:36 +01:00
Arthur Breitman
86039e5d88
typo left/right in language description
2016-12-25 08:39:49 -08:00
Benjamin Canou
63aeab5bb9
RPC: use the external TLS implementation.
2016-12-14 16:45:37 +01:00
Benjamin Canou
8360b4e407
RPC: fixes some comments.
2016-12-14 16:40:42 +01:00
Benjamin Canou
8264ec111a
Client: do not eat some error messages.
2016-12-14 16:39:42 +01:00
Vincent Bernardoff
cdb34ca7d3
RPC: TLS bugfixes
2016-12-13 01:52:55 +01:00
Vincent Bernardoff
59881cde32
RPC: Add TLS on the client
2016-12-13 00:47:23 +01:00
Vincent Bernardoff
77506ac4b5
RPC: Fix doc
2016-12-13 00:45:46 +01:00
Vincent Bernardoff
42b30f7bd2
RPC: Add TLS
2016-12-13 00:45:46 +01:00
Vincent Bernardoff
01fe34bc4b
Node: catch correct P2P exn
2016-12-09 18:18:59 +01:00
Grégoire Henry
5c428a5ea3
CI: avoids broken packages
...
Otherwise:
```
The actions to process have cyclic dependencies:
- install bos.0.1.4 -> install base64.2.1.2 -> install js_of_ocaml.2.8.3 -> install mtime.0.8.3 -> install bos.0.1.4
- install bos.0.1.4 -> install base64.2.1.2 -> install js_of_ocaml.2.8.3 -> install logs.0.6.2 -> install bos.0.1.4
```
2016-12-09 11:19:24 +01:00
Grégoire Henry
f7f5f21e46
Fix make build-deps
...
The amended script is now able to handle new dependency in the opam file.
It also abloe to handle `test` attributes.
2016-12-08 16:33:01 +01:00
Vincent Bernardoff
224e5d8c73
P2P: Add counters in peer_info
2016-12-06 14:12:18 +01:00
Vincent Bernardoff
92f78b29e4
P2P: recv: return size read
2016-12-06 14:12:18 +01:00
Vincent Bernardoff
2b27a1ffbe
P2P: Discovery: avoid unneeded connections
2016-12-06 14:12:18 +01:00
Vincent Bernardoff
c2249056d7
P2P: Do not send unauthenticated Advertise msgs
2016-12-06 14:12:18 +01:00
Vincent Bernardoff
6a1265255f
P2P: refactor for less indenting
2016-12-06 14:12:18 +01:00
damian
517893f707
RPC: Add CORS headers
2016-12-06 13:58:21 +01:00
Vincent Bernardoff
4e9c54efa9
node_main: do not override cfg file values
2016-12-06 13:54:20 +01:00
Benjamin Canou
923d061d72
Client: help generation fixes.
2016-12-05 13:18:12 +01:00
Benjamin Canou
a098d25a55
Client: add a context to command evaluation.
2016-12-03 13:05:02 +01:00
Benjamin Canou
dc64f9b6fb
Webclient: first draft.
2016-12-02 20:06:29 +01:00
Benjamin Canou
e7c39578b4
Extract the js_of_ocaml compatible part of utils.
2016-12-01 18:27:53 +01:00
Benjamin Canou
69f682357f
Add hooks to the RPC server to handle static files.
2016-12-01 15:52:31 +01:00
Guillem Rieu
5b1244648c
Client: remove compilation warnings due to Cli_entries.log returning 'unit Lwt.t'
2016-12-01 15:52:31 +01:00
Guillem Rieu
69adc115be
Client: fix typo 'litteral' -> 'literal'
2016-12-01 15:52:31 +01:00
Guillem Rieu
a48d8c0026
Client: replace (e)printfs with Cli_entries.{error,warning,message} equivalent
2016-12-01 15:52:31 +01:00
Guillem Rieu
3c2453f00d
Client: catch Failure exceptions in Client_main
2016-12-01 15:52:31 +01:00
Guillem Rieu
80e1b0f312
Client: add Cli_entries.warning to log a message on stderr without raising exception
2016-12-01 15:52:31 +01:00
Benjamin Canou
087a097cf7
Client: cli_entries module refactoring.
2016-12-01 15:52:31 +01:00
Vincent Bernardoff
1ffe2db277
P2P: Minor changes
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
bdb2d20f05
P2P: Introduce a worker dedicated to user events
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
a832c2069f
P2P: Do not log ``ordinary'' errors
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
e1d6df6e99
P2P: Do not accept unauthenticated Advertise msgs
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
5f8b74e96c
P2P: Cancel MA computations on client disconnect
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
158447416b
Shell: Count sent and received bytes in P2p
.
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
56a58cc962
Shell: use bounded Lwt_pipe
in P2p
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
dc2084d993
Shell: export P2p.gid
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
41d5bbe989
Shell: Use some Error_monad
in P2p
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
d41c05a066
Shell: minor rewording in P2p
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
16a3c88b1f
Shell: introduce Moving_average
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
26c84de550
Shell: introduce Lwt_pipe
2016-12-01 13:52:05 +01:00
Vincent Bernardoff
fdff344989
Shell: minor cosmetics in p2p.ml
2016-12-01 13:52:05 +01:00
damian
4ca4367190
Doc polish
2016-12-01 00:18:35 +01:00
Vincent Bernardoff
17b23d827e
Node_main: replace Config_file by Cmdliner
2016-11-30 23:41:18 +01:00
Vincent Bernardoff
bc7f4b48e2
RPC: launch: remove unused argument
2016-11-29 16:41:17 +01:00
Vincent Bernardoff
199bd93696
Lwt_utils: add may
2016-11-29 16:39:53 +01:00
Vincent Bernardoff
ec922f6821
Utils: add first_some
2016-11-29 14:51:36 +01:00
Grégoire Henry
62a1be15b7
Shell: still allow usage of LWT_LOG
...
Commit b869c264aa
introdude `-v level`, which should be equivalent to
setting `LWT_LOG="* -> level`, but it inadvertently drop the support for
`LWT_LOG`. This commit reintroduces support for ` LWT_LOG` which allows
to setup distinct verbosity levels to distinct part of the node :
LWT_LOG="net -> debug ; rpc -> notice"
2016-11-26 11:52:14 +01:00
Grégoire Henry
2a43eeaa7f
P2P: properly handle End_of_file
.
2016-11-26 11:49:07 +01:00
Grégoire Henry
ebcc63aefb
Shell: typo in P2P identity proof-of-work
2016-11-25 23:07:05 +01:00
Grégoire Henry
2d61ded08b
Merge branch 'crypto-box' into 'master'
...
Crypto box
Requesting code review for proof-of-work code
See merge request !115
2016-11-25 19:56:07 +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
daf3343dc1
Shell: reduce difficulty for P2P identity...
...
... until we properly store the nonce in the configuration file,
together with the expected difficulty.
2016-11-25 18:03:57 +01:00
Grégoire Henry
8d37369f27
Client: random json template : fix random integers
2016-11-22 11:18:49 +01:00
Eitan Chatav
710e3e755a
Merge branch 'master' into crypto-box
2016-11-21 12:55:13 -08: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
40a078a202
Update tezos-deps.opam
to irmin.0.12.0
2016-11-21 09:52:04 +01:00
Arthur Breitman
39ea223e5b
add comment for checksum in base48 encoding
2016-11-21 09:46:05 +01:00
Eitan Chatav
c52146cb71
debug string
2016-11-18 15:59:56 -08:00
Eitan Chatav
abb9e19260
integrate proof of work in p2p
...
* check proof of work when connecting to peers
* I’m not sure how to get the debug statement on line 418 to work, keep
getting syntax errors
2016-11-18 15:47:32 -08:00
Eitan Chatav
7cb8a42629
lower default target
...
takes about 2 minutes on my laptop
2016-11-18 14:28:01 -08:00
Eitan Chatav
aca0c380cf
Merge branch 'master' into crypto-box
2016-11-18 14:07:45 -08:00
Eitan Chatav
ffc0189f19
default target
...
takes a couple seconds on my laptop to generate a proof of work with
this target
2016-11-18 14:07:27 -08:00
Eitan Chatav
2864152e15
use 256 bit target for proof of work
...
* SHA256 produces 256 bits pseudo-randomly uniformly, so you may
compare to a 256 bit target to get a proof of work
* If you pretend that the hash and targets are both integers between 0
and 2^256 - 1, then the target partitions the range into passing and
failing segments.
* In order to match the use of the `get_uint16` function from
`ocplib-endian`, the easiest way to encode `target` is as a `int list`
which works if not ideal
* This seems like the same thing bitcoin does; difficulty there is
actually not a primary notion but is calculated from a 256 bit target,
which is what gets adjusted over time
2016-11-17 12:02:32 -08: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
Eitan Chatav
65795dba2c
Merge branch 'master' into crypto-box
2016-11-16 17:09:24 -08:00
Eitan Chatav
0edfae4621
bitmask
...
use bit mask to check proof of work
2016-11-16 17:09:01 -08:00
Grégoire Henry
938ff6404b
Shell: export Bytes.{get,set}_intXX
to the proto
2016-11-17 02:06:50 +01:00
Grégoire Henry
a55f31bc9b
Merge branch 'resolve_prefix' into 'master'
...
Implement a minimal "completion" service.
The use of Base48 encoding allows to efficiently implement a "completion" mechanism for blocks, operations, public key and contract identifiers. For instance:
```
> ./tezos-client complete eeHfgnr9QeDN
eeHfgnr9QeDNvcMgSfATNeDeec4KG4CkHHkNNJt5B9xdVmsxhsHNR
```
This command returns all the identifiers matching the given prefix. Adding the option `-unique` let the command fails when there more than one possible completion.
This completion mechanism should probably never be used implicitly, but it might still be useful to display a small completion popup in a GUI, or during manual testing on the CLI.
See merge request !101
2016-11-17 01:50:49 +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
8602e5b0a0
Client: unexpand some macros when pretty printing programs.
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
Eitan Chatav
ee5aec87ad
check proof of work
2016-11-16 17:36:14 +01:00
Eitan Chatav
0398a66423
proof of work start
2016-11-16 17:33:11 +01:00
Vincent Bernardoff
ba014261dc
P2p: bugfix
2016-11-16 17:21:56 +01:00
Vincent Bernardoff
2680bf7efb
P2p: fix logging
2016-11-16 17:16:01 +01:00
Vincent Bernardoff
f7e73a6dc5
P2p: force IPv6 in discovery
2016-11-16 17:16:01 +01:00
Grégoire Henry
3c55c72abf
Merge remote-tracking branch 'ocp/crypto-box'
2016-11-16 01:19:13 +01:00
Grégoire Henry
719b54ac1d
Client: use contextual completion
2016-11-16 00:53:40 +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