DDO v1
What ddo_v1 Is For
ddo_v1 is the storage onboarding product for MK20. Use it when a client wants a provider to ingest a piece and run normal sealing/indexing flow, optionally tied to an external market contract.
Struct Definition
type DDOV1 struct {
Provider address.Address `json:"provider"`
StartEpoch *abi.ChainEpoch `json:"start_epoch"`
Duration abi.ChainEpoch `json:"duration"`
AllocationId *verifreg.AllocationId `json:"allocation_id,omitempty"`
MarketAddress string `json:"market_address"`
MarketDealID *uint64 `json:"market_deal_id"`
NotificationAddress address.Address `json:"notification_address"`
NotificationPayload []byte `json:"notification_payload,omitempty"`
}Required And Optional Fields
Required:
providerduration
Optional:
start_epochmarket_addressmarket_deal_id(required ifmarket_addressis set)notification_addressandnotification_payload(must be provided together)
allocation_id remains in the deal structure for previously accepted deals. Omit it when creating a deal or adding a new DDO product; Curio rejects new products with an allocation ID.
Field Behavior
start_epochis optional. If set, Curio validates it against chain head andExpectedPoRepSealDuration, and uses it as the deal schedule start during ingestion.durationis always part of the DDO payload and must be at least518400epochs for new deals.market_addressandmarket_deal_idopt the deal into external contract verification.notification_addressandnotification_payload, when set, are attached to the eventual piece activation manifest during ingestion. They are not evaluated byverifyDeal(...).
Core Validation Rules
ddo_v1must be enabled by the provider.Provider must be a valid address and not in MK20 disabled-miner config.
If
start_epochis set, it must be greater than0.New DDO products must omit
allocation_idand meet the minimum duration (>= 518400).If
market_addressis set, it must be a valid0xhex address.Notification address and payload must either both be set or both be unset.
Market Contract Verification
When market_address is provided, MK20 performs read-only contract verification before acceptance and during upload finalization.
Verification behavior:
Contract must exist in
ddo_contractsand be allowed.Contract must implement
CurioDealViewV1and returnversion() == 1.MK20 builds
CurioDealViewfrom local deal values and callsverifyDeal(...).verifyDeal(...)must returntrue.
This call checks whether the market contract accepts the proposed deal. It does not by itself guarantee payment, payout, or notification success.
Curio passes these values into verifyDeal(...):
dealIdstate=Openprovider actor id
client identity bytes
piece CID v2
start_epochor0duration
allocationId: always0, including for previously accepted deals with a stored allocation IDfinalizedEpoch=0
If verifyDeal reverts with DealNotFound(uint256), MK20 rejects the deal as market-missing.
Notification Callback Behavior
If both notification_address and notification_payload are set, Curio carries them into the piece activation manifest during ingestion as a DataActivationNotification.
Operationally:
This path runs later than
verifyDeal(...), during sector activation work.Contracts that rely on notification callbacks for settlement or state transitions should be reviewed separately from intake-time contract verification.
Provider setups that depend on notification callbacks generally keep
Subsystems.RequireNotificationSuccess = true(the default). See Default Curio Configuration.
Additional Sanitize Checks Before Pipeline Entry
retrieval_v1must be present.retrieval_v1.announce_piecemust be false.Provider must be in Curio miner set.
Deal data must be present.
Piece size must fit provider sector size.
Raw format cannot be indexed.
Notification address must resolve on chain when set.
Client must pass provider allow/deny policy.
If
start_epochis set, it must be greater than or equal to current chain height plusExpectedPoRepSealDuration.
Previously accepted deals retain their allocation fields, but processing no longer looks up allocations or applies allocation term constraints. Curio sends allocationId = 0 to verifyDeal(...), including during upload finalization of previously accepted deals, without changing the stored deal.
Last updated