Skip to content

Commit

Permalink
NI-PoRep (#1559)
Browse files Browse the repository at this point in the history
* feat(miner): ProveCommitSectorsNI and tests

* chore(niporep): fix parameter naming

* chore(niporep): improve test function name

* chore(niporep): check return values from method

* fix(niporep): hard-fail on future sector seal randomness

* fix(niporep): properly test aggregate fee payment at boundary

* test(miner): add niporep params cbor forms vector tests

* chore(miner): extract NI_AGGREGATE_FEE_BASE_SECTOR_COUNT constant

---------

Co-authored-by: Nemanja <[email protected]>
  • Loading branch information
rvagg and NemanjaLu92 authored Jun 25, 2024
1 parent 75fd61e commit 86fd57c
Show file tree
Hide file tree
Showing 17 changed files with 1,773 additions and 52 deletions.
38 changes: 19 additions & 19 deletions Cargo.lock

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

35 changes: 23 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ members = [
"runtime",
"test_vm",
"vm_api",
"integration_tests"
"integration_tests",
]

[workspace.package]
Expand Down Expand Up @@ -54,10 +54,16 @@ fil_actors_runtime = { workspace = true }
num-traits = { workspace = true }

[dependencies]
clap = { version = "4.3.0", features = ["derive", "std", "help", "usage", "error-context"], default-features = false }
clap = { version = "4.3.0", features = [
"derive",
"std",
"help",
"usage",
"error-context",
], default-features = false }

[features]
default = [] ## translates to mainnet
default = [] ## translates to mainnet
mainnet = []
caterpillarnet = []
butterflynet = []
Expand Down Expand Up @@ -110,22 +116,27 @@ rlp = { version = "0.5.1", default-features = false }
substrate-bn = { version = "0.6.0", default-features = false }

# IPLD/Encoding
cid = { version = "0.10.1", default-features = false, features = ["serde-codec", "std"] }
multihash = { version = "0.18.1", default-features = false , features = ["multihash-impl"]}
cid = { version = "0.10.1", default-features = false, features = [
"serde-codec",
"std",
] }
multihash = { version = "0.18.1", default-features = false, features = [
"multihash-impl",
] }
libipld-core = { version = "0.13.1", features = ["serde-codec"] }
integer-encoding = { version = "3.0.3", default-features = false }

# helix-onchain
fvm_actor_utils = "9.0.0"
frc42_dispatch = "5.0.0"
frc46_token = "9.0.0"
fvm_actor_utils = "11.0.0"
frc42_dispatch = "7.0.0"
frc46_token = "11.0.0"

# FVM
fvm_sdk = "~4.0"
fvm_shared = "~4.0"
fvm_sdk = "4.3.0"
fvm_shared = "4.3.0"
fvm_ipld_encoding = "0.4.0"
fvm_ipld_blockstore = "0.2.0"
fvm_ipld_hamt = "0.8.0"
fvm_ipld_hamt = "0.9.0"
fvm_ipld_kamt = "0.3.0"
fvm_ipld_amt = { version = "0.6.2" }
fvm_ipld_bitfield = "0.6.0"
Expand All @@ -149,7 +160,7 @@ fil_actor_system = { path = "actors/system" }
fil_actor_verifreg = { path = "actors/verifreg" }
fil_actors_evm_shared = { path = "actors/evm/shared" }
fil_actors_runtime = { path = "runtime" }
fil_builtin_actors_state = { path = "state"}
fil_builtin_actors_state = { path = "state" }
fil_actors_integration_tests = { version = "1.0.0", path = "integration_tests" }
vm_api = { version = "1.0.0", path = "vm_api" }
test_vm = { path = "test_vm" }
Expand Down
1 change: 1 addition & 0 deletions actors/miner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ lazy_static = { workspace = true }
log = { workspace = true }
byteorder = { workspace = true }
itertools = { workspace = true }
const-hex = { workspace = true }

[dev-dependencies]
fil_actors_runtime = { workspace = true, features = ["test_utils", "sector-default"] }
Expand Down
15 changes: 10 additions & 5 deletions actors/miner/src/commd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,20 @@ fn zero_commd(seal_proof: RegisteredSealProof) -> Result<Cid, ActorError> {
seal_proof.update_to_v1();
let i = match seal_proof {
RegisteredSealProof::StackedDRG2KiBV1P1
| RegisteredSealProof::StackedDRG2KiBV1P1_Feat_SyntheticPoRep => 0,
| RegisteredSealProof::StackedDRG2KiBV1P1_Feat_SyntheticPoRep
| RegisteredSealProof::StackedDRG2KiBV1P2_Feat_NiPoRep => 0,
RegisteredSealProof::StackedDRG512MiBV1P1
| RegisteredSealProof::StackedDRG512MiBV1P1_Feat_SyntheticPoRep => 1,
| RegisteredSealProof::StackedDRG512MiBV1P1_Feat_SyntheticPoRep
| RegisteredSealProof::StackedDRG512MiBV1P2_Feat_NiPoRep => 1,
RegisteredSealProof::StackedDRG8MiBV1P1
| RegisteredSealProof::StackedDRG8MiBV1P1_Feat_SyntheticPoRep => 2,
| RegisteredSealProof::StackedDRG8MiBV1P1_Feat_SyntheticPoRep
| RegisteredSealProof::StackedDRG8MiBV1P2_Feat_NiPoRep => 2,
RegisteredSealProof::StackedDRG32GiBV1P1
| RegisteredSealProof::StackedDRG32GiBV1P1_Feat_SyntheticPoRep => 3,
| RegisteredSealProof::StackedDRG32GiBV1P1_Feat_SyntheticPoRep
| RegisteredSealProof::StackedDRG32GiBV1P2_Feat_NiPoRep => 3,
RegisteredSealProof::StackedDRG64GiBV1P1
| RegisteredSealProof::StackedDRG64GiBV1P1_Feat_SyntheticPoRep => 4,
| RegisteredSealProof::StackedDRG64GiBV1P1_Feat_SyntheticPoRep
| RegisteredSealProof::StackedDRG64GiBV1P2_Feat_NiPoRep => 4,
_ => {
return Err(actor_error!(illegal_argument, "unknown SealProof"));
}
Expand Down
Loading

0 comments on commit 86fd57c

Please sign in to comment.