Skip to content
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

Add proof aggregation API #169

Merged
merged 54 commits into from
Jun 2, 2021
Merged

Add proof aggregation API #169

merged 54 commits into from
Jun 2, 2021

Conversation

cryptonemo
Copy link
Contributor

This PR is building on #166, so it's an alternative to it.

}

impl Drop for fil_AggregateProof {
fn drop(&mut self) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this leaks the error_msg if there is one

Copy link
Contributor Author

@cryptonemo cryptonemo May 18, 2021

Choose a reason for hiding this comment

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

It's not allocated/managed, it just points to a rust string from the ffi toolkit as far as I know (similar to all other usages of the error_msg)

Copy link
Contributor

Choose a reason for hiding this comment

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

If you implement Drop manually, you also need to drop error_msg. In other structs the #[derive(DropStructMacro)] implements Drop. Though in this case you can just use the DropStructMacro derive instead (see https://github.com/filecoin-project/rust-fil-ffi-toolkit/tree/master/drop-struct-macro-derive#readme for more information).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I see, will take a closer look. At one point, I may have needed to impl Drop rather than use the macro, but not sure that's the case any more.

@jennijuju jennijuju added the P1 label May 24, 2021
@BigLep BigLep added this to the Network Hyperdrive milestone May 27, 2021
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

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

Go side looks good

@cryptonemo
Copy link
Contributor Author

Requires filecoin-project/rust-fil-proofs#1395 and filecoin-project/rust-filecoin-proofs-api#51 and updated proofs releases before merging.

@cryptonemo
Copy link
Contributor Author

Also requires: filecoin-project/rust-fil-ffi-toolkit#6

@magik6k magik6k merged commit 8b97bd8 into master Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants