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

feat: return faulty sectors #134

Merged
merged 4 commits into from
Sep 10, 2020
Merged

feat: return faulty sectors #134

merged 4 commits into from
Sep 10, 2020

Conversation

vmx
Copy link
Contributor

@vmx vmx commented Sep 8, 2020

If Window PoSt fails, return the faulty sectors. They are part of the
error response. The faulty_sectors_len is the number of faulty sectors
(0 if there aren't any faulty sectors) and faulty_sectors_ptr points
to an array of unsigned 64-bit integers, representing the sector IDs.

rust/src/proofs/api.rs Outdated Show resolved Hide resolved
If Window PoSt fails, return the faulty sectors. They are part of the
error response. The `faulty_sectors_len` is the number of faulty sectors
(0 if there aren't any faulty sectors) and `faulty_sectors_ptr` points
to an array of unsigned 64-bit integers, representing the sector IDs.
@vmx
Copy link
Contributor Author

vmx commented Sep 9, 2020

This should NOT be merged until the corresponding Go changes (which should be pretty minimal) are in.

Cap int
}

(*sliceHeader)(unsafe.Pointer(&ptr)).Len = int(l) // don't worry about it
Copy link

Choose a reason for hiding this comment

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

Is this needed? Isn't just the fact that we are inerating up to l below enough?

Copy link
Contributor

@magik6k magik6k Sep 10, 2020

Choose a reason for hiding this comment

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

The generated cgo code doesn't set it, so we panic on out-of-bounds

@magik6k magik6k merged commit f640612 into master Sep 10, 2020
@vmx vmx deleted the faulty-sectors-error branch September 5, 2023 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants