-
Notifications
You must be signed in to change notification settings - Fork 7
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
Remove order when constructing a SRS object #46
Comments
Don't understand this issue so I might be totally out of context. But isn't the point of order that you might want to load LESS point than what the file as? Like my idea is we can always point to our 8GiB file for eg, but just download the subset of points that we need (say 16MiB). |
I don't think order is useful, probably just get rid of it |
So it's used in this check primarily https://github.com/Layr-Labs/rust-kzg-bn254/blob/master/prover/src/srs.rs#L32 |
I think we'll need to replace it with a check to make sure the points asked and size matters. This might involve disk ops which might be a problem for risczero VM's. Because i remember removing sysinfo cause of the problems compiling. Another option is we can store the max order for the file that we use. |
Not following. |
Yea right now considering the usage it looks the same but originally "order" had more meaning and uses if memory serves. It's not the VM not being able to handle, if someone requests more than what's available right now, with no check of file size it'll fail with a non clear error something on the lines of "data not available for buffer" or something similar. So the suggestion is we check the size of file so we can fail cleanly. Or we change the failing of the file reading function to differentiate between other errors and file not containing data. |
This is what makes the most sense to me. You request to read a number of points, and if you reach EOF while trying to read those points, you return an error. |
Order seems unneeded. If the file size is smaller than requested number of srs points, it would just fail.
rust-kzg-bn254/prover/src/srs.rs
Line 16 in df1ac7a
The text was updated successfully, but these errors were encountered: