Commit Graph

221 Commits

Author SHA1 Message Date
Grégoire Henry
75274bf923 Zeronet/alphanet: update constants. 2018-03-20 06:49:52 +01:00
Benjamin Canou
dabf4c1578 Fix alphanet_constants.patch and reset the chain 2018-03-18 18:36:56 +01:00
Grégoire Henry
e1a1f754aa Fix indent in gen_genesis.ml 2018-03-16 14:40:39 +01:00
Grégoire Henry
ee3f81b6e3 Zeronet: check constant patch application. 2018-03-12 10:34:21 +01:00
Benjamin Canou
d00724ea13 Fix alphanet_constant.patch and reset the chain 2018-03-09 14:17:18 +01:00
Grégoire Henry
f926cfc0ac Reset the chain 2018-03-08 07:08:24 +01:00
Grégoire Henry
cdeff6d3ca Fix 'script/reset_chain.sh' 2018-03-08 07:07:59 +01:00
Grégoire Henry
c4146d1d46 Zeronet: update bootstrap nodes 2018-03-07 19:22:22 +01:00
Grégoire Henry
5d99c7c0ae Reset the chain 2018-03-07 18:39:23 +01:00
Grégoire Henry
d339ada6fb Alphanet: script for reseting the chain data 2018-03-07 18:38:53 +01:00
Grégoire Henry
891f2093ef Docker: add bash-completion.sh in image 2018-03-07 18:14:51 +01:00
Grégoire Henry
1903f081ab Docker: remove the parameter 'P2P_PORT' 2018-03-07 18:14:51 +01:00
Grégoire Henry
b8f8b598cd Fix alphanet_constant.patch 2018-03-07 18:14:51 +01:00
Grégoire Henry
64a41538c8 CI: add missing 'test' package in the cached opam repository 2018-02-26 11:58:39 -05:00
Pietro Abate
9c6d0bd684 Docker: introduce a generic docker-compose.yml 2018-02-22 10:49:22 -05:00
Pietro
ea515b9551 Alphanet: use docker-compose 2018-02-22 10:24:02 -05:00
Grégoire Henry
80079bc200 CI: temporary workaround 2018-02-22 05:36:57 +01:00
Pierre Chambart
590ddb750f Change compiler's requested version 2018-02-22 05:36:57 +01:00
Grégoire Henry
040d99b673 Docker: use remote opam image by default 2018-02-15 17:16:39 +01:00
Grégoire Henry
a70a0788d3 Test: quick and dirty port to alcotest 2018-02-12 02:09:00 +01:00
Marco Stronati
035042d69f Scripts: fix alphanet/zeronet patch 2018-02-08 18:04:53 +01:00
Grégoire Henry
2ad06a0e06 CI: manually bundle test dependencies 2018-02-07 14:40:55 +01:00
Grégoire Henry
9899169f78 CI: embeds test packages in the default image 2018-02-07 11:16:39 +01:00
Vincent Bernardoff
e1d1292c09 Crypto: drop libsodium
We now use simpler OCaml bindings much easier to review.
2018-02-07 11:16:39 +01:00
Grégoire Henry
ae3ff0503b Proto: the number of validation is now a protocol constant 2018-02-02 10:27:58 +01:00
Grégoire Henry
3c2430e916 CI: use released version of opam-depext 2018-01-31 08:40:39 +01:00
Milo Davis
1ec1f501a4 Alphanet: fixes assert_endorser in alphanet script 2018-01-30 23:00:49 +00:00
Grégoire Henry
e664179927 Refactor: CI: check opam packages 2018-01-30 10:13:40 +01:00
Grégoire Henry
1f3c68cbd8 Refactor: Regroup protocols 2018-01-30 10:12:55 +01:00
Grégoire Henry
260a717cc1 CI: Fix the publish rules 2018-01-29 22:11:18 +01:00
Grégoire Henry
55db2dbf18 CI: improve pipeline duration
- do not use a intermediate docker image between 'build' and 'test'
- in 'build_deps', avoid downloading the cached image
- in 'prepare', use `opam bundle` to:
  - embedded the sources of dependency
  - reduce the embedded opam repository to the needed package

Other changes:

- reintroduced 'sudo' in the base image, it is needed by `opam depext`
  and the job 'publish:doc'
- moved the docker script used by the CI in `scripts/ci/`
2018-01-28 20:03:31 +01:00
Pietro
99cdf5e5c2 gitlab CI refactoring
- Docker files and build scripts
    + add git, bash and patch to the docker base definition (Dockerfile.base)
    + build leveldb once and for all
      (scripts/create_docker_image.leveldb_deps.sh)
    + add --depth 1 to all git clone calls
    + remove sudo, openssh and rsync from base images
    + add --no-cache to all apk calls
    + merge dockerfiles in the sh scripts
2018-01-28 20:02:51 +01:00
Grégoire Henry
e7483ff392 Opam: new release of ocp-ocamlres 2018-01-27 14:55:57 +01:00
Benjamin Canou
adf860ea40 Docs: new documentation structure using Sphinx/RST
- Provides a toplevel documentation structure using Sphinx
 - Adds a `doc-html` target to the main Makefile
 - Converts existing documentation to RST format
 - Add some new documentation / tutorials
 - Links the developer manual and OCaml documentation
 - Synchronized documentation on Gitlab pages

This patch is co-authored by:
 - Benjamin Canou <benjamin@canou.fr>
 - Bruno Bernardo <bernardobruno@gmail.com>
 - Pietro Abate <pietro.abate@inria.fr>
2018-01-23 08:02:17 +01:00
Grégoire Henry
7b6d8c3db3 Temporary CI fix 2018-01-22 10:42:02 +01:00
Grégoire Henry
525b09259f Fix d9405292a4 2018-01-18 16:08:20 +01:00
Pietro
d9405292a4 Move all packages to src/
Modify Makefile accordingly
2018-01-16 23:11:39 +01:00
Milo Davis
054506a85f Init-client: fix bash-completion error 2017-12-14 23:45:48 +00:00
Milo Davis
9f5b6183ac Apply patch: update script to match new directory structure 2017-12-13 14:14:24 +00:00
Grégoire Henry
3ee46c59be CI: add support for opam2-beta5 2017-12-08 02:50:03 +01:00
Grégoire Henry
de5935228f Opam: remove tezos-deps.opam
All dependencies are now inlined in the various opam packages.
2017-12-08 02:50:03 +01:00
Grégoire Henry
d8d54ce321 Jbuilder: install tezos-sandboxed-node.sh/tezos-init-sandboxed-client.sh 2017-12-08 02:50:03 +01:00
Grégoire Henry
be04cb027b Opam: pin external dev packages
This is temporary, we should either: release new version and stop
using development version; or import sources in the tezos-repo (and
compile them with jbuilder, especially sodium (or part of it) if it is
not maintened anymore.
2017-12-08 02:50:03 +01:00
Grégoire Henry
38ca0b8ad0 Opam: add compiler version contraints 2017-12-08 02:50:03 +01:00
Grégoire Henry
d2708740c8 Opam: fix some dependencies and add some scripts/opam-*.sh.
Installation:

   `./scripts/opam-pin.sh && opam install tezos-node tezos-client`

Upgrade installed packages after a `git pull` (opam2 only):

   `./scripts/opam-upgrade.sh`

Remove and cleanup every from the opam repo:

   `./scripts/opam-unpin.sh`
2017-12-08 02:50:03 +01:00
Grégoire Henry
a505b54287 CI: fix dependency caching 2017-12-05 18:52:44 +01:00
Grégoire Henry
d3f91f05a2 Fix CI for new repository structure 2017-12-04 19:27:30 +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
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
Benjamin Canou
4b0896300d Fix alphanet_constants.patch 2017-11-28 15:43:40 +01:00
Grégoire Henry
c6b4a83e2b Reset the chain. 2017-11-26 22:49:20 +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
84a2f1ee29 Shell: enforce the maximum number of operation per block 2017-11-20 05:03:00 +01:00
Grégoire Henry
5bcb2593a3 Docker: fix leveldb installation 2017-11-20 01:11:38 +01:00
Grégoire Henry
b6b59be5fd Jbuilder: minor improvement in error reporting. 2017-11-17 15:54:36 +01:00
Grégoire Henry
529795efd7
Reset the chain 2017-11-17 02:51:39 +01:00
Pietro Abate
0f467c263b Scripts: Add optional 'fix' argument to test-ocp-indent.sh
the script can be called with fix as argument to fix all indentation
problems in one go
2017-11-14 17:24:34 +01:00
Grégoire Henry
3eddca508b CI: use compatible options for diff.
Also install `ocp-indent` and embeds `.ocp-indent` in the docker
image.
2017-11-14 05:35: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
Benjamin Canou
6a38f76956 Reset the chain. 2017-11-13 22:18:17 +01:00
Benjamin Canou
d00b9ca1e1 CI: Import Alpine package backport for leveldb-1.18 2017-11-13 22:18:16 +01:00
Grégoire Henry
e21672c4ac Jbuilder: do not depend on the git version anymore 2017-11-08 15:55:40 +01:00
Milo Davis
2fa77489bc CLI: completion with aliases and alphanet 2017-11-03 10:59:02 +01:00
Milo Davis
466831c179 CLI: Autocomplete 2017-11-03 10:59:02 +01:00
Arthur Breitman
6dd9f2289a mining -> baking, continued 2017-11-01 04:13:23 -07: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
Benjamin Canou
c3ed0d35a5 Scripts: wait for node termination before cleaning up temporary files 2017-09-28 15:40:27 +02:00
Grégoire Henry
c2fd13f3ab Reset the chain 2017-09-22 19:11:21 +02:00
Grégoire Henry
84376e09a4 Alphanet: use bash inside the docker image. 2017-09-22 11:38:25 +02:00
Grégoire Henry
b49491587f Reset the chain. 2017-09-22 11:37:57 +02:00
Grégoire Henry
a0bca5c733 Sandbox: add missing file 2017-09-13 15:22:20 +02:00
Milo Davis
d255807af9 Alphanet: fixes argument quoting bug 2017-08-29 13:04:59 +00:00
Grégoire Henry
d6348c009a Scripts/Test: more shared scripts...
- introduced `test/utils/test_lib.inc.sh` to simplify usage of
  sandboxed node/client in the testsuite

- it reuses code from `./script/{node,client}_lib.inc.sh`

- use `wait_for_the_node_to_be_ready` to properly wait for the node to
  be launched rather to use a fexed delay

- `test_multinode.sh` now launch 8 nodes.
2017-08-29 14:10:40 +02:00
Grégoire Henry
e033176820 README: add instructions for running a sandboxed node 2017-08-29 14:10:03 +02:00
Milo Davis
8c9f5f21a5 Alphanet: fixes container: relative paths bug 2017-08-24 21:15:59 +02:00
Milo Davis
bbf9df021b Fix bug in launch node script 2017-08-24 21:07:58 +02:00
Grégoire Henry
ba6e78900c Makefile: fix compat issue with macOS. 2017-08-22 14:55:46 +02:00
Henrik Jonsson
f7d596ac50 scripts: Set 'echo -e' to make text colors work in alphanet.sh
Before this change, output from `alphanet.sh` looked like the following:

```
New contract alias 'my_account' saved.
Contract memorized as my_account.
\033[32mThe node is now running.\033[0m
\033[32mThe baker is now running.\033[0m
\033[32mThe endorser is now running.\033[0m
\033[33mWarning: the container contains a new version of 'alphanet.sh'.\033[0m
\033[33mYou might run './scripts/alphanet.sh update_script' to synchronize.\033[0m
```

I.e. control characters showed up, instead of modifying the color of the text
output. Repro'd on Container Linux (CoreOS) 1492.3.0.

After this change, `The node is now running` shows up in green &c.
2017-08-19 11:06:15 +02:00
Benjamin Canou
7c586aaf25 Reset the chain (on-disk storage updated) 2017-08-17 14:54:34 +02:00
Grégoire Henry
a31bb86a63 CI: minor tweaks 2017-08-17 13:12:22 +02:00
Grégoire Henry
a01f786de4 Update to irmin.1.3 2017-08-16 11:12:51 +02:00
Grégoire Henry
67bbf11a12 CI: use our own docker image of opam 2017-08-16 10:52:36 +02:00
Grégoire Henry
bd7596005f Add CHANGES.alphanet. 2017-08-11 14:49:24 +02:00
Grégoire Henry
af16d9d62c Add scripts/README.alphanet. 2017-08-10 16:08:58 +00:00
Grégoire Henry
58b53d79c5 CI: fix the 'deploy' rules of alphanet/zeronet 2017-08-09 21:55:59 +02:00
Grégoire Henry
30b2cd3e0e Update protocol version 2017-08-08 16:49:56 +02:00
Milo Davis
3255fc8cd8 Alphanet: automatically copy files into container 2017-08-08 14:06:24 +00:00
Grégoire Henry
eed9e7581d Update CI 2017-08-04 18:32:52 +02:00
Grégoire Henry
a30d1a615c Update to ocaml.4.04.2 2017-08-04 18:31:31 +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
Grégoire Henry
81b720fee0 Add: tezos-client set delegate ... 2017-06-07 16:38:59 +02:00
Vincent Bernardoff
3b3428ddad Shell: experimental leveldb backend 2017-06-06 23:12:33 +02:00
Benjamin Canou
591f11a808 Docker: quick fix for wrong upstream alpine docker. 2017-06-01 17:55:53 +02:00
Vincent Bernardoff
c7c7ffbd0e do not pin cohttp to dev version 2017-05-22 13:59:17 +02:00
Grégoire Henry
443cee2bb3 Fix compilation with lwt.3.0.0 2017-05-07 12:26:27 +02:00
Grégoire Henry
400d25d54a Docker: do not export the RPC port by default. 2017-04-19 18:44:20 +02:00
Grégoire Henry
9b3e2c2502 Docker: do not fail when there is nothing to backup... 2017-04-19 18:44:20 +02:00
Grégoire Henry
72e200bfd3 Docker: export "safe" RPCs from the container. 2017-04-17 20:42:43 +02:00
Grégoire Henry
c316dc00a8 Minor improvement in the docker image. 2017-04-14 20:54:43 +02:00
Alain Mebsout
8777349a19 A few fixes to make things more posix compliant in build/test scripts 2017-04-14 17:41:18 +02:00
Grégoire Henry
24b5290a74 Opam: use the libev backend of Lwt. 2017-03-31 16:58:59 +02:00
Benjamin Canou
31bc331063 Switch to OCaml version 4.04.0. 2017-03-28 14:37:26 +02:00
Benjamin Canou
cf81497e9d Alphanet: add git to the docker image for [git repack] to work. 2017-03-28 13:08:00 +02:00
Grégoire Henry
826f2ea4ba P2p: implements peer swapping 2017-03-14 11:56:42 +01:00
Grégoire Henry
176c469a5c CI: fix public image 2017-03-14 11:19:33 +01:00
Grégoire Henry
6202dc54bc Shell: fix the last known memory leak... 2017-03-09 14:38:39 +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
07641eb594 CI: Push master images to the Docker hub. 2017-01-26 13:47:34 +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
damian
87254788b9 Added Dockerfiles for building and running tezos binaries 2017-01-23 11:17:39 +01:00
Grégoire Henry
ef514eb70e OPAM: ugly temporary hack for typerex-build to compile 2017-01-19 10:26:45 +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
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
damian
37124411df Fix issues with relative paths, fix code style 2016-12-09 10:38:42 +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
Benjamin Canou
0e93a1dbde Use latest ocplib-json-typed. 2016-11-09 11:40:01 +01:00
Çağdaş Bozman
03d37bfdeb Update test framework
We now use Kaputt for our tests.
2016-10-10 11:30:06 +02:00
Grégoire Henry
c1079c78e4 script: Fix typo (and improve compat with opam-2.0) 2016-09-12 16:18:19 +02:00
Tezos
f42e9d12ac First public release 2016-09-08 19:29:33 -07:00