Commit Graph

5060 Commits

Author SHA1 Message Date
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
Grégoire Henry
3cb307eeff Merge branch 'cmdliner' into 'master'
Cmdliner

See merge request !120
2016-12-01 13:39:52 +01:00
damian
d391be687b Update tooling for new cmdliner code. 2016-12-01 12:57:22 +01:00
damian
3dcb0d8b25 Update doc to reflect new command line syntax for tezos-node. 2016-12-01 12:35:40 +01:00
damian
0c13838eca Merge remote-tracking branch 'origin/master' into cmdliner 2016-12-01 12:30:07 +01:00
Grégoire Henry
53088b06b2 Merge branch '100-improve-readme' into 'master'
doc improvements to readme

Closes #100

See merge request !121
2016-12-01 12:25:24 +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
Damian
a366132427 doc improvements to readme 2016-11-29 16:41:41 +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
c9fdaf13ec CI: push master-expurged to tezos/tezos. 2016-11-25 23:38:22 +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
ac7342a43d Makefile: clean the test/ directory 2016-11-17 15:07:53 +01:00
Grégoire Henry
b9c3d95406 Proto: use integer comparison while checking proof-of-work. 2016-11-17 14:58:09 +01:00
Grégoire Henry
c842140f74 Shell: introduce Compare.Uint{32,64} 2016-11-17 14:58:09 +01:00
Benjamin Canou
3b071cac46 Merge branch 'work-on-script' into 'master'
Tracing interpreter and type checker

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

Incidentally:
  * adds some RPCs to pretty print the traces
  * drops floats and imperative structures from the language
  * fixes the typing of `FAIL`
2016-11-17 14:57:54 +01:00
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