Skip to content

Use Rust 1.82 in Mina #16794

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

Draft
wants to merge 9 commits into
base: compatible
Choose a base branch
from
Draft

Use Rust 1.82 in Mina #16794

wants to merge 9 commits into from

Conversation

dannywillems
Copy link
Member

No description provided.

@dannywillems dannywillems requested review from a team as code owners March 27, 2025 17:25
@dannywillems
Copy link
Member Author

!ci-toolchain-me

@dannywillems
Copy link
Member Author

!ci-build-me

@dannywillems
Copy link
Member Author

!ci-build-me

@dannywillems dannywillems marked this pull request as draft March 27, 2025 19:53
@querolita querolita self-requested a review March 27, 2025 19:56
@dannywillems
Copy link
Member Author

dannywillems commented Mar 27, 2025

Leaving in draft. Waiting for #16791 to be merged first.
This PR would require a change in develop first to make the job check-merges-cleanly-into-develop green, as it has been required when updating to Rust 1.79 (c.f. #16731 and #16652).
The following commands will be run and a PR targeting develop (as suggested by Dariusz in #16731):

git checkout develop 
git pull
git checkout -b port_bump_rust_to_1_82
# Taking container images used by current develop. Will update a second commit.
git merge dw/bump-rust-to-1.82

@dannywillems dannywillems force-pushed the dw/bump-rust-to-1.82 branch from 29ab4fc to a1321f7 Compare March 27, 2025 20:29
@dannywillems
Copy link
Member Author

Investigating

warning: ignoring untrusted substituter 'https://storage.googleapis.com/mina-nix-cache', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
warning: ignoring the client-specified setting 'trusted-public-keys', because it is a restricted setting and you are not a trusted user
error:
       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:34:12:
           33|
           34|   strict = derivationStrict drvAttrs;
             |            ^
           35|

       … while evaluating derivation 'mina-dev'
         whose name attribute is located at /nix/store/x38dbpkm6xypf5vg6f8wgi9ndqh8s2j4-source/pkgs/stdenv/generic/make-derivation.nix:348:7

       … while evaluating attribute 'PLONK_WASM_NODEJS' of derivation 'mina-dev'
         at /nix/store/i9s29wva6zba298f2jhkjwfc3lwqim66-source/nix/ocaml.nix:344:9:
          343|
          344|         PLONK_WASM_NODEJS = "${pkgs.plonk_wasm}/nodejs";
             |         ^
          345|         PLONK_WASM_WEB = "${pkgs.plonk_wasm}/web";

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: builder for '/nix/store/l9ph09hsfpdns9g22i8lnrwc3dd8ag22-cargo.lock.drv' failed with exit code 1;
       last 1 log lines:
       > cp: cannot stat '/nix/store/yd6sh6rhssv6m36d4xwdfvsha73fw43f-rust-src-1.84.0-nightly-2024-10-17-3ed6e3cc6/lib/rustlib/src/rust/Cargo.lock': No such file or directory
       For full logs, run 'nix-store -l /nix/store/l9ph09hsfpdns9g22i8lnrwc3dd8ag22-cargo.lock.drv'.

@dannywillems
Copy link
Member Author

Interesting to notice: /nix/store/yd6sh6rhssv6m36d4xwdfvsha73fw43f-rust-src-1.84.0-nightly-2024-10-17-3ed6e3cc6 mentioned 2024-10-17 when 2024-10-18 is the right date. I don't know if related. Reading more the full trace with --show-trace.

@dannywillems
Copy link
Member Author

Investigating the file Cargo.lock.

@dannywillems
Copy link
Member Author

!ci-build-me

@dannywillems
Copy link
Member Author

Investigating if it comes from this line, which seems to be a temporary fix?
Also this line mentions a workaround for this issue, which seems to have a PR that has been merged. The nightly version mentioned in the comment is exactly between the two versions of the diff.

@dannywillems
Copy link
Member Author

dannywillems commented Mar 27, 2025

The earlier version I get the same error than above for Cargo.lock is nightly-2024-08-08. On the version nightly-2024-08-07, I get a different later in the build process:

➜  mina git:(dw/bump-rust-to-1.82) ✗ nix develop mina                                           
warning: Git tree '/home/soc/codes/o1-labs/mina' is dirty
warning: ignoring untrusted substituter 'https://storage.googleapis.com/mina-nix-cache', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
warning: ignoring the client-specified setting 'trusted-public-keys', because it is a restricted setting and you are not a trusted user
error: builder for '/nix/store/6v683dwqsh1rg5ppcc6mamy9p6dd3k0q-plonk_wasm-0.1.0.drv' failed with exit code 1;
       last 25 log lines:
       > Running phase: patchPhase
       > Executing cargoSetupPostPatchHook
       > Validating consistency between /build/source/lib/crypto/kimchi_bindings/wasm/Cargo.lock and /build/cargo-vendor-dir/Cargo.lock
       > Finished cargoSetupPostPatchHook
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > Running phase: buildPhase
       > ++ export 'RUSTFLAGS=-C target-feature=+atomics,+bulk-memory,+mutable-globals -C link-arg=--no-check-features -C link-arg=--max-memory=4294967296'
       > ++ RUSTFLAGS='-C target-feature=+atomics,+bulk-memory,+mutable-globals -C link-arg=--no-check-features -C link-arg=--max-memory=4294967296'
       > ++ wasm-pack build --mode no-install --target nodejs --out-dir /nix/store/q147h6nzvhfia76ik7z1wrzphs50f257-plonk_wasm-0.1.0/nodejs ./. -- --features nodejs
       > [INFO]: Checking for the Wasm target...
       > [INFO]: Compiling to Wasm...
       > warning: `/build/.cargo/config` is deprecated in favor of `config.toml`
       > note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
       > warning: `/build/.cargo/config` is deprecated in favor of `config.toml`
       > note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
       > warning: unused manifest key: build
       > warning: unused manifest key: target.wasm32-unknown-unknown.rustflags
       > error: no matching package named `compiler_builtins` found
       > location searched: registry `crates-io`
       > required by package `std v0.0.0 (/nix/store/8815ym98xw8av67dbi28cc6yb5lhavig-rust-1.82.0-nightly-2024-08-06-60d146580/lib/rustlib/src/rust/library/std)`
       > Error: Compiling your crate to WebAssembly failed
       > Caused by: Compiling your crate to WebAssembly failed
       > Caused by: failed to execute `cargo build`: exited with exit status: 101
       >   full command: cd "./." && "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown" "--features" "nodejs"
       For full logs, run 'nix-store -l /nix/store/6v683dwqsh1rg5ppcc6mamy9p6dd3k0q-plonk_wasm-0.1.0.drv'.
error: 1 dependencies of derivation '/nix/store/k0vcjr3xvhzzh0d0l5h31kknmdqg8d4s-mina-dev-env.drv' failed to build

It seems there is a clearly a relation between the comment above and the date (the comment mentioned 2024-08-05 but I would assume a day of delay). I guess the Nix configuration requires more changes. I am going to go deeper into the issues and PR the community opened.

I'm creating a branch dw/debugging-16794 to debug. The file debug-nix contains the logs.

@dannywillems
Copy link
Member Author

dannywillems commented Mar 27, 2025

Postponing the work to tomorrow. It seems it would end up being a long night otherwise as I am not a Nix expert.

@dannywillems
Copy link
Member Author

This comment will also probably important.

Base automatically changed from dw/bump-up-proof-systems-to-include-rust-82-support to compatible March 31, 2025 13:13
@dannywillems
Copy link
Member Author

Note: wasm-bindgen is a dependency of iana-time-zone, which is a dep for chrono, which is a dep of serde because we do not use no-std.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants