Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ matrix:
include:
- os: linux
dist: xenial
env: OCAML_VERSION=4.09.1
env: OCAML_VERSION=4.10.0
- os: linux
dist: xenial
env: OCAML_VERSION=4.08.1
env: OCAML_VERSION=4.09.1
- os: linux
dist: xenial
env: OCAML_VERSION=4.07.1
env: OCAML_VERSION=4.08.1
# - os: osx
# osx_image: xcode10.1

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN apt-get update \
libpcre3-dev \
&& rm -rf /var/lib/apt/lists/*

ENV OCAML_VERSION 4.07.1
ENV OCAML_VERSION 4.08.1

RUN make opamdep-ci \
&& echo '. ~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true ' >> ~/.bashrc \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.slim
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN apt-get update \
libpcre3-dev \
&& rm -rf /var/lib/apt/lists/*

ENV OCAML_VERSION 4.07.1
ENV OCAML_VERSION 4.08.1

RUN make opamdep-ci \
&& echo '. ~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true ' >> ~/.bashrc \
Expand Down
8 changes: 4 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Disabling sandboxing is required since [WSL does not support Sandboxing](https:/
To disable sandboxing, simply run:

```shell
opam init --disable-sandboxing --compiler=4.07.1 --yes
opam init --disable-sandboxing --compiler=4.08.1 --yes
```

7. Set up current shell to work with opam
Expand All @@ -170,7 +170,7 @@ opam install ./scilla.opam --deps-only --with-test
then

```shell
opam switch create ./ --deps-only --with-test --yes ocaml-base-compiler.4.07.1
opam switch create ./ --deps-only --with-test --yes ocaml-base-compiler.4.08.1
```

9. Build and install
Expand Down Expand Up @@ -218,7 +218,7 @@ The binaries (`eval-runner`, `scilla-checker`, `scilla-runner` & `type-checker`)

#### Initialize opam
```shell
opam init --compiler=4.07.1 --yes
opam init --compiler=4.08.1 --yes
```
Note: the initializer will change your shell configuration to setup the environment opam needs to work.
You can remove `--yes` from the above command to manually control that process.
Expand Down Expand Up @@ -277,7 +277,7 @@ This is like a standard opam switch but instead of `$HOME/.opam`, it will reside
This lets us to avoid dependency conflict and changing our switches back and forth when working on different projects.
To create a local opam switch and install all the Scilla dependencies, `cd` into project root and execute:
```shell
opam switch create ./ --deps-only --with-test --yes ocaml-base-compiler.4.07.1
opam switch create ./ --deps-only --with-test --yes ocaml-base-compiler.4.08.1
```
Now, whenever you are inside the project directory, opam will prefer the local switch to any globally installed switches,
unless being told explicitly which one to use.
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Invoke `make` to build, `make clean` to clean up, etc.

OCAML_VERSION_RECOMMENDED=4.07.1
OCAMLFORMAT_VERSION=0.14.1
OCAML_VERSION_RECOMMENDED=4.08.1
OCAMLFORMAT_VERSION=0.14.3
IPC_SOCK_PATH="/tmp/zilliqa.sock"
CPPLIB_DIR=${PWD}/_build/default/src/base/cpp

Expand Down
16 changes: 8 additions & 8 deletions scilla.opam
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ bug-reports: "https://github.com/Zilliqa/scilla/issues"
dev-repo: "git+https://github.com/Zilliqa/scilla.git"
license: "GPL-3.0"
depends: [
"ocaml" {>= "4.07.1" & < "4.10~"}
"ocaml" {>= "4.08.0" & < "4.11~"}
"dune" {>= "2.0"}
"menhir"
"core" {>= "v0.12.4" & < "v0.13~"}
"core" {>= "v0.14.0" & < "v0.15~"}
"bitstring" {>= "3.1.0" & < "3.2~"}
"angstrom" {>= "0.11.0" & < "0.14~"}
"bisect_ppx" {>= "2.0.0" & < "2.3~"}
"angstrom" {>= "0.11.0" & < "0.15~"}
"bisect_ppx" {>= "2.0.0" & < "2.5~"}
"cryptokit" {>= "1.13" & < "1.15~"}
"ctypes" {>= "0.14.0" & < "0.18~"}
"ctypes-foreign" {>= "0.4.0" & < "0.5~"}
"fileutils" {>= "0.5.3" & < "0.7~"}
"hex" {>= "1.3.0" & < "1.5~"}
"yojson" {>= "1.7.0" & < "1.8~"}
"ocaml-protoc" {>= "1.2.0" & < "2.1~"}
"ppx_deriving" {>= "4.2.1" & < "4.5~"}
"ppx_sexp_conv" {>= "v0.12.0" & < "v0.13~"}
"ppx_compare" {>= "v0.12.0" & < "v0.13~"}
"ppx_deriving" {>= "4.2.1" & < "4.6~"}
"ppx_sexp_conv" {>= "v0.14.0" & < "v0.15~"}
"ppx_compare" {>= "v0.14.0" & < "v0.15~"}
"ppx_deriving_rpc" {>= "6.0.0" & < "8.0~"}
"secp256k1" {>= "0.4.0" & < "0.5~"}
"stdint" {>= "0.5.1" & < "0.7~"}
"ounit" {>= "2.0.8" & < "2.3~"}
"patdiff" {>= "v0.12.1" & < "v0.13~"}
"patdiff" {>= "v0.14.0" & < "v0.15~"}
"conf-cmake" {build}
"conf-gcc" {build}
"conf-g++" {build}
Expand Down
1 change: 0 additions & 1 deletion src/base/Accept.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
so again we only generate warnings not errors. *)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Literal
open TypeUtil
open ErrorUtils
Expand Down
1 change: 0 additions & 1 deletion src/base/AssocDictionary.ml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
(**********************************************************)

open Core_kernel
open! Int.Replace_polymorphic_compare

(* Simple association list implementation of a dictionary. *)
type key = string
Expand Down
1 change: 0 additions & 1 deletion src/base/Bech32.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Bitstring
open Utils

Expand Down
1 change: 0 additions & 1 deletion src/base/BuiltIns.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Literal
open Syntax
open ErrorUtils
Expand Down
1 change: 0 additions & 1 deletion src/base/Cashflow.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Sexplib.Std
open Literal
open Syntax
Expand Down
1 change: 0 additions & 1 deletion src/base/Checker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open ParserUtil
open Syntax
open ErrorUtils
Expand Down
1 change: 0 additions & 1 deletion src/base/ContractUtil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Literal
open Syntax
open MonadUtil
Expand Down
1 change: 0 additions & 1 deletion src/base/Datatypes.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Literal
open MonadUtil
open Result.Let_syntax
Expand Down
1 change: 0 additions & 1 deletion src/base/DebugMessage.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open GlobalConfig

(* Prints to log file *)
Expand Down
1 change: 0 additions & 1 deletion src/base/Disambiguate.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Result.Let_syntax
open ErrorUtils
open MonadUtil
Expand Down
1 change: 0 additions & 1 deletion src/base/ErrorUtils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare

(* Location info, slightly more usable than Lexing.position *)
type loc = {
Expand Down
1 change: 0 additions & 1 deletion src/base/EventInfo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Result.Let_syntax
open TypeUtil
open Literal
Expand Down
1 change: 0 additions & 1 deletion src/base/FrontEndParser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Lexing
open ErrorUtils
open MonadUtil
Expand Down
1 change: 0 additions & 1 deletion src/base/Gas.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open ErrorUtils
open Result.Let_syntax
open MonadUtil
Expand Down
3 changes: 1 addition & 2 deletions src/base/GlobalConfig.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open ScillaUtil.FilePathInfix

(* Available debug levels for functions in DbgMsg *)
Expand Down Expand Up @@ -46,7 +45,7 @@ let rec get_highest_numbered_log files =
* scilla-runner-[0-9]+.log and return the next in sequence *)
let create_log_filename dir =
if (not (Caml.Sys.file_exists dir)) || not (Caml.Sys.is_directory dir) then
Unix.mkdir dir 0o766;
Core.Unix.mkdir dir ~perm:0o766;
(* Arbitrary *)
let files = Sys.readdir dir in
let num = get_highest_numbered_log (Array.to_list files) in
Expand Down
1 change: 0 additions & 1 deletion src/base/Integer256.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Stdint

type uint256 = { high : uint128; low : uint128 }
Expand Down
1 change: 0 additions & 1 deletion src/base/JSON.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Literal
open Syntax
open ErrorUtils
Expand Down
1 change: 0 additions & 1 deletion src/base/JSONParser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
(* A fast JSON parser for states that performs no validations. *)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Yojson
open ErrorUtils
open TypeUtil
Expand Down
1 change: 0 additions & 1 deletion src/base/Literal.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Sexplib.Std
open Stdint
open MonadUtil
Expand Down
1 change: 0 additions & 1 deletion src/base/MonadUtil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Result.Let_syntax
open ErrorUtils
open Stdint
Expand Down
1 change: 0 additions & 1 deletion src/base/PatternChecker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
open Literal
open Syntax
open Core_kernel
open! Int.Replace_polymorphic_compare
open ErrorUtils
open MonadUtil
open Result.Let_syntax
Expand Down
1 change: 0 additions & 1 deletion src/base/PatternUtil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open ErrorUtils

(****************************************************************)
Expand Down
1 change: 0 additions & 1 deletion src/base/PrettyPrinters.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Literal
open Syntax
open Yojson
Expand Down
1 change: 0 additions & 1 deletion src/base/Recursion.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Literal
open Syntax
open ErrorUtils
Expand Down
1 change: 0 additions & 1 deletion src/base/RecursionPrinciples.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

open ParserUtil
open Core_kernel
open! Int.Replace_polymorphic_compare
open FrontEndParser

(***********************************************************)
Expand Down
1 change: 0 additions & 1 deletion src/base/RunnerUtil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Printf
open GlobalConfig
open ErrorUtils
Expand Down
3 changes: 0 additions & 3 deletions src/base/SafeArith.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
scilla. If not, see <http://www.gnu.org/licenses/>.
*)
open Base

(* No need to open! Int.Replace_polymorphic_compare
because open Base already disables polymorphic comparisons except for ints *)
open Stdint

exception IntOverflow
Expand Down
1 change: 0 additions & 1 deletion src/base/SanityChecker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Result.Let_syntax
open TypeUtil
open Literal
Expand Down
3 changes: 0 additions & 3 deletions src/base/ScillaUtil.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
scilla. If not, see <http://www.gnu.org/licenses/>.
*)

open Core_kernel
open! Int.Replace_polymorphic_compare

module FilePathInfix = struct
let ( ^/ ) = FilePath.concat

Expand Down
1 change: 0 additions & 1 deletion src/base/Syntax.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Sexplib.Std
open ErrorUtils
open Literal
Expand Down
1 change: 0 additions & 1 deletion src/base/Type.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Sexplib.Std
open ErrorUtils
open Identifier
Expand Down
5 changes: 2 additions & 3 deletions src/base/TypeChecker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*)

open Core_kernel
open! Int.Replace_polymorphic_compare
open Literal
open Syntax
open ErrorUtils
Expand Down Expand Up @@ -922,8 +921,8 @@ module ScillaTypechecker (SR : Rep) (ER : Rep) = struct
let lib_vars, lib_types =
List.partition_map rec_libs ~f:(fun le ->
match le with
| LibVar (n, t, e) -> `Fst (n, t, e)
| LibTyp (n, ts) -> `Snd (n, ts))
| LibVar (n, t, e) -> First (n, t, e)
| LibTyp (n, ts) -> Second (n, ts))
in
(* recursion primitives must not contain type declarations *)
let%bind () =
Expand Down
Loading