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

Batch ClaimAllocations during ProveCommitAggregate #1304

Merged
merged 10 commits into from
Jun 5, 2023
19 changes: 14 additions & 5 deletions actors/miner/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub mod market {
}
}

#[derive(Serialize_tuple, Deserialize_tuple)]
#[derive(Serialize_tuple, Deserialize_tuple, Clone)]
pub struct ActivateDealsResult {
#[serde(with = "bigint_ser")]
pub nonverified_deal_space: BigInt,
Expand Down Expand Up @@ -207,13 +207,22 @@ pub mod verifreg {

#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
pub struct ClaimAllocationsParams {
pub sectors: Vec<SectorAllocationClaim>,
pub allocations: Vec<SectorAllocationClaim>,
pub all_or_nothing: bool,
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
pub struct ClaimAllocationsReturn {
pub batch_info: BatchReturn,

#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize_tuple, Deserialize_tuple)]
#[serde(transparent)]
pub struct SectorAllocationClaimResult {
#[serde(with = "bigint_ser")]
pub claimed_space: BigInt,
}

#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
#[serde(transparent)]
pub struct ClaimAllocationsReturn {
/// claim_results is parallel to ClaimAllocationsParams.allocations with failed allocations
/// being represented by claimed_space == BigInt::zero()
pub claim_results: Vec<SectorAllocationClaimResult>,
alexytsu marked this conversation as resolved.
Show resolved Hide resolved
}
}
Loading