You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm unsure if current rust implementation of add_piece is intended to be compatible with lotus or lotus ways of adding new piece but it seems to be vastly different from lotus implementation.
When calling add_piece, it seems like the data needs to be fr32 padded and truncated to padded size (zeroes appended to the right side of the piece.
When calling add_piece where payload size is 1166 B, unpadded piece size is 2032 B and padded piece size is 2048 B I get following error
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: add_piece: invalid bytes amount written'
.. with only 1174 B of unpadded data written to the output car file during `add_piece.
Acceptance criteria
Being able to add piece without needing to previously pad and or truncate file to padded size
Risks + pitfalls
Possibly breaking current implementations using this add_piece implementation
IIRC there was a discussion about the API back in the days. It was decided that Lotus hands a piece in the correct shape to the proofs system. I don't see a need that the APIs need to match, as Lotus operates on a higher level than the proofs system.
Description
I'm unsure if current rust implementation of
add_piece
is intended to be compatible with lotus or lotus ways of adding new piece but it seems to be vastly different from lotus implementation.When calling
add_piece
, it seems like the data needs to be fr32 padded and truncated to padded size (zeroes appended to the right side of the piece.When calling
add_piece
where payload size is1166 B
, unpadded piece size is2032 B
and padded piece size is2048 B
I get following error.. with only
1174 B
of unpadded data written to the output car file during `add_piece.Acceptance criteria
Risks + pitfalls
add_piece
implementationWhere to begin
This is where the error happens
The text was updated successfully, but these errors were encountered: