Commit Graph

63 Commits

Author SHA1 Message Date
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
a6307c40cf Shell: add unit tests for Merkle tree 2017-03-31 01:19:33 +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
Guillem Rieu
83f2e0dcd3 Client: switch to JSON config file and remove config-file dependency. 2017-03-16 18:49:31 +01:00
Grégoire Henry
826f2ea4ba P2p: implements peer swapping 2017-03-14 11:56:42 +01:00
Vincent Bernardoff
d845dc9740 Alpha: documentation of RPC wrappers. 2017-03-10 18:33:46 +01:00
Cagdas Bozman
05d210b982 Testsuite: fix error handling 2017-03-07 10:42:08 +01:00
Grégoire Henry
dbbdaa1688 Minor timing fix in the testsuite. 2017-03-03 18:20:38 +01:00
Benjamin Canou
7187f2d879 Proto: classify and document some errors. 2017-03-03 18:20:38 +01:00
Benjamin Canou
015f3edff3 Shell-level commit messages and timestamps. 2017-03-03 18:20:38 +01:00
Grégoire Henry
22e3aee362 Alphanet: remove the secret bootstrap keys 2017-03-02 16:18:09 +01:00
Grégoire Henry
801d0ca287 Unit testing: fix typo in sandbox parameters. 2017-02-26 02:03:23 +01:00
Grégoire Henry
c277b5b56d Proto: let genesis be agnostic on fitness 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
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
Benjamin Canou
d0e9d0d584 Proto: allow decreasing baking slot durations. 2017-02-25 18:05:17 +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
bda80bf613 Shell: rename gid into peer_id 2017-02-24 16:22:56 +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
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
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
b228904bc7 Node: more CLI argument 2017-01-23 22:15:36 +01:00
Grégoire Henry
5266671c72 Fix POW 2017-01-23 22:01:35 +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
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
Vincent Bernardoff
ce986c4a9c Shell: sign Ack message 2017-01-23 09:13:41 +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
Grégoire Henry
eee67406a5 CI: some unit tests for the p2p layer 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
1f7f9b369d Shell: improve Lwt_pipe 2017-01-19 10:21:21 +01:00
Grégoire Henry
7689021810 CI: less build artifacts 2017-01-02 14:49:56 +01:00
Vincent Bernardoff
224e5d8c73 P2P: Add counters in peer_info 2016-12-06 14:12:18 +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
Vincent Bernardoff
997d1972e0 Test: update test-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
damian
d391be687b Update tooling for new cmdliner code. 2016-12-01 12:57:22 +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
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