Skip to content

Commit

Permalink
Merge pull request #16002 from MinaProtocol/dkijania/merge-compatible…
Browse files Browse the repository at this point in the history
…-04-09-2024

merge compatible to develop
  • Loading branch information
mrmr1993 authored Sep 4, 2024
2 parents 79f6a40 + 889f62d commit f81a9d8
Show file tree
Hide file tree
Showing 126 changed files with 2,515 additions and 9,040 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,7 @@ Pipfile.lock
# coverage report files
*.coverage
_coverage/

# directory removed in this branch, but still existing in berkeley,
# may appear as an untracked file occasionally
/src/external
10 changes: 0 additions & 10 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
[submodule "src/lib/snarky"]
path = src/lib/snarky
url = https://github.com/o1-labs/snarky
[submodule "src/external/ppx_optcomp"]
path = src/external/ppx_optcomp
url = https://github.com/MinaProtocol/ppx_optcomp
[submodule "src/lib/crypto/proof-systems"]
path = src/lib/crypto/proof-systems
url = https://github.com/o1-labs/proof-systems.git
[submodule "src/external/prometheus"]
path = src/external/prometheus
url = https://github.com/MinaProtocol/prometheus.git
branch = master
[submodule "src/external/c-reference-signer"]
path = src/external/c-reference-signer
url = https://github.com/MinaProtocol/c-reference-signer.git
[submodule "src/lib/crypto/kimchi_bindings/stubs/kimchi-stubs-vendors"]
path = src/lib/crypto/kimchi_bindings/stubs/kimchi-stubs-vendors
url = https://github.com/MinaProtocol/kimchi-stubs-vendors.git
2 changes: 0 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
/README.md @MinaProtocol/product-eng-reviewers
/README-dev.md @MinaProtocol/protocol-eng-reviewers

/src/external/ @bkase @psteckler @mrmr1993

/src/app/archive @MinaProtocol/protocol-eng-reviewers
/src/app/cli/src/mina.ml @MinaProtocol/protocol-eng-reviewers
/src/app/cli/src/init @MinaProtocol/protocol-eng-reviewers
Expand Down
14 changes: 8 additions & 6 deletions README-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ You can build Mina using Docker. Using Docker works in any dev environment. See
```

1. Install [rustup](https://rustup.rs/).
2. Create your switch with deps `opam switch import --switch mina opam.export`
2. Add o1-opam-repository with `opam repository add --yes --all --set-default o1-labs https://github.com/o1-labs/opam-repository.git`
3. Create your switch with deps `opam switch import --switch mina opam.export`

M1- and M2- operating systems experience issues because Homebrew does not link include files automatically.

Expand Down Expand Up @@ -98,13 +99,13 @@ You can build Mina using Docker. Using Docker works in any dev environment. See
- Note:If you get conf-openssl install errors, try running `export PKG_CONFIG_PATH=$(brew --prefix openssl@1.1)/lib/pkgconfig` and try `opam switch import opam.export` again.
- If prompted, run `opam user-setup install` to enable opam-user-setup support for Merlin.

3. Pin dependencies that override opam versions:
4. Pin dependencies that override opam versions:

```sh
scripts/pin-external-packages.sh
```

7. Install the correct version of golang:
5. Install the correct version of golang:

- `goenv init`
- To make sure the right `goenv` is used, update your shell env script with:
Expand All @@ -118,17 +119,17 @@ You can build Mina using Docker. Using Docker works in any dev environment. See
- `goenv global 1.18.10`
- Check that the `go version` returns the right version, otherwise you see the message `compile:version "go1.18.10" does not match go tool version "go1.20.2"`. If so, run `brew remove go` or get the matching version.

9. Invoke `make build`.
6. Invoke `make build`.

If you get errors about `libp2p` and `capnp`, try with `brew install capnp`.

9. For better IDE support, install the OCaml-LSP language server for OCaml:
7. For better IDE support, install the OCaml-LSP language server for OCaml:

```sh
opam install ocaml-lsp-server
```

10. Set up your IDE. See [Customizing your dev environment for autocomplete/merlin](https://github.com/MinaProtocol/mina/blob/develop/README-dev.md#customizing-your-dev-environment-for-autocompletemerlin).
8. Set up your IDE. See [Customizing your dev environment for autocomplete/merlin](https://github.com/MinaProtocol/mina/blob/develop/README-dev.md#customizing-your-dev-environment-for-autocompletemerlin).

### Developer Setup (Linux)

Expand All @@ -139,6 +140,7 @@ Mina has a variety of opam and system dependencies.
To get all of the required opam dependencies, run:

```sh
opam repository add --yes --all --set-default o1-labs https://github.com/o1-labs/opam-repository.git
opam switch import opam.export
```

Expand Down
5 changes: 4 additions & 1 deletion buildkite/scripts/setup-database-for-archive-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ db=$3


sudo service postgresql start
sudo -u postgres psql -c "CREATE USER ${user} WITH SUPERUSER PASSWORD '${password}';"
sudo -u postgres psql -c "CREATE USER ${user} WITH LOGIN SUPERUSER PASSWORD '${password}';"
sudo pg_isready
service postgresql status
sudo -u postgres createdb -O $user $db
PGPASSWORD=$password psql -h localhost -p 5434 -U $user -d $db -a -f src/app/archive/create_schema.sql
6 changes: 3 additions & 3 deletions buildkite/src/Constants/ContainerImages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
-- NOTE: minaToolchainBookworm is also used for building Ubuntu Jammy packages in CI
{ toolchainBase = "codaprotocol/ci-toolchain-base:v3"
, minaToolchainBullseye =
"gcr.io/o1labs-192920/mina-toolchain@sha256:966863de43c72c294e14762ae567404005f99654c54338a9a89b999476a36d1f"
"gcr.io/o1labs-192920/mina-toolchain@sha256:a1f60d69f3657060d6e7289dc770fd7c36fc5a067853019c2f3f6247cb4b6673"
, minaToolchainBookworm =
"gcr.io/o1labs-192920/mina-toolchain@sha256:966863de43c72c294e14762ae567404005f99654c54338a9a89b999476a36d1f"
"gcr.io/o1labs-192920/mina-toolchain@sha256:a1f60d69f3657060d6e7289dc770fd7c36fc5a067853019c2f3f6247cb4b6673"
, minaToolchain =
"gcr.io/o1labs-192920/mina-toolchain@sha256:966863de43c72c294e14762ae567404005f99654c54338a9a89b999476a36d1f"
"gcr.io/o1labs-192920/mina-toolchain@sha256:a1f60d69f3657060d6e7289dc770fd7c36fc5a067853019c2f3f6247cb4b6673"
, elixirToolchain = "elixir:1.10-alpine"
, nodeToolchain = "node:14.13.1-stretch-slim"
, ubuntu2004 = "ubuntu:20.04"
Expand Down
38 changes: 38 additions & 0 deletions buildkite/src/Jobs/Release/MinaToolchainArtifactFocal.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
let S = ../../Lib/SelectFiles.dhall

let Pipeline = ../../Pipeline/Dsl.dhall

let PipelineTag = ../../Pipeline/Tag.dhall

let JobSpec = ../../Pipeline/JobSpec.dhall

let DockerImage = ../../Command/DockerImage.dhall

in Pipeline.build
Pipeline.Config::{
, spec = JobSpec::{
, dirtyWhen =
[ S.strictlyStart (S.contains "dockerfiles/stages/1-")
, S.strictlyStart (S.contains "dockerfiles/stages/2-")
, S.strictlyStart (S.contains "dockerfiles/stages/3-")
, S.strictlyStart
(S.contains "buildkite/src/Jobs/Release/MinaToolchainArtifact")
, S.strictly (S.contains "opam.export")
, S.strictlyEnd (S.contains "rust-toolchain.toml")
]
, path = "Release"
, name = "MinaToolchainArtifactFocal"
, tags = [ PipelineTag.Type.Toolchain ]
}
, steps =
[ let toolchainSpec =
DockerImage.ReleaseSpec::{
, service = "mina-toolchain"
, deb_codename = "focal"
, no_cache = True
, step_key = "toolchain-focal-docker-image"
}

in DockerImage.generateStep toolchainSpec
]
}
2 changes: 1 addition & 1 deletion buildkite/src/Jobs/Test/ArchiveNodeUnitTest.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ in Pipeline.build
[ "POSTGRES_PASSWORD=${password}"
, "POSTGRES_USER=${user}"
, "POSTGRES_DB=${db}"
, "MINA_TEST_POSTGRES=postgres://${user}:${password}@localhost:5434/${db}"
, "GO=/usr/lib/go/bin/go"
, "DUNE_INSTRUMENT_WITH=bisect_ppx"
, "COVERALLS_TOKEN"
]
( Prelude.Text.concatSep
" && "
[ "bash buildkite/scripts/setup-database-for-archive-node.sh ${user} ${password} ${db}"
, "PGPASSWORD=${password} psql -h localhost -p 5432 -U ${user} -d ${db} -a -f src/app/archive/create_schema.sql"
, WithCargo.withCargo
"eval \\\$(opam config env) && dune runtest src/app/archive && buildkite/scripts/upload-partial-coverage-data.sh ${command_key} dev"
]
Expand Down
2 changes: 1 addition & 1 deletion buildkite/src/Jobs/Test/VersionLint.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ in Pipeline.build
, PipelineTag.Type.Stable
]
}
, steps = [ buildTestCmd "develop" Size.Small dependsOn ]
, steps = [ buildTestCmd "compatible" Size.Small dependsOn ]
}
2 changes: 2 additions & 0 deletions dockerfiles/stages/2-opam-deps
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ ENV OPAMREUSEBUILDDIR false
# Limit logs for opam install errors to 20 lines per error
ENV OPAMERRLOGLEN 20

ENV GIT_LFS_SKIP_SMUDGE 1

# --- Shallow clone the Mina repo, only focused on the given MINA_BRANCH
# git will clone into an empty dir, but this also helps us set the workdir in advance
RUN git clone \
Expand Down
17 changes: 17 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
inputs.opam-nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.opam-nix.inputs.opam-repository.follows = "opam-repository";

inputs.o1-opam-repository.url = "github:o1-labs/opam-repository";
inputs.o1-opam-repository.flake = false;

inputs.opam-repository.url = "github:ocaml/opam-repository";
inputs.opam-repository.flake = false;

Expand Down
Loading

0 comments on commit f81a9d8

Please sign in to comment.