Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

sort CommRs by sector id #27

Closed
wants to merge 1 commit into from

Conversation

laser
Copy link
Contributor

@laser laser commented Sep 20, 2019

Fixes #23

Why does this PR exist?

PoSt generation and verification require their input CommRs be provided in the same order. @whyrusleeping pointed out that we're sorting on replica-bytes and we could be sorting by sector id instead.

What's in this PR?

This PR updates the sorter to use sector id instead of bytes, and adds a JSON marshal/unmarshal method pair as per @anorth.

Copy link
Contributor

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

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

It makes little sense to change this, unless you also change the ordering in rust-fil-proofs: https://github.com/filecoin-project/rust-fil-proofs/blob/master/filecoin-proofs/src/api/post.rs#L35-L45

@whyrusleeping
Copy link
Member

@dignifiedquire part of my request was that I already have the sectors sorted by sector ID, no need to spend any more time sorting them by something else (especially since this will be happening inside the VM)

@laser
Copy link
Contributor Author

laser commented Sep 21, 2019 via email

@laser laser changed the title sort CommRs by sector id + add JSON marshal/unmarshal methods sort CommRs by sector id Sep 24, 2019
@laser laser force-pushed the feat/23-sort-commitments-by-sector-id branch from ddc1458 to b7c5745 Compare September 24, 2019 21:39
@laser laser force-pushed the feat/23-sort-commitments-by-sector-id branch from b7c5745 to 6153cd8 Compare September 24, 2019 21:40
@laser
Copy link
Contributor Author

laser commented Nov 19, 2019

This PR has been stale for several weeks; closing.

@laser laser closed this Nov 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sort sector infos for GeneratePost by sector ID
3 participants