Skip to content

reading cache directory during runtime without dir crate#5

Merged
markosg04 merged 5 commits into
a16z:mainfrom
LayerZero-Research:amir/recursion-compile-bug
Jan 12, 2026
Merged

reading cache directory during runtime without dir crate#5
markosg04 merged 5 commits into
a16z:mainfrom
LayerZero-Research:amir/recursion-compile-bug

Conversation

@RadNi

@RadNi RadNi commented Nov 22, 2025

Copy link
Copy Markdown
Contributor

dir crate can not be compiled by the verifier in jolt which leads to proof recursion failure.
This PR removes dir dependency and manually determines caching directory.

@markosg04 markosg04 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you! Please make sure to appease CI and also sign the commit if possible

Comment thread src/lib.rs Outdated
Comment on lines +113 to +115
#[cfg(feature = "disk-persistence")]
pub use setup::get_storage_dir;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

does this have to be re-exported / public api? If not then let's avoid that

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the re-exporting

Comment thread src/setup.rs Outdated
#[cfg(feature = "disk-persistence")]
fn get_storage_dir() -> Option<PathBuf> {
dirs::cache_dir().map(|mut path| {
pub fn get_storage_dir() -> Option<PathBuf> {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we have two functions: get_storage_path and get_storage_dir. Since we are making changes here, is it possible to just make it one function?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Merged the two in the new update

Comment thread tests/arkworks/setup.rs Outdated
if let Some(cache_dir) = dirs::cache_dir() {
if let Some(cache_dir) = get_storage_dir() {
let cache_file = cache_dir
.join("dory")

@markosg04 markosg04 Nov 23, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
.join("dory")

This might be adding an extra /dory now that I am looking at it, which would silently fail to clean up

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah I missed that. Fixed it now

@RadNi
RadNi force-pushed the amir/recursion-compile-bug branch 3 times, most recently from e8df2f0 to a098f89 Compare November 24, 2025 18:35
Signed-off-by: Amirhossein Khajehpour <khajepour.amirhossein@gmail.com>
Signed-off-by: Amirhossein Khajehpour <khajepour.amirhossein@gmail.com>
@RadNi
RadNi force-pushed the amir/recursion-compile-bug branch from a098f89 to 4d3e0ab Compare November 24, 2025 18:41

@markosg04 markosg04 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks a lot! Will merge this into the next release.

@RadNi
RadNi force-pushed the amir/recursion-compile-bug branch from d28dec9 to e578dac Compare November 30, 2025 00:29
@markosg04
markosg04 merged commit 4c341de into a16z:main Jan 12, 2026
5 checks passed
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.

2 participants