Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Change Vsock to VirFs to tranfer files between the VM and the node. #136

Merged
merged 15 commits into from
Mar 14, 2024

Conversation

musitdev
Copy link
Contributor

Remove Vsock declarations in the Qemu VM start args.
Add VirtFs arguments.
Update file transfer logic.
Change the result management between VM and node to report more VM error in the submit result.

Copy link
Contributor

@tuommaki tuommaki left a comment

Choose a reason for hiding this comment

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

LGTM in general. Couple very minor nits / fix suggestions and one question about the tests prover's bigfile.

Comment on lines 24 to 25
.join(data_directory)
.join(&tx_hash.to_string())
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we put some intermediary directory here? Like data or txdata or something like that? Currently the transaction hashes are on the same level with images and log and it looks a bit weird. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I agree with you. I add the same idea but I didn't change because I wanted to keep things like they were.
I can add a directory in this PR or open a new PR to do the change?
I prefer data or files.

Copy link
Contributor

Choose a reason for hiding this comment

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

open a new PR to do the change?

Open a new PR so it's clearer that way 👍

I prefer data or files.

Both work for me. Possibly prefix with "tx" so it's absolutely obvious what it's about. 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've created the #138 issue.

crates/node/src/vmm/vm_server.rs Outdated Show resolved Hide resolved
crates/node/src/vmm/vm_server.rs Outdated Show resolved Hide resolved
crates/shim/src/lib.rs Outdated Show resolved Hide resolved
vec![String::from("/workspace/proof.dat")],
vec![
String::from(format!("{WORKSPACE_PATH}/proof.dat")),
String::from(format!("{WORKSPACE_PATH}/bigfile.bin")),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this file be generated during runtime?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted an easy way to transfer a big file from prover to verifier for test, so I was thinking of using the same file was easier.
It was only for test, and at some point perhaps we should revert to a more playful example.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I get that. I was just thinking if this code works as-is on a new installation? I mean, would the end user need to put that "bigfile.bin" somewhere in order to make this work or does that somehow work already out-of-the-box?

Copy link
Contributor

@tuommaki tuommaki left a comment

Choose a reason for hiding this comment

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

If everything works, let's roll with this 🙂

@musitdev musitdev merged commit 8752850 into main Mar 14, 2024
4 checks passed
@musitdev musitdev deleted the transfert_big_files branch March 14, 2024 12:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants