Git Product home page Git Product logo

Comments (5)

flaub avatar flaub commented on June 9, 2024

This issue is only relevant for users that want to build from source. If users use the binary release, then this can be avoided. I don't know of any good alternatives at this time.

from risc0.

flaub avatar flaub commented on June 9, 2024

For using crates, the build script should download the ZKR from an S3 bucket, so crates from crates.io should work. If this isn't working as intended we can open a ticket for that issue.

from risc0.

weikengchen avatar weikengchen commented on June 9, 2024

Actually that is what I want to follow up next. So, for people who build from sources.

Would it help to let the build script ignore an un-pulled LFS metadata file with the same name?
https://github.com/risc0/risc0/blob/main/risc0/circuit/recursion/build.rs#L54C12-L54C12

Currently, the build script would copy-paste the zip file if it exists.

if std::fs::metadata(&src_path).is_ok() {
    let tgt_path = out_dir.join(FILENAME);
    std::fs::copy(&src_path, &tgt_path).unwrap();
}

But the one that exists could be the 133-byte LFS metadata file.

version https://git-lfs.github.com/spec/v1
oid sha256:ae5736a42189aec2f04936c3aee4b5441e48b26b4fa1fae28657cf50cdf3cae4
size 25527822

This would lead to an error:

thread '<unnamed>' panicked at /Users/cusgadmin/.cargo/git/checkouts/risc0-b4649977e2e81438/341a014/risc0/circuit/recursion/src/zkr.rs:29:71:
called `Result::unwrap()` on an `Err` value: InvalidArchive("Could not find central directory end")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
  File "/Users/cusgadmin/RustroverProjects/r0prover-python/test/test.py", line 33, in <module>
    receipt_1_lifted = l2_r0prover.lift_segment_receipt(receipt_1)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: InvalidArchive("Could not find central directory end")

It would be great if the build script, after seeing a file there that is definitely not the actual zip file (such as hash mismatch), would instead download it from the S3 bucket.

How do you think?

from risc0.

flaub avatar flaub commented on June 9, 2024

Sure, I'd welcome a PR for that, or one of us could try that at some point.

from risc0.

weikengchen avatar weikengchen commented on June 9, 2024

I will follow up on this with a PR.

from risc0.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.