Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[develop] Updating Rust versions of proof-systems and kimchi_bindings/stubs to 1.72 #14225

Merged
merged 14 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from 13 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
8 changes: 4 additions & 4 deletions buildkite/src/Constants/ContainerImages.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
-- NOTE: minaToolchainBookworm is also used for building Ubuntu Jammy packages in CI
{
toolchainBase = "codaprotocol/ci-toolchain-base:v3",
minaToolchainBuster = "gcr.io/o1labs-192920/mina-toolchain@sha256:563fd7adda282fb3b6765c1811a3566e0fa0560f5d1c5270003483030d82d394",
minaToolchainBullseye = "gcr.io/o1labs-192920/mina-toolchain@sha256:49891eb46089f937f054afa464ce9868529981b92b30740cce32ef60957a1098",
minaToolchainBookworm = "gcr.io/o1labs-192920/mina-toolchain@sha256:49891eb46089f937f054afa464ce9868529981b92b30740cce32ef60957a1098",
minaToolchain = "gcr.io/o1labs-192920/mina-toolchain@sha256:49891eb46089f937f054afa464ce9868529981b92b30740cce32ef60957a1098",
minaToolchainBuster = "gcr.io/o1labs-192920/mina-toolchain@sha256:71173ebccf6af3e24d27262a5071f3dd0bd2c40b9de1c258422fdb9419507d3c",
minaToolchainBullseye = "gcr.io/o1labs-192920/mina-toolchain@sha256:9c4062e76fcd910ad60d3f1f58e2395f6a5e70f16fbef422442aedb70112ac73",
minaToolchainBookworm = "gcr.io/o1labs-192920/mina-toolchain@sha256:9c4062e76fcd910ad60d3f1f58e2395f6a5e70f16fbef422442aedb70112ac73",
minaToolchain = "gcr.io/o1labs-192920/mina-toolchain@sha256:9c4062e76fcd910ad60d3f1f58e2395f6a5e70f16fbef422442aedb70112ac73",
dannywillems marked this conversation as resolved.
Show resolved Hide resolved
delegationBackendToolchain = "gcr.io/o1labs-192920/delegation-backend-production@sha256:12ffd0a9016819c720687f440c7a46b8815f8d3ad06d306d342ee5f8dd4375f5",
elixirToolchain = "elixir:1.10-alpine",
nodeToolchain = "node:14.13.1-stretch-slim",
Expand Down
10 changes: 7 additions & 3 deletions dockerfiles/stages/1-build-deps
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ ARG GO_VERSION=1.19.11
ARG GO_CAPNP_VERSION=v3.0.0-alpha.5

# Rust Version passed into rustup-init, can also be "stable", "nightly" or similar
ARG RUST_VERSION=1.63.0
# This should stay in line with:
# - src/lib/crypto/kimchi_bindings/stubs/rust-toolchain.toml
# - src/lib/crypto/proof-systems/rust-toolchain.toml
ARG RUST_VERSION=1.72
# Nightly Rust Version used for WebAssembly builds
ARG RUST_NIGHTLY=2022-09-12
# - src/lib/snarkyjs/src/bindings/kimchi/wasm/rust-toolchain.toml
ARG RUST_NIGHTLY=2023-09-01
# wasm-pack version
ARG WASM_PACK_VERSION=v0.10.3
ARG WASM_PACK_VERSION=v0.12.1

# Rocksdb commit tag/branch to clone
ARG ROCKSDB_VERSION=v5.18.4
Expand Down
20 changes: 13 additions & 7 deletions nix/rust.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ let
# override stdenv.targetPlatform here, if neccesary
};
toolchainHashes = {
"1.67.0" = "sha256-riZUc+R9V35c/9e8KJUE+8pzpXyl0lRXt3ZkKlxoY0g=";
"nightly-2023-02-05" =
"sha256-MM8fdvveBEWzpwjH7u6C0F7qSWGPIMpfZWLgVxSqtxY=";
# copy this line with the correct toolchain name
"1.72" = "sha256-dxE7lmCFWlq0nl/wKcmYvpP9zqQbBitAQgZ1zx9Ooik=";
"nightly-2023-09-01" = "sha256-nfYc8EgbYl75yIIHmEEmpux4ZpwaIyuC+g6Hf4y1Hyk=";
# copy the placeholder line with the correct toolchain name when adding a new toolchain
# That is,
# 1. Put the correct version name;
#
# 2. Put the hash you get in line "got" from the error you obtain, which looks like
# error: hash mismatch in fixed-output derivation '/nix/store/XXXXX'
# specified: sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
# got: sha256-Q9UgzzvxLi4x9aWUJTn+/5EXekC98ODRU1TwhUs9RnY=
"placeholder" = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
};
# rust-toolchain.toml -> { rustc, cargo, rust-analyzer, ... }
Expand Down Expand Up @@ -150,8 +156,9 @@ in

checkInputs = [ final.nodejs ];

# other tests require it to be ran in the wasm-bindgen monorepo
cargoTestFlags = [ "--test=interface-types" ];
# other tests, like --test=wasm-bindgen, require it to be ran in the
# wasm-bindgen monorepo
cargoTestFlags = [ "--test=interface-types --test=reference" ];
};
in
rustPlatform.buildRustPackage {
Expand Down Expand Up @@ -200,4 +207,3 @@ in
cargoLock.lockFile = ../src/app/trace-tool/Cargo.lock;
};
}

2 changes: 1 addition & 1 deletion src/lib/crypto/kimchi_bindings/stubs/rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# 4. figure out the hashes of the (now obsolete) docker images used in CI rules that are failing, grep for these hashes and replace them with the new hashes

[toolchain]
channel = "1.67.0"
channel = "1.72"
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@ mod tests {
#[test]
fn biguint() {
let x = 10000.to_biguint().unwrap();
println!("biguint.to_string: {}", x.to_string());
println!("biguint.to_string: {}", x);
dannywillems marked this conversation as resolved.
Show resolved Hide resolved
let y = CamlBigInteger256::try_from(x.clone()).unwrap();
println!("camlbigint.to_string: {}", y.to_string());
//assert!(&y.to_string() == "10000");
let x2: BigUint = y.into();
assert!(x2 == x);
println!("biguint.to_string: {}", x2.to_string());
println!("biguint.to_string: {}", x2);
}
}
2 changes: 1 addition & 1 deletion src/lib/snarkyjs