@@ -84,21 +84,21 @@ built-in storage market (or any future market).
84
84
```
85
85
struct Allocation {
86
86
// The verified client which allocated the DataCap.
87
- Client: Address
87
+ Client: ActorID
88
88
// The provider (miner actor) which may claim the allocation.
89
- Provider: Address
89
+ Provider: ActorID
90
90
// Identifier of the data to be committed.
91
91
Data: CID
92
92
// The (padded) size of data.
93
93
Size: uint64
94
94
// The minimum duration which the provider must commit to storing the piece to avoid
95
95
// early-termination penalties (epochs).
96
- TermMinimum: uint64
96
+ TermMinimum: int64
97
97
// The maximum period for which a provider can earn quality-adjusted power
98
98
// for the piece (epochs).
99
- TermMaximum: uint64
99
+ TermMaximum: int64
100
100
// The latest epoch by which a provider must commit data before the allocation expires.
101
- Expiration: Epoch
101
+ Expiration: int64
102
102
// Whether the provider can commit the data in multiple pieces.
103
103
// This is initially un-used, but supports allocations larger than a full sector in the future.
104
104
AllowRanges: bool
@@ -129,7 +129,7 @@ struct State {
129
129
130
130
// Allocations indexed by client, then by ID.
131
131
Allocations: HAMT[Address]HAMT[AllocationID]Allocation
132
-
132
+
133
133
// Sequence number for allocation IDs.
134
134
// The value `0` is reserved for "no allocation"
135
135
NextAllocationId: AllocationID // uint64
@@ -150,7 +150,7 @@ The verified registry provides a new method to process removals, replacing `Rest
150
150
151
151
```
152
152
struct RemoveExpiredAllocationsParams {
153
- Client: Address // client to clean up (need not be the caller)
153
+ Client: ActorID // client to clean up (need not be the caller)
154
154
AllocationIDs: []AllocationID // empty for "all", or specify a set
155
155
}
156
156
@@ -190,19 +190,19 @@ data, and corresponding benefit of incentivized storage power.
190
190
```
191
191
struct Claim {
192
192
// The provider storing the data (from allocation).
193
- Provider: Address
193
+ Provider: ActorID
194
194
// The client which allocated the DataCap (from allocation).
195
- Client: Address
195
+ Client: ActorID
196
196
// Identifier of the data committed (from allocation).
197
197
Data: CID
198
198
// The (padded) size of data (from allocation).
199
199
Size: uint64
200
200
// The minimum period which the provider must commit to storing the piece (from allocation).
201
- TermMinimum: uint64
201
+ TermMinimum: int64
202
202
// The maximum period for which the provider can earn QA-power for the piece (from allocation).
203
- TermMaximum: uint64
203
+ TermMaximum: int64
204
204
// The epoch at which the (first range of the) piece was committed.
205
- TermStart: uint64
205
+ TermStart: int64
206
206
// ID of the provider's sector in which the data is committed.
207
207
Sector uint64
208
208
}
@@ -229,7 +229,7 @@ data cap tokens from its balance.
229
229
```
230
230
struct SectorAllocationClaim {
231
231
// Client of the allocation being claimed.
232
- Client: Address
232
+ Client: ActorID
233
233
// The allocation being claimed.
234
234
AllocationID: AllocationID
235
235
// The piece data committed (either the allocations data, or a part of it).
@@ -266,7 +266,7 @@ The record of a claim may be removed after the term maximum has elapsed.
266
266
267
267
```
268
268
struct RemoveExpiredClaimsParams {
269
- Provider: Address // provider to clean up (need not be the caller)
269
+ Provider: ActorID // provider to clean up (need not be the caller)
270
270
ClaimIDs: []ClaimID // empty for "all", or specify a set
271
271
}
272
272
@@ -292,7 +292,7 @@ A client of a claim may increase its maximum term up to `MaximumVerifiedAllocati
292
292
293
293
```
294
294
struct ClaimTerm {
295
- Provider: Address // needed to find claim in state
295
+ Provider: ActorID // needed to find claim in state
296
296
ClaimID: ClaimID
297
297
TermMaximum: int64 // new duration in epochs from TermStart
298
298
}
@@ -379,19 +379,35 @@ The registry rejects the transfer if the sum of sizes does not match the amount
379
379
// A request to create an allocation with datacap tokens.
380
380
// Field semantics match the Allocation structure.
381
381
struct AllocationRequest {
382
- Provider: Address
382
+ // The provider (miner actor) which may claim the allocation.
383
+ // (Historical note: network version 17 introduced this type with an Address for this field but
384
+ // it was switched to an ActorID for network version 18 and later.)
385
+ Provider: ActorID
386
+ // Identifier of the data to be committed.
383
387
Data: Cid
388
+ // The (padded) size of data.
384
389
Size: PaddedPieceSize
385
- TermMin: ChainEpoch
386
- TermMax: ChainEpoch
387
- Expiration: ChainEpoch
390
+ // The minimum duration which the provider must commit to storing the piece to avoid
391
+ // early-termination penalties (epochs).
392
+ TermMin: int64
393
+ // The maximum period for which a provider can earn quality-adjusted power
394
+ // for the piece (epochs).
395
+ TermMax: int64
396
+ // The latest epoch by which a provider must commit data before the allocation expires.
397
+ Expiration: int64
388
398
}
389
399
390
400
// A request to extend the term of an existing claim with datacap tokens.
391
401
struct ClaimExtensionRequest {
392
- Provider: Address
402
+ // The provider (miner actor) which may claim the allocation.
403
+ // (Historical note: network version 17 introduced this type with an Address for this field but
404
+ // it was switched to an ActorID for network version 18 and later.)
405
+ Provider: ActorID
406
+ // Identifier of the claim to be extended.
393
407
Claim: ClaimID
394
- TermMax: ChainEpoch
408
+ // The new maximum period for which a provider can earn quality-adjusted power
409
+ // for the piece (epochs).
410
+ TermMax: int64
395
411
}
396
412
397
413
// Operator-data payload for a datacap token transfer receiver hook.
@@ -854,5 +870,15 @@ will then grant maximal per-byte quality-adjusted power for the sector's full li
854
870
Implementation is in progress on the ` decouple-fil+ ` branch of the built-in actors repository:
855
871
https://github.com/filecoin-project/builtin-actors/tree/decouple-fil+ .
856
872
873
+ ## Historical notes
874
+
875
+ This FIP was originally accepted with "Address" in most places where "ActorID" is now used within
876
+ the types in this document. However, these were implemented and launched in network version 17 as
877
+ ActorID.
878
+
879
+ Both ` ClaimExtensionRequest ` and ` AllocationRequest ` were originally defined with an ` Address ` field
880
+ for the provider and this remained in the implementation for network version 17. However, this was
881
+ changed to ` ActorID ` for network version 18 and later.
882
+
857
883
## Copyright
858
884
Copyright and related rights waived via [ CC0] ( https://creativecommons.org/publicdomain/zero/1.0/ ) .
0 commit comments