Commit Graph

279 Commits

Author SHA1 Message Date
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
de866a0943 CI: temporary hack. 2017-02-24 18:02:24 +01:00
Grégoire Henry
e665a4f7e6 Script: some helpers for managing a local network. 2017-02-24 18:02:24 +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
Benjamin Canou
5be99fca06 Merge branch 'limit_hashtbl_size' into 'master'
Shell: limit known points table size

See merge request !138
2017-02-16 14:46:14 +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
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
dc7c692f87 CI: typo... 2017-01-26 14:04:46 +01:00
Grégoire Henry
07641eb594 CI: Push master images to the Docker hub. 2017-01-26 13:47:34 +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
5266671c72 Fix POW 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