-
Notifications
You must be signed in to change notification settings - Fork 79
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
Claim allocations processes batches by sector #1337
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
deal_space: deal_activation.nonverified_deal_space.clone(), | ||
} | ||
.zip(claim_res.sector_claims) | ||
.map(|(sector_deals, sector_claim)| ext::market::DealSpaces { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice this is so much better
actors/verifreg/src/types.rs
Outdated
pub all_or_nothing: bool, | ||
} | ||
|
||
#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize_tuple, Deserialize_tuple)] | ||
#[serde(transparent)] | ||
pub struct SectorAllocationClaimResult { | ||
pub struct SectorAllocationClaim { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this name is a bit confusing together with SectorAllocationClaims
Maybe SectorClaimSummary
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
I am seeing an integration test failure on |
actors/verifreg/src/lib.rs
Outdated
"all or nothing call contained failures: {}", | ||
batch_info.to_string() | ||
return Err(ActorError::checked( | ||
batch_info.fail_codes[0].code, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change to propagate the exit code from the firs failing item when all_or_nothing is true, rather than illegal argument, caused the integration test failure. I will revert it, though think perhaps propagating the code is better.
171eee4
to
662c463
Compare
811f8b6
to
dde209f
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1337 +/- ##
=======================================
Coverage 90.84% 90.85%
=======================================
Files 138 138
Lines 27350 27342 -8
=======================================
- Hits 24847 24841 -6
+ Misses 2503 2501 -2
|
This PR reworks the verified registry ClaimAllocations method to follow the same pattern as the built-in market's ActivateDeals. Claims are grouped by sector, and a failed claim will cause all claims for that sector to fail. The all-or-nothing flag requests any failure to cause an abort.
This doesn't change the observable behaviour today because all-or-nothing is always set to true. But it does follow a pattern for batching now established (#1310) in the market actor, and prepares for the flag to be false when miner APIs support it (e.g. with direct data onboarding).