-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add distributed PoSt API #135
Conversation
|
@nemo You need to run clippy with the |
Wow, this CI took forever but passed! Still missing is the glue in |
5cb7fa8
to
cf838fb
Compare
Nice work, thanks @Kubuxu! |
@cryptonemo this is done as far as go side goes. |
@Kubuxu This tests well here. I think we are good to go on both sides now! @porcuquine or @dignifiedquire for final approval? |
0c72421
to
051b379
Compare
fix: ensures all tests pass
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
810f08d
to
3968117
Compare
rust/src/proofs/types.rs
Outdated
clone.proof_ptr as *mut core::ffi::c_void, | ||
self.proof_ptr as *const core::ffi::c_void, | ||
self.proof_len, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while the above works, it should be safer and less error prone to do
let slice: &[u8] = unsafe { std::slice::from_raw_parts(self.proof_ptr, self.proof_len) };
let cloned: Vec<u8> = slice.to_vec();
debug_assert_eq!(self.proof_len, cloned.len());
let proof_ptr = cloned.as_ptr();
mem::forget(cloned);
fil_VanillaProof {
proof_len: self.proof_len,
proof_ptr,
}
this way it is guranteed that reconstructing this will actually work as expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one comment, other than that looks good to me
Relies on filecoin-project/rust-fil-proofs#1283 and filecoin-project/rust-filecoin-proofs-api#41
This work does NOT yet include the proofs.go updates required. I will look at that next unless @magik6k or @Kubuxu can get to it quicker.@dignifiedquire This may have issues, but I fixed the specific nastiness I was fighting earlier.