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

FIP-0076: Merge integration/direct-onboarding into master #1486

Merged
merged 32 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
181305e
Implement sector->deal mapping in built-in market actor (#1347)
anorth Aug 3, 2023
e55498d
Remove deprecated precommit methods (#1357)
anorth Aug 8, 2023
c5fd304
Implements SectorContentChanged method in built-in market actor (#1353)
anorth Aug 15, 2023
9c681c7
Implements new ProveCommit batch+aggregate for direct onboarding (#1380)
anorth Aug 28, 2023
ba9b579
Implement new ProveReplicaUpdates3 for direct data onboarding. (#1385)
anorth Aug 30, 2023
6a2a089
Miner notifies market of termination only of sectors with non-zero da…
anorth Aug 30, 2023
06f282a
Send SectorContentChanged from new onboarding methods (#1386)
anorth Aug 30, 2023
5de9cae
Compute batch returns for direct onboarding methods (#1393)
anorth Aug 31, 2023
c1aa98f
Basic unit tests for ProveReplicaUpdate3 (#1394)
anorth Sep 4, 2023
d78586f
Deprecate unused Prove Replica update 2 (#1401)
ZenGround0 Sep 4, 2023
e0083f4
Deprecate Deal IDs (#1402)
ZenGround0 Sep 5, 2023
0457d86
Remove allocation id from market deal state. Clean up and improve sta…
anorth Sep 5, 2023
a861f02
Return error if success count for proof validation or data activation…
shrenujbansal Sep 7, 2023
ff472f2
Prove commit 2 simple tests (#1408)
ZenGround0 Sep 7, 2023
24b5cd6
PRU2 tests that abort the whole method (#1407)
anorth Sep 8, 2023
869af32
Move prove_commit2 tests to separate file from pru tests (#1410)
anorth Sep 11, 2023
3354d8a
Tests and fixes for ProveReplicaUpdates2 (#1411)
anorth Sep 15, 2023
ff66f79
Check state invariants in direct onboarding tests (#1416)
anorth Sep 22, 2023
a108360
Tests for ProveCommitSectors2 for cases that abort entirely (#1414)
anorth Sep 27, 2023
47e1cf1
Tests for prove_commit_sectors2 (#1437)
anorth Oct 15, 2023
21c01a9
More tests for direct data onboarding (#1440)
anorth Oct 16, 2023
5cecdf6
Add GetDealSector exported API method to market actor (#1443)
anorth Oct 31, 2023
0f8c593
Integration test for prove_commit_sectors2 (#1450)
anorth Oct 31, 2023
5cdfc2f
Integration test for prove_replica_updates2 (#1453)
anorth Oct 31, 2023
53cb47e
Transparent serialization for ProveReplicaUpdates2Return (#1484)
anorth Dec 19, 2023
3ad21ac
Rename PCS2/PRU2 to PCS3/PRU3 (#1485)
anorth Dec 19, 2023
4126ccb
Add missing vm_test annotations. (#1488)
anorth Dec 21, 2023
9334a87
Add aggregate proof type parameter to ProveCommitSectors3 (#1489)
anorth Jan 8, 2024
049b9c7
chore: remove unnecessary clone of piece payload (#1494)
Stebalien Jan 15, 2024
84b0c00
Response to review on #1486 (#1499)
anorth Jan 16, 2024
db65674
Cleanup batch return merge logic (#1503)
Stebalien Jan 17, 2024
e671d69
More review response for #1486. (#1508)
anorth Jan 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions actors/market/src/deal.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2019-2022 ChainSafe Systems
// SPDX-License-Identifier: Apache-2.0, MIT

use crate::ext::verifreg::AllocationID;
use cid::{Cid, Version};
use fvm_ipld_encoding::tuple::*;
use fvm_ipld_encoding::BytesSer;
Expand All @@ -11,6 +10,7 @@ use fvm_shared::commcid::{FIL_COMMITMENT_UNSEALED, SHA2_256_TRUNC254_PADDED};
use fvm_shared::crypto::signature::Signature;
use fvm_shared::econ::TokenAmount;
use fvm_shared::piece::PaddedPieceSize;
use fvm_shared::sector::SectorNumber;
use libipld_core::ipld::Ipld;
use serde::{de, Deserialize, Deserializer, Serialize, Serializer};
use std::convert::{TryFrom, TryInto};
Expand Down Expand Up @@ -136,12 +136,12 @@ pub struct ClientDealProposal {

#[derive(Clone, Debug, PartialEq, Eq, Copy, Serialize_tuple, Deserialize_tuple)]
pub struct DealState {
// 0 if not yet included in proven sector (0 is also a valid sector number)
pub sector_number: SectorNumber,
rvagg marked this conversation as resolved.
Show resolved Hide resolved
// -1 if not yet included in proven sector
pub sector_start_epoch: ChainEpoch,
// -1 if deal state never updated
pub last_updated_epoch: ChainEpoch,
// -1 if deal never slashed
pub slash_epoch: ChainEpoch,
// ID of the verified registry allocation/claim for this deal's data (0 if none).
pub verified_claim: AllocationID,
}
46 changes: 46 additions & 0 deletions actors/market/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ pub mod account {

pub mod miner {
use super::*;
use cid::Cid;
use fvm_ipld_encoding::RawBytes;
use fvm_shared::clock::ChainEpoch;
use fvm_shared::piece::PaddedPieceSize;
use fvm_shared::sector::SectorNumber;
use fvm_shared::MethodNum;

pub const CONTROL_ADDRESSES_METHOD: u64 = 2;
pub const IS_CONTROLLING_ADDRESS_EXPORTED: u64 =
frc42_dispatch::method_hash!("IsControllingAddress");
pub const SECTOR_CONTENT_CHANGED: MethodNum =
frc42_dispatch::method_hash!("SectorContentChanged");

#[derive(Serialize_tuple, Deserialize_tuple)]
pub struct GetControlAddressesReturnParams {
Expand All @@ -47,6 +55,44 @@ pub mod miner {
pub struct IsControllingAddressParam {
pub address: Address,
}

#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
#[serde(transparent)]
pub struct SectorContentChangedParams {
pub sectors: Vec<SectorChanges>,
}

#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
pub struct SectorChanges {
pub sector: SectorNumber,
pub minimum_commitment_epoch: ChainEpoch,
pub added: Vec<PieceChange>,
}

#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
pub struct PieceChange {
pub data: Cid,
pub size: PaddedPieceSize,
pub payload: RawBytes,
}

#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
#[serde(transparent)]
pub struct SectorContentChangedReturn {
pub sectors: Vec<SectorReturn>,
}

#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
#[serde(transparent)]
pub struct SectorReturn {
pub added: Vec<PieceReturn>,
}

#[derive(Clone, Debug, PartialEq, Eq, Serialize_tuple, Deserialize_tuple)]
#[serde(transparent)]
pub struct PieceReturn {
pub accepted: bool,
}
}

pub mod verifreg {
Expand Down
Loading
Loading