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

refactor: Improve cargo prove build reproducibility #151

Merged
merged 1 commit into from
Aug 16, 2024
Merged

Conversation

huitseeker
Copy link
Contributor

@huitseeker huitseeker commented Aug 16, 2024

  • Added a '-Ztrim-paths' argument to the 'cargo_args' vector.
  • Added a provisional solution to enable 'trim-paths', linking the associated Rust issue for context.

Fixes argumentcomputer/zk-light-clients#40

Before:

huitseeker@binky➜examples/lcs/program(remap-paths✗)» strings elf/riscv32im-succinc
t-zkvm-elf|grep io
deserialization failed
a formatting trait implementation returned an error
vec is too large) when slicing `assertion `left range end index PermissionDenied right` failed: AddrNotAvailable0123456789abcdef`
/Users/huitseeker/tmp/sphinx/zkvm/precompiles/src/io.rs
/Users/huitseeker/tmp/sphinx/zkvm/entrypoint/src/syscalls/io.rs
assertion failed: SYSTEM_START >= heap_pos/Users/huitseeker/tmp/sphinx/zkvm/entryp
oint/src/syscalls/memory.rs

After:

huitseeker@binky➜examples/lcs/program(remap-paths✗)» strings elf/riscv32im-succinct-zkvm-elf|grep io
deserialization failed
a formatting trait implementation returned an error
vec is too large) when slicing `assertion `left range end index PermissionDenied right` failed: AddrNotAvailable0123456789abcdef`
sphinx-precompiles-1.0.0/src/io.rs
sphinx-zkvm-1.0.0/src/syscalls/io.rs
assertion failed: SYSTEM_START >= heap_possphinx-zkvm-1.0.0/src/syscalls/memory.rs

QoL: this should reduce our own diff count through path normalization.

@huitseeker huitseeker requested a review from wwared August 16, 2024 14:55
- Added a '-Ztrim-paths' argument to the 'cargo_args' vector.
- Added a provisional solution to enable 'trim-paths', linking the associated Rust issue for context.

Fixes argumentcomputer/zk-light-clients#40
@huitseeker huitseeker enabled auto-merge (rebase) August 16, 2024 16:30
@huitseeker huitseeker disabled auto-merge August 16, 2024 16:30
@huitseeker huitseeker enabled auto-merge (squash) August 16, 2024 16:30
Copy link
Contributor

@wwared wwared left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@huitseeker huitseeker merged commit ba8a1c0 into dev Aug 16, 2024
10 checks passed
@huitseeker huitseeker deleted the remap-paths branch August 16, 2024 18:03
@huitseeker huitseeker mentioned this pull request Sep 9, 2024
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.

Docker container for more reproducible builds of RISC-V artifacts
2 participants