Skip to content

Commit

Permalink
feat: make 1GiB sector harder
Browse files Browse the repository at this point in the history
  • Loading branch information
Konrad Stepniak committed Feb 18, 2025
1 parent 8e96f1d commit 62f204b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions filecoin-proofs/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ lazy_static! {
(SECTOR_SIZE_8_MIB, 1),
(SECTOR_SIZE_16_MIB, 1),
(SECTOR_SIZE_512_MIB, 1),
(SECTOR_SIZE_1_GIB, 1),
(SECTOR_SIZE_1_GIB, 5),
(SECTOR_SIZE_32_GIB, 10),
(SECTOR_SIZE_64_GIB, 10),
]
Expand All @@ -88,6 +88,8 @@ lazy_static! {
(SECTOR_SIZE_8_MIB, 2),
(SECTOR_SIZE_16_MIB, 2),
(SECTOR_SIZE_512_MIB, 2),
// When we try to set different number of layers, it fails (src/stacked/circuit/hash.rs)
// When try to set 11, it is killed on OOM
(SECTOR_SIZE_1_GIB, 2),
(SECTOR_SIZE_32_GIB, 11),
(SECTOR_SIZE_64_GIB, 11),
Expand All @@ -108,7 +110,7 @@ lazy_static! {
(SECTOR_SIZE_8_MIB, 2),
(SECTOR_SIZE_16_MIB, 2),
(SECTOR_SIZE_512_MIB, 2),
(SECTOR_SIZE_1_GIB, 2),
(SECTOR_SIZE_1_GIB, 6),
(SECTOR_SIZE_32_GIB, 2349), // this gives 125,279,217 constraints, fitting in a single partition
(SECTOR_SIZE_64_GIB, 2300), // this gives 129,887,900 constraints, fitting in a single partition
]
Expand All @@ -123,7 +125,8 @@ lazy_static! {
pub(crate) const fn get_porep_interactive_minimum_challenges(sector_size: u64) -> usize {
match sector_size {
SECTOR_SIZE_2_KIB | SECTOR_SIZE_4_KIB | SECTOR_SIZE_16_KIB | SECTOR_SIZE_32_KIB
| SECTOR_SIZE_8_MIB | SECTOR_SIZE_16_MIB | SECTOR_SIZE_512_MIB | SECTOR_SIZE_1_GIB => 2,
| SECTOR_SIZE_8_MIB | SECTOR_SIZE_16_MIB | SECTOR_SIZE_512_MIB => 2,
SECTOR_SIZE_1_GIB => 69,
SECTOR_SIZE_32_GIB | SECTOR_SIZE_64_GIB => 176,
_ => panic!("invalid sector size"),
}
Expand Down

0 comments on commit 62f204b

Please sign in to comment.