Skip to content

Commit

Permalink
feat: add support for Non-interactive PoRep
Browse files Browse the repository at this point in the history
This commit adds support for ni-porep.

It also makes CI match the Rust version in the rust-toolchain.toml
  • Loading branch information
vmx committed May 7, 2024
1 parent 081367c commit fed4aba
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
3 changes: 1 addition & 2 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ c-headers = ["safer-ffi/headers"]
# This feature enables a fixed number of discarded rows for TreeR. The `FIL_PROOFS_ROWS_TO_DISCARD`
# setting is ignored, no `TemporaryAux` file will be written.
fixed-rows-to-discard = ["filecoin-proofs-api/fixed-rows-to-discard"]

[patch.crates-io]
filecoin-proofs-api = { git = "https://github.com/filecoin-project/rust-filecoin-proofs-api" }
1 change: 1 addition & 0 deletions rust/src/proofs/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,7 @@ pub mod tests {
RegisteredSealProof::StackedDrg2KiBV1,
RegisteredSealProof::StackedDrg2KiBV1_1,
RegisteredSealProof::StackedDrg2KiBV1_1_Feat_SyntheticPoRep,
RegisteredSealProof::StackedDrg2KiBV1_2_Feat_NonInteractivePoRep,
];
for version in versions {
info!("test_sealing_versions[{:?}]", version);
Expand Down
36 changes: 36 additions & 0 deletions rust/src/proofs/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ pub enum RegisteredSealProof {
StackedDrg512MiBV1_1_Feat_SyntheticPoRep,
StackedDrg32GiBV1_1_Feat_SyntheticPoRep,
StackedDrg64GiBV1_1_Feat_SyntheticPoRep,
StackedDrg2KiBV1_2_Feat_NonInteractivePoRep,
StackedDrg8MiBV1_2_Feat_NonInteractivePoRep,
StackedDrg512MiBV1_2_Feat_NonInteractivePoRep,
StackedDrg32GiBV1_2_Feat_NonInteractivePoRep,
StackedDrg64GiBV1_2_Feat_NonInteractivePoRep,
}

impl From<api::RegisteredSealProof> for RegisteredSealProof {
Expand Down Expand Up @@ -90,6 +95,21 @@ impl From<api::RegisteredSealProof> for RegisteredSealProof {
StackedDrg64GiBV1_1_Feat_SyntheticPoRep => {
RegisteredSealProof::StackedDrg64GiBV1_1_Feat_SyntheticPoRep
}
StackedDrg2KiBV1_2_Feat_NonInteractivePoRep => {
RegisteredSealProof::StackedDrg2KiBV1_2_Feat_NonInteractivePoRep
}
StackedDrg8MiBV1_2_Feat_NonInteractivePoRep => {
RegisteredSealProof::StackedDrg8MiBV1_2_Feat_NonInteractivePoRep
}
StackedDrg512MiBV1_2_Feat_NonInteractivecPoRep => {
RegisteredSealProof::StackedDrg512MiBV1_2_Feat_NonInteractivePoRep
}
StackedDrg32GiBV1_2_Feat_NonInteractivePoRep => {
RegisteredSealProof::StackedDrg32GiBV1_2_Feat_NonInteractivePoRep
}
StackedDrg64GiBV1_2_Feat_NonInteractivePoRep => {
RegisteredSealProof::StackedDrg64GiBV1_2_Feat_NonInteractivePoRep
}
}
}
}
Expand Down Expand Up @@ -125,6 +145,22 @@ impl From<RegisteredSealProof> for api::RegisteredSealProof {
RegisteredSealProof::StackedDrg64GiBV1_1_Feat_SyntheticPoRep => {
StackedDrg64GiBV1_1_Feat_SyntheticPoRep
}

RegisteredSealProof::StackedDrg2KiBV1_2_Feat_NonInteractivePoRep => {
StackedDrg2KiBV1_2_Feat_NonInteractivePoRep
}
RegisteredSealProof::StackedDrg8MiBV1_2_Feat_NonInteractivePoRep => {
StackedDrg8MiBV1_2_Feat_NonInteractivePoRep
}
RegisteredSealProof::StackedDrg512MiBV1_2_Feat_NonInteractivePoRep => {
StackedDrg512MiBV1_2_Feat_NonInteractivecPoRep
}
RegisteredSealProof::StackedDrg32GiBV1_2_Feat_NonInteractivePoRep => {
StackedDrg32GiBV1_2_Feat_NonInteractivePoRep
}
RegisteredSealProof::StackedDrg64GiBV1_2_Feat_NonInteractivePoRep => {
StackedDrg64GiBV1_2_Feat_NonInteractivePoRep
}
}
}
}
Expand Down

0 comments on commit fed4aba

Please sign in to comment.