This repository has been archived by the owner on Jun 6, 2023. It is now read-only.
/
deal.go
52 lines (48 loc) · 2 KB
/
deal.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
package market
import (
market0 "github.com/filecoin-project/specs-actors/actors/builtin/market"
)
//var PieceCIDPrefix = cid.Prefix{
// Version: 1,
// Codec: cid.FilCommitmentUnsealed,
// MhType: mh.SHA2_256_TRUNC254_PADDED,
// MhLength: 32,
//}
var PieceCIDPrefix = market0.PieceCIDPrefix
// Note: Deal Collateral is only released and returned to clients and miners
// when the storage deal stops counting towards power. In the current iteration,
// it will be released when the sector containing the storage deals expires,
// even though some storage deals can expire earlier than the sector does.
// Collaterals are denominated in PerEpoch to incur a cost for self dealing or
// minimal deals that last for a long time.
// Note: ClientCollateralPerEpoch may not be needed and removed pending future confirmation.
// There will be a Minimum value for both client and provider deal collateral.
//type DealProposal struct {
// PieceCID cid.Cid `checked:"true"` // Checked in validateDeal, CommP
// PieceSize abi.PaddedPieceSize
// VerifiedDeal bool
// Client addr.Address
// Provider addr.Address
//
// // Label is an arbitrary client chosen label to apply to the deal
// // TODO: Limit the size of this: https://github.com/filecoin-project/specs-actors/issues/897
// Label string
//
// // Nominal start epoch. Deal payment is linear between StartEpoch and EndEpoch,
// // with total amount StoragePricePerEpoch * (EndEpoch - StartEpoch).
// // Storage deal must appear in a sealed (proven) sector no later than StartEpoch,
// // otherwise it is invalid.
// StartEpoch abi.ChainEpoch
// EndEpoch abi.ChainEpoch
// StoragePricePerEpoch abi.TokenAmount
//
// ProviderCollateral abi.TokenAmount
// ClientCollateral abi.TokenAmount
//}
type DealProposal = market0.DealProposal
// ClientDealProposal is a DealProposal signed by a client
//type ClientDealProposal struct {
// Proposal DealProposal
// ClientSignature crypto.Signature
//}
type ClientDealProposal = market0.ClientDealProposal