Skip to content

Commit 4d02c0c

Browse files
authored
Remove unused ComputeDataCommitment from built-in market (#1354)
1 parent ad4470f commit 4d02c0c

File tree

4 files changed

+1
-394
lines changed

4 files changed

+1
-394
lines changed

actors/market/src/lib.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub enum Method {
7676
VerifyDealsForActivation = 5,
7777
BatchActivateDeals = 6,
7878
OnMinerSectorsTerminate = 7,
79-
ComputeDataCommitment = 8,
79+
// ComputeDataCommitment = 8, // Deprecated
8080
CronTick = 9,
8181
// Method numbers derived from FRC-0042 standards
8282
AddBalanceExported = frc42_dispatch::method_hash!("AddBalance"),
@@ -736,24 +736,6 @@ impl Actor {
736736
Ok(())
737737
}
738738

739-
fn compute_data_commitment(
740-
rt: &impl Runtime,
741-
params: ComputeDataCommitmentParams,
742-
) -> Result<ComputeDataCommitmentReturn, ActorError> {
743-
rt.validate_immediate_caller_type(std::iter::once(&Type::Miner))?;
744-
745-
let st: State = rt.state()?;
746-
let proposal_array = st.get_proposal_array(rt.store())?;
747-
748-
let mut commds = Vec::with_capacity(params.inputs.len());
749-
for comm_input in params.inputs.iter() {
750-
let proposed_deals = get_proposals(&proposal_array, &comm_input.deal_ids, st.next_id)?;
751-
commds.push(compute_data_commitment(rt, &proposed_deals, comm_input.sector_type)?);
752-
}
753-
754-
Ok(ComputeDataCommitmentReturn { commds })
755-
}
756-
757739
fn cron_tick(rt: &impl Runtime) -> Result<(), ActorError> {
758740
rt.validate_immediate_caller_is(std::iter::once(&CRON_ACTOR_ADDR))?;
759741

@@ -1457,7 +1439,6 @@ impl ActorCode for Actor {
14571439
VerifyDealsForActivation => verify_deals_for_activation,
14581440
BatchActivateDeals => batch_activate_deals,
14591441
OnMinerSectorsTerminate => on_miner_sectors_terminate,
1460-
ComputeDataCommitment => compute_data_commitment,
14611442
CronTick => cron_tick,
14621443
GetBalanceExported => get_balance,
14631444
GetDealDataCommitmentExported => get_deal_data_commitment,

actors/market/src/types.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,6 @@ pub struct DealSpaces {
139139
pub verified_deal_space: BigInt,
140140
}
141141

142-
#[derive(Serialize_tuple, Deserialize_tuple, Debug, Clone, Eq, PartialEq)]
143-
pub struct ComputeDataCommitmentParams {
144-
pub inputs: Vec<SectorDataSpec>,
145-
}
146-
147-
#[derive(Serialize_tuple, Deserialize_tuple, Debug, Clone, Eq, PartialEq)]
148-
pub struct ComputeDataCommitmentReturn {
149-
pub commds: Vec<Cid>,
150-
}
151-
152142
/// A specialization of a array to deals.
153143
pub type DealArray<'bs, BS> = Array<'bs, DealProposal, BS>;
154144

0 commit comments

Comments
 (0)