filecoin 0.0.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +139 -10
- package/bin/filecoin.js +7 -0
- package/dist/chunks/_esm-BBXTTBLC.js +9 -0
- package/dist/chunks/_esm-BBXTTBLC.js.map +7 -0
- package/dist/chunks/ccip-TGFMQFIR.js +3 -0
- package/dist/chunks/ccip-TGFMQFIR.js.map +7 -0
- package/dist/chunks/chunk-2VZELE36.js +124 -0
- package/dist/chunks/chunk-2VZELE36.js.map +7 -0
- package/dist/chunks/chunk-35V77X3C.js +12 -0
- package/dist/chunks/chunk-35V77X3C.js.map +7 -0
- package/dist/chunks/chunk-3TJUKWFC.js +6 -0
- package/dist/chunks/chunk-3TJUKWFC.js.map +7 -0
- package/dist/chunks/chunk-63JLHZEK.js +4 -0
- package/dist/chunks/chunk-63JLHZEK.js.map +7 -0
- package/dist/chunks/chunk-72RYXITT.js +186 -0
- package/dist/chunks/chunk-72RYXITT.js.map +7 -0
- package/dist/chunks/chunk-7MEK5RQ7.js +11 -0
- package/dist/chunks/chunk-7MEK5RQ7.js.map +7 -0
- package/dist/chunks/chunk-AKXAQJ6H.js +3 -0
- package/dist/chunks/chunk-AKXAQJ6H.js.map +7 -0
- package/dist/chunks/chunk-ASZ5KTWE.js +4 -0
- package/dist/chunks/chunk-ASZ5KTWE.js.map +7 -0
- package/dist/chunks/chunk-BFBNDHQG.js +3 -0
- package/dist/chunks/chunk-BFBNDHQG.js.map +7 -0
- package/dist/chunks/chunk-BZITZ3BI.js +3 -0
- package/dist/chunks/chunk-BZITZ3BI.js.map +7 -0
- package/dist/chunks/chunk-CIVQHT3F.js +5 -0
- package/dist/chunks/chunk-CIVQHT3F.js.map +7 -0
- package/dist/chunks/chunk-DHTPICN4.js +4 -0
- package/dist/chunks/chunk-DHTPICN4.js.map +7 -0
- package/dist/chunks/chunk-FCVBKUS5.js +4 -0
- package/dist/chunks/chunk-FCVBKUS5.js.map +7 -0
- package/dist/chunks/chunk-GCPUMM4E.js +3 -0
- package/dist/chunks/chunk-GCPUMM4E.js.map +7 -0
- package/dist/chunks/chunk-IAJFQYLN.js +4 -0
- package/dist/chunks/chunk-IAJFQYLN.js.map +7 -0
- package/dist/chunks/chunk-JFBUOLJ3.js +3 -0
- package/dist/chunks/chunk-JFBUOLJ3.js.map +7 -0
- package/dist/chunks/chunk-JUFFOBKU.js +59 -0
- package/dist/chunks/chunk-JUFFOBKU.js.map +7 -0
- package/dist/chunks/chunk-K63EJUGU.js +4 -0
- package/dist/chunks/chunk-K63EJUGU.js.map +7 -0
- package/dist/chunks/chunk-MWVOEA6K.js +4 -0
- package/dist/chunks/chunk-MWVOEA6K.js.map +7 -0
- package/dist/chunks/chunk-QRFSFJOZ.js +3 -0
- package/dist/chunks/chunk-QRFSFJOZ.js.map +7 -0
- package/dist/chunks/chunk-RK6JJQZL.js +41 -0
- package/dist/chunks/chunk-RK6JJQZL.js.map +7 -0
- package/dist/chunks/chunk-YIAP3JO3.js +3 -0
- package/dist/chunks/chunk-YIAP3JO3.js.map +7 -0
- package/dist/chunks/chunk-YVRWI5E3.js +3 -0
- package/dist/chunks/chunk-YVRWI5E3.js.map +7 -0
- package/dist/chunks/chunk-Z6O5SHUU.js +3 -0
- package/dist/chunks/chunk-Z6O5SHUU.js.map +7 -0
- package/dist/chunks/delete-BO7K4456.js +3 -0
- package/dist/chunks/delete-BO7K4456.js.map +7 -0
- package/dist/chunks/doctor-NF75MDBO.js +3 -0
- package/dist/chunks/doctor-NF75MDBO.js.map +7 -0
- package/dist/chunks/get-3EC2XCFH.js +3 -0
- package/dist/chunks/get-3EC2XCFH.js.map +7 -0
- package/dist/chunks/inspect-FDI442BE.js +3 -0
- package/dist/chunks/inspect-FDI442BE.js.map +7 -0
- package/dist/chunks/inspect-RJCGSGKG.js +3 -0
- package/dist/chunks/inspect-RJCGSGKG.js.map +7 -0
- package/dist/chunks/login-NNTYQ37I.js +4 -0
- package/dist/chunks/login-NNTYQ37I.js.map +7 -0
- package/dist/chunks/logout-3RWZFH2E.js +3 -0
- package/dist/chunks/logout-3RWZFH2E.js.map +7 -0
- package/dist/chunks/ls-F546AXRG.js +3 -0
- package/dist/chunks/ls-F546AXRG.js.map +7 -0
- package/dist/chunks/ls-GNEVBKRP.js +3 -0
- package/dist/chunks/ls-GNEVBKRP.js.map +7 -0
- package/dist/chunks/map-error-QLS3CQMO.js +3 -0
- package/dist/chunks/map-error-QLS3CQMO.js.map +7 -0
- package/dist/chunks/put-FXMGPSU6.js +3 -0
- package/dist/chunks/put-FXMGPSU6.js.map +7 -0
- package/dist/chunks/resume-G5PS246S.js +3 -0
- package/dist/chunks/resume-G5PS246S.js.map +7 -0
- package/dist/chunks/secp256k1-2OHXXNYZ.js +3 -0
- package/dist/chunks/secp256k1-2OHXXNYZ.js.map +7 -0
- package/dist/chunks/skills.run-E7FJPXEM.js +5 -0
- package/dist/chunks/skills.run-E7FJPXEM.js.map +7 -0
- package/dist/chunks/status-HOLDXKMR.js +3 -0
- package/dist/chunks/status-HOLDXKMR.js.map +7 -0
- package/dist/main.js +3 -0
- package/dist/main.js.map +7 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +49 -10
- package/skills/filecoin/SKILL.md +41 -0
- package/basic_types.md +0 -94
- package/chain.md +0 -280
- package/index.js +0 -1
- package/messages.md +0 -1684
- package/state.md +0 -1415
package/state.md
DELETED
|
@@ -1,1415 +0,0 @@
|
|
|
1
|
-
# Filecoin Actor State Data Structures
|
|
2
|
-
|
|
3
|
-
* [InitActor](#initactor)
|
|
4
|
-
* [v0](#v0)
|
|
5
|
-
* [v2](#v2)
|
|
6
|
-
* [CronActor](#cronactor)
|
|
7
|
-
* [v0](#v0-1)
|
|
8
|
-
* [v2](#v2-1)
|
|
9
|
-
* [RewardActor](#rewardactor)
|
|
10
|
-
* [v0](#v0-2)
|
|
11
|
-
* [v2](#v2-2)
|
|
12
|
-
* [AccountActor](#accountactor)
|
|
13
|
-
* [v0](#v0-3)
|
|
14
|
-
* [v2](#v2-3)
|
|
15
|
-
* [StorageMarketActor](#storagemarketactor)
|
|
16
|
-
* [v0](#v0-4)
|
|
17
|
-
* [v2](#v2-4)
|
|
18
|
-
* [StorageMinerActor](#storagemineractor)
|
|
19
|
-
* [v0](#v0-5)
|
|
20
|
-
* [v2](#v2-5)
|
|
21
|
-
* [MultisigActor](#multisigactor)
|
|
22
|
-
* [v0](#v0-6)
|
|
23
|
-
* [v2](#v2-6)
|
|
24
|
-
* [PaymentChannelActor](#paymentchannelactor)
|
|
25
|
-
* [v0](#v0-7)
|
|
26
|
-
* [v2](#v2-7)
|
|
27
|
-
* [StoragePowerActor](#storagepoweractor)
|
|
28
|
-
* [v0](#v0-8)
|
|
29
|
-
* [v2](#v2-8)
|
|
30
|
-
* [VerifiedRegistryActor](#verifiedregistryactor)
|
|
31
|
-
* [v0](#v0-9)
|
|
32
|
-
* [v2](#v2-9)
|
|
33
|
-
* [SystemActor](#systemactor)
|
|
34
|
-
* [v0](#v0-10)
|
|
35
|
-
* [v2](#v2-10)
|
|
36
|
-
|
|
37
|
-
The Actor State tree attaches to the main chain via the `ParentStateRoot` field of `BlockHeader`. This field either points directly to the `ActorsHAMT` in v0 or via the intermediate `StateRoot` from v2.
|
|
38
|
-
|
|
39
|
-
See [Actor type linking](chain.md#actor-type-linking) for how each of the Actor State blocks below are attached to and differentiated within the `ActorsHAMT`.
|
|
40
|
-
|
|
41
|
-
## InitActor
|
|
42
|
-
|
|
43
|
-
The InitActor state is the same in v0 and v2.
|
|
44
|
-
|
|
45
|
-
### v0
|
|
46
|
-
|
|
47
|
-
<a name="initv0state"></a>
|
|
48
|
-
|
|
49
|
-
```ipldsch
|
|
50
|
-
type InitV0State struct {
|
|
51
|
-
AddressMap &ActorIDHAMT # HAMT[Address]ActorID
|
|
52
|
-
NextID ActorID
|
|
53
|
-
NetworkName String
|
|
54
|
-
} representation tuple
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### v2
|
|
58
|
-
|
|
59
|
-
_(Same as v0)_
|
|
60
|
-
|
|
61
|
-
<a name="initv2state"></a>
|
|
62
|
-
|
|
63
|
-
```ipldsch
|
|
64
|
-
type InitV2State InitV0State
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
**HAMT**: This is an ADL representing `type ActorIDHAMT {Address:ActorID}`.
|
|
68
|
-
|
|
69
|
-
```ipldsch
|
|
70
|
-
type ActorIDHAMT struct {
|
|
71
|
-
map Bytes
|
|
72
|
-
data [ ActorIDHAMTElement ]
|
|
73
|
-
} representation tuple
|
|
74
|
-
|
|
75
|
-
type ActorIDHAMTElement union {
|
|
76
|
-
| ActorIDHAMTLink "0"
|
|
77
|
-
| ActorIDHAMTBucket "1"
|
|
78
|
-
} representation keyed
|
|
79
|
-
|
|
80
|
-
type ActorIDHAMTLink &ActorIDHAMT
|
|
81
|
-
|
|
82
|
-
type ActorIDHAMTBucket [ ActorIDHAMTBucketEntry ]
|
|
83
|
-
|
|
84
|
-
type ActorIDHAMTBucketEntry struct {
|
|
85
|
-
key Address
|
|
86
|
-
value ActorID
|
|
87
|
-
} representation tuple
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
## CronActor
|
|
91
|
-
|
|
92
|
-
The CronActor state is the same in v0 and v2.
|
|
93
|
-
|
|
94
|
-
### v0
|
|
95
|
-
|
|
96
|
-
<a name="cronv0state"></a>
|
|
97
|
-
|
|
98
|
-
```ipldsch
|
|
99
|
-
type CronV0State struct {
|
|
100
|
-
Entries [CronV0Entry]
|
|
101
|
-
} representation tuple
|
|
102
|
-
|
|
103
|
-
type CronV0Entry struct {
|
|
104
|
-
# The actor to call (must be an ID-address)
|
|
105
|
-
Receiver Address
|
|
106
|
-
# The method number to call (must accept empty parameters)
|
|
107
|
-
MethodNum MethodNum
|
|
108
|
-
} representation tuple
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### v2
|
|
112
|
-
|
|
113
|
-
_(Same as v0)_
|
|
114
|
-
|
|
115
|
-
<a name="cronv2state"></a>
|
|
116
|
-
|
|
117
|
-
```ipldsch
|
|
118
|
-
type CronV2State CronV0State
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
## RewardActor
|
|
122
|
-
|
|
123
|
-
The RewardActor state differs between v0 and v2.
|
|
124
|
-
|
|
125
|
-
### v0
|
|
126
|
-
|
|
127
|
-
<a name="rewardv0state"></a>
|
|
128
|
-
|
|
129
|
-
```ipldsch
|
|
130
|
-
type RewardV0State struct {
|
|
131
|
-
# CumsumBaseline is a target CumsumRealized needs to reach for EffectiveNetworkTime to increase
|
|
132
|
-
# CumsumBaseline and CumsumRealized are expressed in byte-epochs.
|
|
133
|
-
CumsumBaseline Spacetime
|
|
134
|
-
# CumsumRealized is cumulative sum of network power capped by BalinePower(epoch)
|
|
135
|
-
CumsumRealized Spacetime
|
|
136
|
-
# EffectiveNetworkTime is ceiling of real effective network time `theta` based on
|
|
137
|
-
# CumsumBaselinePower(theta) == CumsumRealizedPower
|
|
138
|
-
# Theta captures the notion of how much the network has progressed in its baseline
|
|
139
|
-
# and in advancing network time.
|
|
140
|
-
EffectiveNetworkTime ChainEpoch
|
|
141
|
-
# EffectiveBaselinePower is the baseline power at the EffectiveNetworkTime epoch
|
|
142
|
-
EffectiveBaselinePower StoragePower
|
|
143
|
-
# The reward to be paid in per WinCount to block producers.
|
|
144
|
-
# The actual reward total paid out depends on the number of winners in any round.
|
|
145
|
-
# This value is recomputed every non-null epoch and used in the next non-null epoch.
|
|
146
|
-
ThisEpochReward TokenAmount
|
|
147
|
-
# Smoothed ThisEpochReward
|
|
148
|
-
ThisEpochRewardSmoothed nullable FilterEstimate
|
|
149
|
-
# The baseline power the network is targeting at st.Epoch
|
|
150
|
-
ThisEpochBaselinePower StoragePower
|
|
151
|
-
# Epoch tracks for which epoch the Reward was computed
|
|
152
|
-
Epoch ChainEpoch
|
|
153
|
-
# TotalMined tracks the total FIL awared to block miners
|
|
154
|
-
TotalMined TokenAmount
|
|
155
|
-
} representation tuple
|
|
156
|
-
|
|
157
|
-
# Alpha Beta Filter "position" (value) and "velocity" (rate of change of value) estimates
|
|
158
|
-
# Estimates are in Q.128 format
|
|
159
|
-
type FilterEstimate struct {
|
|
160
|
-
PositionEstimate BigInt # Q.128
|
|
161
|
-
VelocityEstimate BigInt # Q.128
|
|
162
|
-
} representation tuple
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### v2
|
|
166
|
-
|
|
167
|
-
<a name="rewardv2state"></a>
|
|
168
|
-
|
|
169
|
-
```ipldsch
|
|
170
|
-
type RewardV2State struct {
|
|
171
|
-
# CumsumBaseline is a target CumsumRealized needs to reach for EffectiveNetworkTime to increase
|
|
172
|
-
# CumsumBaseline and CumsumRealized are expressed in byte-epochs.
|
|
173
|
-
CumsumBaseline Spacetime
|
|
174
|
-
# CumsumRealized is cumulative sum of network power capped by BaselinePower(epoch)
|
|
175
|
-
CumsumRealized Spacetime
|
|
176
|
-
# EffectiveNetworkTime is ceiling of real effective network time `theta` based on
|
|
177
|
-
# CumsumBaselinePower(theta) == CumsumRealizedPower
|
|
178
|
-
# Theta captures the notion of how much the network has progressed in its baseline
|
|
179
|
-
# and in advancing network time.
|
|
180
|
-
EffectiveNetworkTime ChainEpoch
|
|
181
|
-
# EffectiveBaselinePower is the baseline power at the EffectiveNetworkTime epoch
|
|
182
|
-
EffectiveBaselinePower StoragePower
|
|
183
|
-
# The reward to be paid in per WinCount to block producers.
|
|
184
|
-
# The actual reward total paid out depends on the number of winners in any round.
|
|
185
|
-
# This value is recomputed every non-null epoch and used in the next non-null epoch.
|
|
186
|
-
ThisEpochReward TokenAmount
|
|
187
|
-
# Smoothed ThisEpochReward
|
|
188
|
-
ThisEpochRewardSmoothed FilterEstimate
|
|
189
|
-
# The baseline power the network is targeting at st.Epoch
|
|
190
|
-
ThisEpochBaselinePower StoragePower
|
|
191
|
-
# Epoch tracks for which epoch the Reward was computed
|
|
192
|
-
Epoch ChainEpoch
|
|
193
|
-
# TotalStoragePowerReward tracks the total FIL awarded to block miners
|
|
194
|
-
TotalStoragePowerReward TokenAmount
|
|
195
|
-
# Simple and Baseline totals are constants used for computing rewards.
|
|
196
|
-
# They are on chain because of a historical fix resetting baseline value
|
|
197
|
-
# in a way that depended on the history leading immediately up to the
|
|
198
|
-
# migration fixing the value. These values can be moved from state back
|
|
199
|
-
# into a code constant in a subsequent upgrade.
|
|
200
|
-
SimpleTotal BigInt
|
|
201
|
-
BaselineTotal BigInt
|
|
202
|
-
} representation tuple
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
## AccountActor
|
|
206
|
-
|
|
207
|
-
The CronActor state is the same in v0 and v2 and only contains an `Address`.
|
|
208
|
-
|
|
209
|
-
### v0
|
|
210
|
-
|
|
211
|
-
<a name="accountv0state"></a>
|
|
212
|
-
|
|
213
|
-
```ipldsch
|
|
214
|
-
type AccountV0State struct {
|
|
215
|
-
Address Address
|
|
216
|
-
} representation tuple
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### v2
|
|
220
|
-
|
|
221
|
-
_(Same as v0)_
|
|
222
|
-
|
|
223
|
-
<a name="accountv2state"></a>
|
|
224
|
-
|
|
225
|
-
```ipldsch
|
|
226
|
-
type AccountV2State AccountV0State
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
## StorageMarketActor
|
|
230
|
-
|
|
231
|
-
The StorageMarketActor state is the same in v0 and v2.
|
|
232
|
-
|
|
233
|
-
### v0
|
|
234
|
-
|
|
235
|
-
<a name="marketv0state"></a>
|
|
236
|
-
|
|
237
|
-
```ipldsch
|
|
238
|
-
type MarketV0State struct {
|
|
239
|
-
Proposals &DealProposalAMT # AMT[DealID]DealProposal
|
|
240
|
-
States &DealStateAMT # AMT[DealID]DealState
|
|
241
|
-
# PendingProposals tracks dealProposals that have not yet reached their deal start date.
|
|
242
|
-
# We track them here to ensure that miners can't publish the same deal proposal twice.
|
|
243
|
-
PendingProposals &DealProposalHAMT # HAMT[DealCid]DealProposal
|
|
244
|
-
# Total amount held in escrow, indexed by actor address (including both locked and unlocked amounts).
|
|
245
|
-
EscrowTable &BalanceTableHAMT # HAMT[Address]TokenAmount
|
|
246
|
-
# Amount locked, indexed by actor address.
|
|
247
|
-
# Note: the amounts in this table do not affect the overall amount in escrow:
|
|
248
|
-
# only the _portion_ of the total escrow amount that is locked.
|
|
249
|
-
LockedTable &BalanceTableHAMT # HAMT[Address]TokenAmount
|
|
250
|
-
NextID DealID
|
|
251
|
-
# Metadata cached for efficient iteration over deals.
|
|
252
|
-
DealOpsByEpoch &DealOpsByEpochHAMT # SetMultimap: HAMT[ChainEpoch]Set[DealID]
|
|
253
|
-
LastCron ChainEpoch
|
|
254
|
-
# Total Client Collateral that is locked -> unlocked when deal is terminated
|
|
255
|
-
TotalClientLockedCollateral TokenAmount
|
|
256
|
-
# Total Provider Collateral that is locked -> unlocked when deal is terminated
|
|
257
|
-
TotalProviderLockedCollateral TokenAmount
|
|
258
|
-
# Total storage fee that is locked in escrow -> unlocked when payments are made
|
|
259
|
-
TotalClientStorageFee TokenAmount
|
|
260
|
-
} representation tuple
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
### v2
|
|
264
|
-
|
|
265
|
-
_(Same as v0)_
|
|
266
|
-
|
|
267
|
-
<a name="marketv2state"></a>
|
|
268
|
-
|
|
269
|
-
```ipldsch
|
|
270
|
-
type MarketV2State MarketV0State
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
**AMT**: This is an ADL representing `type DealProposalList [DealProposal]`, indexed by `DealID`.
|
|
274
|
-
|
|
275
|
-
```ipldsch
|
|
276
|
-
type DealProposalAMT struct {
|
|
277
|
-
height Int
|
|
278
|
-
count Int
|
|
279
|
-
node DealProposalAMTNode
|
|
280
|
-
} representation tuple
|
|
281
|
-
|
|
282
|
-
type DealProposalAMTNode struct {
|
|
283
|
-
bitmap Bytes
|
|
284
|
-
children [&DealProposalAMTNode]
|
|
285
|
-
values [MarketV0DealProposal] # inline
|
|
286
|
-
} representation tuple
|
|
287
|
-
|
|
288
|
-
type MarketV0DealProposal struct {
|
|
289
|
-
# CommP: A CID with fil-commitment-unsealed + sha2_256-trunc254-padded
|
|
290
|
-
PieceCID &Any
|
|
291
|
-
PieceSize PaddedPieceSize
|
|
292
|
-
VerifiedDeal Bool
|
|
293
|
-
Client Address
|
|
294
|
-
Provider Address
|
|
295
|
-
# An arbitrary client chosen label to apply to the deal
|
|
296
|
-
Label String
|
|
297
|
-
# Nominal start epoch. Deal payment is linear between StartEpoch and EndEpoch,
|
|
298
|
-
# with total amount StoragePricePerEpoch * (EndEpoch - StartEpoch).
|
|
299
|
-
# Storage deal must appear in a sealed (proven) sector no later than StartEpoch,
|
|
300
|
-
# otherwise it is invalid.
|
|
301
|
-
StartEpoch ChainEpoch
|
|
302
|
-
EndEpoch ChainEpoch
|
|
303
|
-
StoragePricePerEpoch TokenAmount
|
|
304
|
-
ProviderCollateral TokenAmount
|
|
305
|
-
ClientCollateral TokenAmount
|
|
306
|
-
} representation tuple
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
**AMT**: This is an ADL representing `type DealProposalList [DealState]`, indexed by `DealID`.
|
|
310
|
-
|
|
311
|
-
```ipldsch
|
|
312
|
-
type DealStateAMT struct {
|
|
313
|
-
height Int
|
|
314
|
-
count Int
|
|
315
|
-
node DealStateAMTNode
|
|
316
|
-
} representation tuple
|
|
317
|
-
|
|
318
|
-
type DealStateAMTNode struct {
|
|
319
|
-
bitmap Bytes
|
|
320
|
-
children [&DealStateAMTNode]
|
|
321
|
-
values [MarketV0DealState] # inline
|
|
322
|
-
} representation tuple
|
|
323
|
-
|
|
324
|
-
type MarketV0DealState struct {
|
|
325
|
-
SectorStartEpoch ChainEpoch # -1 if not yet included in proven sector
|
|
326
|
-
LastUpdatedEpoch ChainEpoch # -1 if deal state never updated
|
|
327
|
-
SlashEpoch ChainEpoch # -1 if deal never slashed
|
|
328
|
-
} representation tuple
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
**HAMT**: This is an ADL representing `type DealProposalMap {DealCidBytes:DealProposal}`.
|
|
332
|
-
|
|
333
|
-
```ipldsch
|
|
334
|
-
# The bytes form of the the CID of a `MarketV0DealProposal` object as a block
|
|
335
|
-
type DealCidBytes bytes
|
|
336
|
-
|
|
337
|
-
type DealProposalHAMT struct {
|
|
338
|
-
map Bytes
|
|
339
|
-
data [ DealProposalHAMTElement ]
|
|
340
|
-
} representation tuple
|
|
341
|
-
|
|
342
|
-
type DealProposalHAMTElement union {
|
|
343
|
-
| DealProposalHAMTLink "0"
|
|
344
|
-
| Bucket "1"
|
|
345
|
-
} representation keyed
|
|
346
|
-
|
|
347
|
-
type DealProposalHAMTLink &DealProposalHAMT
|
|
348
|
-
|
|
349
|
-
type DealProposalHAMTBucket [ DealProposalHAMTBucketEntry ]
|
|
350
|
-
|
|
351
|
-
type DealProposalHAMTBucketEntry struct {
|
|
352
|
-
key DealCidBytes
|
|
353
|
-
value MarketV0DealProposal
|
|
354
|
-
} representation tuple
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
**HAMT**: This is an ADL representing `type BalanceTable {Address:TokenAmount}`.
|
|
358
|
-
|
|
359
|
-
```ipldsch
|
|
360
|
-
type BalanceTableHAMT struct {
|
|
361
|
-
map Bytes
|
|
362
|
-
data [ BalanceTableHAMTElement ]
|
|
363
|
-
} representation tuple
|
|
364
|
-
|
|
365
|
-
type BalanceTableHAMTElement union {
|
|
366
|
-
| BalanceTableHAMTLink "0"
|
|
367
|
-
| BalanceTableHAMTBucket "1"
|
|
368
|
-
} representation keyed
|
|
369
|
-
|
|
370
|
-
type BalanceTableHAMTLink &BalanceTableHAMT
|
|
371
|
-
|
|
372
|
-
type BalanceTableHAMTBucket [ BalanceTableHAMTBucketEntry ]
|
|
373
|
-
|
|
374
|
-
type BalanceTableHAMTBucketEntry struct {
|
|
375
|
-
key Address
|
|
376
|
-
value TokenAmount
|
|
377
|
-
} representation tuple
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
**SetMultimap (HAMT+HAMT)**: This is an ADL representing a Set within a Map `type DealOpsByEpoch {ChainEpochBytes:{DealIDBytes:Null}}`.
|
|
381
|
-
|
|
382
|
-
```ipldsch
|
|
383
|
-
# HAMT/map root structure
|
|
384
|
-
|
|
385
|
-
type DealOpsByEpochHAMT struct {
|
|
386
|
-
map Bytes
|
|
387
|
-
data [ DealOpsByEpochHAMTElement ]
|
|
388
|
-
} representation tuple
|
|
389
|
-
|
|
390
|
-
type DealOpsByEpochHAMTElement union {
|
|
391
|
-
| DealOpsByEpochHAMTLink "0"
|
|
392
|
-
| DealOpsByEpochHAMTBucket "1"
|
|
393
|
-
} representation keyed
|
|
394
|
-
|
|
395
|
-
type DealOpsByEpochHAMTLink &DealOpsByEpochHAMTLink
|
|
396
|
-
|
|
397
|
-
type DealOpsByEpochHAMTBucket [ DealOpsByEpochHAMTBucketEntry ]
|
|
398
|
-
|
|
399
|
-
type DealOpsByEpochHAMTBucketEntry struct {
|
|
400
|
-
key ChainEpochBytes
|
|
401
|
-
value &DealOpsByEpochAMT
|
|
402
|
-
} representation tuple
|
|
403
|
-
|
|
404
|
-
# HAMT/set leaf structure (map of nulls)
|
|
405
|
-
|
|
406
|
-
type DealOpsByEpochHAMTSet struct {
|
|
407
|
-
map Bytes
|
|
408
|
-
data [ DealOpsByEpochHAMTSetElement ]
|
|
409
|
-
} representation tuple
|
|
410
|
-
|
|
411
|
-
type DealOpsByEpochHAMTSetElement union {
|
|
412
|
-
| DealOpsByEpochHAMTSet_Link "0"
|
|
413
|
-
| DealOpsByEpochHAMTSetBucket "1"
|
|
414
|
-
} representation keyed
|
|
415
|
-
|
|
416
|
-
type DealOpsByEpochHAMTSet_Link &DealOpsByEpochHAMTSet
|
|
417
|
-
|
|
418
|
-
type DealOpsByEpochHAMTSetBucket [ DealOpsByEpochHAMTSetBucketEntry ]
|
|
419
|
-
|
|
420
|
-
type DealOpsByEpochHAMTSetBucketEntry struct {
|
|
421
|
-
key DealIDBytes
|
|
422
|
-
value Null
|
|
423
|
-
} representation tuple
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
## StorageMinerActor
|
|
427
|
-
|
|
428
|
-
### v0
|
|
429
|
-
|
|
430
|
-
<a name="minerv0state"></a>
|
|
431
|
-
|
|
432
|
-
> Balance of Miner Actor should be greater than or equal to
|
|
433
|
-
> the sum of PreCommitDeposits and LockedFunds.
|
|
434
|
-
> It is possible for balance to fall below the sum of
|
|
435
|
-
> PCD, LF and InitialPledgeRequirements, and this is a bad
|
|
436
|
-
> state (IP Debt) that limits a miner actor's behavior (i.e. no balance withdrawals)
|
|
437
|
-
> Excess balance as computed by st.GetAvailableBalance will be
|
|
438
|
-
> withdrawable or usable for pre-commit deposit or pledge lock-up.
|
|
439
|
-
|
|
440
|
-
```ipldsch
|
|
441
|
-
type MinerV0State struct {
|
|
442
|
-
# Information not related to sectors
|
|
443
|
-
Info &MinerV0Info
|
|
444
|
-
# Total funds locked as PreCommitDeposits
|
|
445
|
-
PreCommitDeposits TokenAmount
|
|
446
|
-
# Total rewards and added funds locked in vesting table
|
|
447
|
-
LockedFunds TokenAmount
|
|
448
|
-
# VestingFunds (Vesting Funds schedule for the miner)
|
|
449
|
-
VestingFunds &MinerV0VestingFunds
|
|
450
|
-
# Sum of initial pledge requirements of all active sectors
|
|
451
|
-
InitialPledge TokenAmount
|
|
452
|
-
# Sectors that have been pre-committed but not yet proven.
|
|
453
|
-
PreCommittedSectors &MinerV0SectorPreCommitOnChainInfoHAMT # HAMT[SectorNumber]SectorPreCommitOnChainInfo
|
|
454
|
-
# PreCommittedSectorsExpiry maintains the state required to expire PreCommittedSectors
|
|
455
|
-
PreCommittedSectorsExpiry &BitFieldQueueAMT # AMT[ChainEpoch]BitField
|
|
456
|
-
# Allocated sector IDs. Sector IDs can never be reused once allocated
|
|
457
|
-
AllocatedSectors &BitField
|
|
458
|
-
# Information for all proven and not-yet-garbage-collected sectors.
|
|
459
|
-
# Sectors are removed from this AMT when the partition to which the
|
|
460
|
-
# sector belongs is compacted.
|
|
461
|
-
Sectors &MinerV0SectorOnChainInfoAMT # AMT[SectorNumber]SectorOnChainInfo
|
|
462
|
-
# The first epoch in this miner's current proving period. This is the first epoch in which a PoSt for a
|
|
463
|
-
# partition at the miner's first deadline may arrive. Alternatively, it is after the last epoch at which
|
|
464
|
-
# a PoSt for the previous window is valid.
|
|
465
|
-
# Always greater than zero, this may be greater than the current epoch for genesis miners in the first
|
|
466
|
-
# WPoStProvingPeriod epochs of the chain; the epochs before the first proving period starts are exempt from Window
|
|
467
|
-
# PoSt requirements.
|
|
468
|
-
# Updated at the end of every period by a cron callback.
|
|
469
|
-
ProvingPeriodStart ChainEpoch
|
|
470
|
-
# Index of the deadline within the proving period beginning at ProvingPeriodStart that has not yet been
|
|
471
|
-
# finalized.
|
|
472
|
-
# Updated at the end of each deadline window by a cron callback.
|
|
473
|
-
CurrentDeadline Int
|
|
474
|
-
# The sector numbers due for PoSt at each deadline in the current proving period, frozen at period start.
|
|
475
|
-
# New sectors are added and expired ones removed at proving period boundary.
|
|
476
|
-
# Faults are not subtracted from this in state, but on the fly.
|
|
477
|
-
Deadlines &MinerV0Deadlines
|
|
478
|
-
# Deadlines with outstanding fees for early sector termination
|
|
479
|
-
EarlyTerminations BitField
|
|
480
|
-
} representation tuple
|
|
481
|
-
```
|
|
482
|
-
|
|
483
|
-
```ipldsch
|
|
484
|
-
type MinerV0Info struct {
|
|
485
|
-
# Account that owns this miner.
|
|
486
|
-
# - Income and returned collateral are paid to this address.
|
|
487
|
-
# - This address is also allowed to change the worker address for the miner.
|
|
488
|
-
Owner Address # Must be an ID-address
|
|
489
|
-
# Worker account for this miner.
|
|
490
|
-
# The associated pubkey-type address is used to sign blocks and messages on behalf of this miner.
|
|
491
|
-
Worker Address # Must be an ID-address.
|
|
492
|
-
# Additional addresses that are permitted to submit messages controlling this actor (optional)
|
|
493
|
-
ControlAddresses nullable [Address]
|
|
494
|
-
PendingWorkerKey nullable MinerV0WorkerKeyChange
|
|
495
|
-
# Byte array representing a Libp2p identity that should be used when connecting to this miner
|
|
496
|
-
PeerId PeerID
|
|
497
|
-
# Slice of byte arrays representing Libp2p multi-addresses used for establishing a connection with this miner
|
|
498
|
-
Multiaddrs nullable [Multiaddr]
|
|
499
|
-
# The proof type used by this miner for sealing sectors
|
|
500
|
-
SealProofType Int
|
|
501
|
-
# Amount of space in each sector committed by this miner.
|
|
502
|
-
# This is computed from the proof type and represented here redundantly.
|
|
503
|
-
SectorSize SectorSize
|
|
504
|
-
# The number of sectors in each Window PoSt partition (proof).
|
|
505
|
-
# This is computed from the proof type and represented here redundantly.
|
|
506
|
-
WindowPoStPartitionSectors Int
|
|
507
|
-
} representation tuple
|
|
508
|
-
|
|
509
|
-
type MinerV0WorkerKeyChange struct {
|
|
510
|
-
NewWorker Address # Must be an ID address
|
|
511
|
-
EffectiveAt ChainEpoch
|
|
512
|
-
} representation tuple
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
```ipldsch
|
|
516
|
-
# VestingFunds represents the vesting table state for the miner.
|
|
517
|
-
# It is a slice of (VestingEpoch, VestingAmount).
|
|
518
|
-
# The slice will always be sorted by the VestingEpoch.
|
|
519
|
-
type MinerV0VestingFunds struct {
|
|
520
|
-
Funds [MinerV0VestingFund]
|
|
521
|
-
} representation tuple
|
|
522
|
-
|
|
523
|
-
# VestingFund represents miner funds that will vest at the given epoch.
|
|
524
|
-
type MinerV0VestingFund struct {
|
|
525
|
-
Epoch ChainEpoch
|
|
526
|
-
Amount TokenAmount
|
|
527
|
-
} representation tuple
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
```ipldsch
|
|
531
|
-
# Deadlines contains Deadline objects, describing the sectors due at the given
|
|
532
|
-
# deadline and their state (faulty, terminated, recovering, etc.).
|
|
533
|
-
type MinerV0Deadlines struct {
|
|
534
|
-
Due MinerV0DeadlineLinkList
|
|
535
|
-
} representation tuple
|
|
536
|
-
|
|
537
|
-
# Must be 48 CIDs
|
|
538
|
-
type MinerV0DeadlineLinkList [&MinerV0Deadline]
|
|
539
|
-
```
|
|
540
|
-
|
|
541
|
-
```ipldsch
|
|
542
|
-
# Deadline holds the state for all sectors due at a specific deadline.
|
|
543
|
-
type MinerV0Deadline struct {
|
|
544
|
-
# Partitions in this deadline, in order.
|
|
545
|
-
# The keys of this AMT are always sequential integers beginning with zero.
|
|
546
|
-
Partitions &MinerV0PartitionAMT # AMT[PartitionNumber]Partition
|
|
547
|
-
# Maps epochs to partitions that _may_ have sectors that expire in or
|
|
548
|
-
# before that epoch, either on-time or early as faults.
|
|
549
|
-
# Keys are quantized to final epochs in each proving deadline.
|
|
550
|
-
# NOTE: Partitions MUST NOT be removed from this queue (until the
|
|
551
|
-
# associated epoch has passed) even if they no longer have sectors
|
|
552
|
-
# expiring at that epoch. Sectors expiring at this epoch may later be
|
|
553
|
-
# recovered, and this queue will not be updated at that time.
|
|
554
|
-
ExpirationEpochs &BitFieldQueueAMT # AMT[ChainEpoch]BitField
|
|
555
|
-
# Partitions numbers with PoSt submissions since the proving period started.
|
|
556
|
-
PostSubmissions BitField
|
|
557
|
-
# Partitions with sectors that terminated early.
|
|
558
|
-
EarlyTerminations BitField
|
|
559
|
-
# The number of non-terminated sectors in this deadline (incl faulty).
|
|
560
|
-
LiveSectors Int
|
|
561
|
-
# The total number of sectors in this deadline (incl dead).
|
|
562
|
-
TotalSectors Int
|
|
563
|
-
# Memoized sum of faulty power in partitions.
|
|
564
|
-
FaultyPower MinerV0PowerPair
|
|
565
|
-
} representation tuple
|
|
566
|
-
```
|
|
567
|
-
|
|
568
|
-
### v2
|
|
569
|
-
|
|
570
|
-
<a name="minerv2state"></a>
|
|
571
|
-
|
|
572
|
-
```ipldsch
|
|
573
|
-
type MinerV2State struct {
|
|
574
|
-
# Information not related to sectors
|
|
575
|
-
Info &MinerV2Info
|
|
576
|
-
# Total funds locked as PreCommitDeposits
|
|
577
|
-
PreCommitDeposits TokenAmount
|
|
578
|
-
# Total rewards and added funds locked in vesting table
|
|
579
|
-
LockedFunds TokenAmount
|
|
580
|
-
# VestingFunds (Vesting Funds schedule for the miner)
|
|
581
|
-
VestingFunds &MinerV0VestingFunds
|
|
582
|
-
# Absolute value of debt this miner owes from unpaid fees
|
|
583
|
-
FeeDebt TokenAmount
|
|
584
|
-
# Sum of initial pledge requirements of all active sectors
|
|
585
|
-
InitialPledge TokenAmount
|
|
586
|
-
# Sectors that have been pre-committed but not yet proven
|
|
587
|
-
PreCommittedSectors &MinerV0SectorPreCommitOnChainInfoHAMT # HAMT[SectorNumber]SectorPreCommitOnChainInfo
|
|
588
|
-
# PreCommittedSectorsExpiry maintains the state required to expire PreCommittedSectors
|
|
589
|
-
PreCommittedSectorsExpiry &BitFieldQueueAMT # AMT[ChainEpoch]BitField
|
|
590
|
-
# Allocated sector IDs. Sector IDs can never be reused once allocated
|
|
591
|
-
AllocatedSectors &BitField
|
|
592
|
-
# Information for all proven and not-yet-garbage-collected sectors.
|
|
593
|
-
# Sectors are removed from this AMT when the partition to which the
|
|
594
|
-
# sector belongs is compacted.
|
|
595
|
-
Sectors &MinerV2SectorOnChainInfoAMT # AMT[SectorNumber]SectorOnChainInfo
|
|
596
|
-
# The first epoch in this miner's current proving period. This is the first epoch in which a PoSt for a
|
|
597
|
-
# partition at the miner's first deadline may arrive. Alternatively, it is after the last epoch at which
|
|
598
|
-
# a PoSt for the previous window is valid.
|
|
599
|
-
# Always greater than zero, this may be greater than the current epoch for genesis miners in the first
|
|
600
|
-
# WPoStProvingPeriod epochs of the chain; the epochs before the first proving period starts are exempt from Window
|
|
601
|
-
# PoSt requirements.
|
|
602
|
-
# Updated at the end of every period by a cron callback.
|
|
603
|
-
ProvingPeriodStart ChainEpoch
|
|
604
|
-
# Index of the deadline within the proving period beginning at ProvingPeriodStart that has not yet been
|
|
605
|
-
# finalized.
|
|
606
|
-
# Updated at the end of each deadline window by a cron callback.
|
|
607
|
-
CurrentDeadline Int
|
|
608
|
-
# The sector numbers due for PoSt at each deadline in the current proving period, frozen at period start.
|
|
609
|
-
# New sectors are added and expired ones removed at proving period boundary.
|
|
610
|
-
# Faults are not subtracted from this in state, but on the fly.
|
|
611
|
-
Deadlines &MinerV2Deadlines
|
|
612
|
-
# Deadlines with outstanding fees for early sector termination
|
|
613
|
-
EarlyTerminations BitField
|
|
614
|
-
} representation tuple
|
|
615
|
-
```
|
|
616
|
-
|
|
617
|
-
```ipldsch
|
|
618
|
-
type MinerV2Info struct {
|
|
619
|
-
# Account that owns this miner.
|
|
620
|
-
# - Income and returned collateral are paid to this address.
|
|
621
|
-
# - This address is also allowed to change the worker address for the miner.
|
|
622
|
-
Owner Address # Must be an ID-address
|
|
623
|
-
# Worker account for this miner.
|
|
624
|
-
# The associated pubkey-type address is used to sign blocks and messages on behalf of this miner.
|
|
625
|
-
Worker Address # Must be an ID-address
|
|
626
|
-
# Additional addresses that are permitted to submit messages controlling this actor (optional).
|
|
627
|
-
ControlAddresses nullable [Address] # Must all be ID addresses
|
|
628
|
-
PendingWorkerKey nullable MinerV0WorkerKeyChange
|
|
629
|
-
# Byte array representing a Libp2p identity that should be used when connecting to this miner.
|
|
630
|
-
PeerId PeerID
|
|
631
|
-
# Slice of byte arrays representing Libp2p multi-addresses used for establishing a connection with this miner.
|
|
632
|
-
Multiaddrs nullable [Multiaddr]
|
|
633
|
-
# The proof type used by this miner for sealing sectors.
|
|
634
|
-
SealProofType Int
|
|
635
|
-
# Amount of space in each sector committed by this miner.
|
|
636
|
-
# This is computed from the proof type and represented here redundantly.
|
|
637
|
-
SectorSize SectorSize
|
|
638
|
-
# The number of sectors in each Window PoSt partition (proof).
|
|
639
|
-
# This is computed from the proof type and represented here redundantly.
|
|
640
|
-
WindowPoStPartitionSectors Int
|
|
641
|
-
# The next epoch this miner is eligible for certain permissioned actor methods
|
|
642
|
-
# and winning block elections as a result of being reported for a consensus fault.
|
|
643
|
-
ConsensusFaultElapsed ChainEpoch
|
|
644
|
-
# A proposed new owner account for this miner.
|
|
645
|
-
# Must be confirmed by a message from the pending address itself.
|
|
646
|
-
PendingOwnerAddress nullable Address
|
|
647
|
-
} representation tuple
|
|
648
|
-
```
|
|
649
|
-
|
|
650
|
-
Ssame form as `MinerV0Deadlines` but the eventual link to `MinerV2Partition` is different.
|
|
651
|
-
|
|
652
|
-
```ipldsch
|
|
653
|
-
# Deadlines contains Deadline objects, describing the sectors due at the given
|
|
654
|
-
# deadline and their state (faulty, terminated, recovering, etc.).
|
|
655
|
-
type MinerV2Deadlines struct {
|
|
656
|
-
Due MinerV2DeadlineLinkList
|
|
657
|
-
} representation tuple
|
|
658
|
-
|
|
659
|
-
# Must be 48 CIDs
|
|
660
|
-
type MinerV2DeadlineLinkList [&MinerV2Deadline]
|
|
661
|
-
```
|
|
662
|
-
|
|
663
|
-
```ipldsch
|
|
664
|
-
# Deadline holds the state for all sectors due at a specific deadline.
|
|
665
|
-
type MinerV2Deadline struct {
|
|
666
|
-
# Partitions in this deadline, in order.
|
|
667
|
-
# The keys of this AMT are always sequential integers beginning with zero.
|
|
668
|
-
Partitions &MinerV2PartitionAMT # AMT[PartitionNumber]Partition
|
|
669
|
-
# Maps epochs to partitions that _may_ have sectors that expire in or
|
|
670
|
-
# before that epoch, either on-time or early as faults.
|
|
671
|
-
# Keys are quantized to final epochs in each proving deadline.
|
|
672
|
-
# NOTE: Partitions MUST NOT be removed from this queue (until the
|
|
673
|
-
# associated epoch has passed) even if they no longer have sectors
|
|
674
|
-
# expiring at that epoch. Sectors expiring at this epoch may later be
|
|
675
|
-
# recovered, and this queue will not be updated at that time.
|
|
676
|
-
ExpirationEpochs &BitFieldQueueAMT # AMT[ChainEpoch]BitField
|
|
677
|
-
# Partitions numbers with PoSt submissions since the proving period started.
|
|
678
|
-
PostSubmissions BitField
|
|
679
|
-
# Partitions with sectors that terminated early.
|
|
680
|
-
EarlyTerminations BitField
|
|
681
|
-
# The number of non-terminated sectors in this deadline (incl faulty).
|
|
682
|
-
LiveSectors Int
|
|
683
|
-
# The total number of sectors in this deadline (incl dead).
|
|
684
|
-
TotalSectors Int
|
|
685
|
-
# Memoized sum of faulty power in partitions.
|
|
686
|
-
FaultyPower MinerV0PowerPair
|
|
687
|
-
} representation tuple
|
|
688
|
-
```
|
|
689
|
-
|
|
690
|
-
**HAMT**: This is an ADL representing `type SectorPreCommitOnChainInfoMap {SectorNumberBytes:SectorPreCommitOnChainInfo}`
|
|
691
|
-
|
|
692
|
-
```ipldsch
|
|
693
|
-
type MinerV0SectorPreCommitOnChainInfoHAMT struct {
|
|
694
|
-
map Bytes
|
|
695
|
-
data [ MinerV0SectorPreCommitOnChainInfoHAMTElement ]
|
|
696
|
-
} representation tuple
|
|
697
|
-
|
|
698
|
-
type MinerV0SectorPreCommitOnChainInfoHAMTElement union {
|
|
699
|
-
| MinerV0SectorPreCommitOnChainInfoHAMTLink "0"
|
|
700
|
-
| MinerV0SectorPreCommitOnChainInfoHAMTBucket "1"
|
|
701
|
-
} representation keyed
|
|
702
|
-
|
|
703
|
-
type MinerV0SectorPreCommitOnChainInfoHAMTLink &MinerV0SectorPreCommitOnChainInfoHAMT
|
|
704
|
-
|
|
705
|
-
type MinerV0SectorPreCommitOnChainInfoHAMTBucket [ MinerV0SectorPreCommitOnChainInfoHAMTBucketEntry ]
|
|
706
|
-
|
|
707
|
-
type MinerV0SectorPreCommitOnChainInfoHAMTBucketEntry struct {
|
|
708
|
-
key SectorNumberBytes
|
|
709
|
-
value MinerV0SectorPreCommitOnChainInfo # inline
|
|
710
|
-
} representation tuple
|
|
711
|
-
|
|
712
|
-
# Information stored on-chain for a pre-committed sector
|
|
713
|
-
type MinerV0SectorPreCommitOnChainInfo struct {
|
|
714
|
-
Info MinerV0SectorPreCommitInfo
|
|
715
|
-
PreCommitDeposit TokenAmount
|
|
716
|
-
PreCommitEpoch ChainEpoch
|
|
717
|
-
# Integral of active deals over sector lifetime
|
|
718
|
-
DealWeight DealWeight
|
|
719
|
-
# Integral of active verified deals over sector lifetime
|
|
720
|
-
VerifiedDealWeight DealWeight
|
|
721
|
-
} representation tuple
|
|
722
|
-
|
|
723
|
-
# Information provided by a miner when pre-committing a sector
|
|
724
|
-
type MinerV0SectorPreCommitInfo struct {
|
|
725
|
-
SealProof RegisteredSealProof
|
|
726
|
-
SectorNumber SectorNumber
|
|
727
|
-
# CommR: A CID with fil-commitment-sealed + poseidon-bls12_381-ac-fc1
|
|
728
|
-
SealedCID &Any
|
|
729
|
-
SealRandEpoch ChainEpoch
|
|
730
|
-
DealIDs [DealID]
|
|
731
|
-
Expiration ChainEpoch
|
|
732
|
-
# Whether to replace a "committed capacity" no-deal sector (requires non-empty DealIDs)
|
|
733
|
-
ReplaceCapacity Bool
|
|
734
|
-
# The committed capacity sector to replace, and it's deadline/partition location
|
|
735
|
-
ReplaceSectorDeadline Int
|
|
736
|
-
ReplaceSectorPartition PartitionNumber
|
|
737
|
-
ReplaceSectorNumber SectorNumber
|
|
738
|
-
} representation tuple
|
|
739
|
-
```
|
|
740
|
-
|
|
741
|
-
**AMT**: This is an ADL representing `type BitFieldQueue [BitField]` indexed by `ChainEpoch`.
|
|
742
|
-
|
|
743
|
-
```ipldsch
|
|
744
|
-
type BitFieldQueueAMT struct {
|
|
745
|
-
height Int
|
|
746
|
-
count Int
|
|
747
|
-
node BitFieldQueueAMTNode
|
|
748
|
-
} representation tuple
|
|
749
|
-
|
|
750
|
-
type BitFieldQueueAMTNode struct {
|
|
751
|
-
bitmap Bytes
|
|
752
|
-
children [&BitFieldQueueAMTNode]
|
|
753
|
-
values [Bitfield]
|
|
754
|
-
} representation tuple
|
|
755
|
-
```
|
|
756
|
-
|
|
757
|
-
**AMT**: This is an ADL representing `type V0SectorOnChainInfoList [V0SectorOnChainInfo]` indexed by `SectorNumber`.
|
|
758
|
-
|
|
759
|
-
```ipldsch
|
|
760
|
-
type MinerV0SectorOnChainInfoAMT struct {
|
|
761
|
-
height Int
|
|
762
|
-
count Int
|
|
763
|
-
node MinerV0SectorOnChainInfoAMTNode
|
|
764
|
-
} representation tuple
|
|
765
|
-
|
|
766
|
-
type MinerV0SectorOnChainInfoAMTNode struct {
|
|
767
|
-
bitmap Bytes
|
|
768
|
-
children [&MinerV0SectorOnChainInfoAMTNode]
|
|
769
|
-
values [MinerV0SectorOnChainInfo]
|
|
770
|
-
} representation tuple
|
|
771
|
-
|
|
772
|
-
# Information stored on-chain for a proven sector
|
|
773
|
-
type MinerV0SectorOnChainInfo struct {
|
|
774
|
-
SectorNumber SectorNumber
|
|
775
|
-
# The seal proof type implies the PoSt proof/s
|
|
776
|
-
SealProof RegisteredSealProof
|
|
777
|
-
# CommR: A CID with fil-commitment-sealed + poseidon-bls12_381-ac-fc1
|
|
778
|
-
SealedCID &Any
|
|
779
|
-
DealIDs [DealID]
|
|
780
|
-
# Epoch during which the sector proof was accepted
|
|
781
|
-
Activation ChainEpoch
|
|
782
|
-
# Epoch during which the sector expires
|
|
783
|
-
Expiration ChainEpoch
|
|
784
|
-
# Integral of active deals over sector lifetime
|
|
785
|
-
DealWeight DealWeight
|
|
786
|
-
# Integral of active verified deals over sector lifetime
|
|
787
|
-
VerifiedDealWeight DealWeight
|
|
788
|
-
# Pledge collected to commit this sector
|
|
789
|
-
InitialPledge TokenAmount
|
|
790
|
-
# Expected one day projection of reward for sector computed at activation time
|
|
791
|
-
ExpectedDayReward TokenAmount
|
|
792
|
-
# Expected twenty day projection of reward for sector computed at activation time
|
|
793
|
-
ExpectedStoragePledge TokenAmount
|
|
794
|
-
} representation tuple
|
|
795
|
-
```
|
|
796
|
-
|
|
797
|
-
**AMT**: This is an ADL representing `type V2SectorOnChainInfoList [V2SectorOnChainInfo]` indexed by `SectorNumber`.
|
|
798
|
-
|
|
799
|
-
```ipldsch
|
|
800
|
-
type MinerV2SectorOnChainInfoAMT struct {
|
|
801
|
-
height Int
|
|
802
|
-
count Int
|
|
803
|
-
node MinerV2SectorOnChainInfoAMTNode
|
|
804
|
-
} representation tuple
|
|
805
|
-
|
|
806
|
-
type MinerV2SectorOnChainInfoAMTNode struct {
|
|
807
|
-
bitmap Bytes
|
|
808
|
-
children [&MinerV2SectorOnChainInfoAMTNode]
|
|
809
|
-
values [MinerV2SectorOnChainInfo]
|
|
810
|
-
} representation tuple
|
|
811
|
-
|
|
812
|
-
# Information stored on-chain for a proven sector
|
|
813
|
-
type MinerV2SectorOnChainInfo struct {
|
|
814
|
-
SectorNumber SectorNumber
|
|
815
|
-
# The seal proof type implies the PoSt proof/s
|
|
816
|
-
SealProof RegisteredSealProof
|
|
817
|
-
# CommR: A CID with fil-commitment-sealed + poseidon-bls12_381-ac-fc1
|
|
818
|
-
SealedCID &Any
|
|
819
|
-
DealIDs [DealID]
|
|
820
|
-
# Epoch during which the sector proof was accepted
|
|
821
|
-
Activation ChainEpoch
|
|
822
|
-
# Epoch during which the sector expires
|
|
823
|
-
Expiration ChainEpoch
|
|
824
|
-
# Integral of active deals over sector lifetime
|
|
825
|
-
DealWeight DealWeight
|
|
826
|
-
# Integral of active verified deals over sector lifetime
|
|
827
|
-
VerifiedDealWeight DealWeight
|
|
828
|
-
# Pledge collected to commit this sector
|
|
829
|
-
InitialPledge TokenAmount
|
|
830
|
-
# Expected one day projection of reward for sector computed at activation time
|
|
831
|
-
ExpectedDayReward TokenAmount
|
|
832
|
-
# Expected twenty day projection of reward for sector computed at activation time
|
|
833
|
-
ExpectedStoragePledge TokenAmount
|
|
834
|
-
# Age of sector this sector replaced or zero
|
|
835
|
-
ReplacedSectorAge ChainEpoch
|
|
836
|
-
# Day reward of sector this sector replace or zero
|
|
837
|
-
ReplacedDayReward TokenAmount
|
|
838
|
-
} representation tuple
|
|
839
|
-
```
|
|
840
|
-
|
|
841
|
-
**AMT**: This is an ADL representing `type MinerV0PartitionList [MinerV0Partition]` indexed by `PartitionNumber`.
|
|
842
|
-
|
|
843
|
-
```ipldsch
|
|
844
|
-
type MinerV0PartitionAMT struct {
|
|
845
|
-
height Int
|
|
846
|
-
count Int
|
|
847
|
-
node MinerV0PartitionAMTNode
|
|
848
|
-
} representation tuple
|
|
849
|
-
|
|
850
|
-
type MinerV0PartitionAMTNode struct {
|
|
851
|
-
bitmap Bytes
|
|
852
|
-
children [&MinerV0PartitionAMTNode]
|
|
853
|
-
values [MinerV0Partition]
|
|
854
|
-
} representation tuple
|
|
855
|
-
|
|
856
|
-
type MinerV0Partition struct {
|
|
857
|
-
# Sector numbers in this partition, including faulty and terminated sectors
|
|
858
|
-
Sectors BitField
|
|
859
|
-
# Subset of sectors detected/declared faulty and not yet recovered (excl. from PoSt).
|
|
860
|
-
# Faults ∩ Terminated = ∅
|
|
861
|
-
Faults BitField
|
|
862
|
-
# Subset of faulty sectors expected to recover on next PoSt
|
|
863
|
-
# Recoveries ∩ Terminated = ∅
|
|
864
|
-
Recoveries BitField
|
|
865
|
-
# Subset of sectors terminated but not yet removed from partition (excl. from PoSt)
|
|
866
|
-
Terminated BitField
|
|
867
|
-
# Maps epochs sectors that expire in or before that epoch.
|
|
868
|
-
# An expiration may be an "on-time" scheduled expiration, or early "faulty" expiration.
|
|
869
|
-
# Keys are quantized to last-in-deadline epochs.
|
|
870
|
-
ExpirationsEpochs &MinerV0ExpirationSetAMT # AMT[ChainEpoch]ExpirationSet
|
|
871
|
-
# Subset of terminated that were before their committed expiration epoch, by termination epoch.
|
|
872
|
-
# Termination fees have not yet been calculated or paid and associated deals have not yet been
|
|
873
|
-
# canceled but effective power has already been adjusted.
|
|
874
|
-
# Not quantized.
|
|
875
|
-
EarlyTerminated &BitFieldQueueAMT # AMT[ChainEpoch]BitField
|
|
876
|
-
# Power of not-yet-terminated sectors (incl faulty)
|
|
877
|
-
LivePower MinerV0PowerPair
|
|
878
|
-
# Power of currently-faulty sectors. FaultyPower <= LivePower.
|
|
879
|
-
FaultyPower MinerV0PowerPair
|
|
880
|
-
# Power of expected-to-recover sectors. RecoveringPower <= FaultyPower.
|
|
881
|
-
RecoveringPower MinerV0PowerPair
|
|
882
|
-
} representation tuple
|
|
883
|
-
|
|
884
|
-
# Value type for a pair of raw and QA power
|
|
885
|
-
type MinerV0PowerPair struct {
|
|
886
|
-
Raw StoragePower
|
|
887
|
-
QA StoragePower
|
|
888
|
-
} representation tuple
|
|
889
|
-
```
|
|
890
|
-
|
|
891
|
-
**AMT**: This is an ADL representing `type MinerV2PartitionList [MinerV2Partition]` indexed by `PartitionNumber`.
|
|
892
|
-
|
|
893
|
-
```ipldsch
|
|
894
|
-
type MinerV2PartitionAMT struct {
|
|
895
|
-
height Int
|
|
896
|
-
count Int
|
|
897
|
-
node MinerV2PartitionAMTNode
|
|
898
|
-
} representation tuple
|
|
899
|
-
|
|
900
|
-
type MinerV2PartitionAMTNode struct {
|
|
901
|
-
bitmap Bytes
|
|
902
|
-
children [&MinerV2PartitionAMTNode]
|
|
903
|
-
values [MinerV2Partition]
|
|
904
|
-
} representation tuple
|
|
905
|
-
|
|
906
|
-
type MinerV2Partition struct {
|
|
907
|
-
# Sector numbers in this partition, including faulty, unproven, and terminated sectors
|
|
908
|
-
Sectors BitField
|
|
909
|
-
# Unproven sectors in this partition. This bitfield will be cleared on
|
|
910
|
-
# a successful window post (or at the end of the partition's next
|
|
911
|
-
# deadline). At that time, any still unproven sectors will be added to
|
|
912
|
-
# the faulty sector bitfield.
|
|
913
|
-
Unproven BitField
|
|
914
|
-
# Subset of sectors detected/declared faulty and not yet recovered (excl. from PoSt).
|
|
915
|
-
# Faults ∩ Terminated = ∅
|
|
916
|
-
Faults BitField
|
|
917
|
-
# Subset of faulty sectors expected to recover on next PoSt
|
|
918
|
-
# Recoveries ∩ Terminated = ∅
|
|
919
|
-
Recoveries BitField
|
|
920
|
-
# Subset of sectors terminated but not yet removed from partition (excl. from PoSt)
|
|
921
|
-
Terminated BitField
|
|
922
|
-
# Maps epochs sectors that expire in or before that epoch.
|
|
923
|
-
# An expiration may be an "on-time" scheduled expiration, or early "faulty" expiration.
|
|
924
|
-
# Keys are quantized to last-in-deadline epochs.
|
|
925
|
-
ExpirationsEpochs &MinerV0ExpirationSetAMT # AMT[ChainEpoch]ExpirationSet
|
|
926
|
-
# Subset of terminated that were before their committed expiration epoch, by termination epoch.
|
|
927
|
-
# Termination fees have not yet been calculated or paid and associated deals have not yet been
|
|
928
|
-
# canceled but effective power has already been adjusted.
|
|
929
|
-
# Not quantized.
|
|
930
|
-
EarlyTerminated &BitFieldQueueAMT # AMT[ChainEpoch]BitField
|
|
931
|
-
# Power of not-yet-terminated sectors (incl faulty & unproven)
|
|
932
|
-
LivePower MinerV0PowerPair
|
|
933
|
-
# Power of yet-to-be-proved sectors (never faulty)
|
|
934
|
-
UnprovenPower MinerV0PowerPair
|
|
935
|
-
# Power of currently-faulty sectors. FaultyPower <= LivePower.
|
|
936
|
-
FaultyPower MinerV0PowerPair
|
|
937
|
-
# Power of expected-to-recover sectors. RecoveringPower <= FaultyPower.
|
|
938
|
-
RecoveringPower MinerV0PowerPair
|
|
939
|
-
} representation tuple
|
|
940
|
-
```
|
|
941
|
-
|
|
942
|
-
**AMT**: This is an ADL representing `type MinerV0ExpirationSetList [MinerV0ExpirationSet]` indexed by `ChainEpoch`.
|
|
943
|
-
|
|
944
|
-
```ipldsch
|
|
945
|
-
type MinerV0ExpirationSetAMT struct {
|
|
946
|
-
height Int
|
|
947
|
-
count Int
|
|
948
|
-
node MinerV0ExpirationSetAMTNode
|
|
949
|
-
} representation tuple
|
|
950
|
-
|
|
951
|
-
type MinerV0ExpirationSetAMTNode struct {
|
|
952
|
-
bitmap Bytes
|
|
953
|
-
children [&MinerV0ExpirationSetAMTNode]
|
|
954
|
-
values [MinerV0ExpirationSet]
|
|
955
|
-
} representation tuple
|
|
956
|
-
|
|
957
|
-
# ExpirationSet is a collection of sector numbers that are expiring, either due to
|
|
958
|
-
# expected "on-time" expiration at the end of their life, or unexpected "early" termination
|
|
959
|
-
# due to being faulty for too long consecutively.
|
|
960
|
-
# Note that there is not a direct correspondence between on-time sectors and active power;
|
|
961
|
-
# a sector may be faulty but expiring on-time if it faults just prior to expected termination.
|
|
962
|
-
# Early sectors are always faulty, and active power always represents on-time sectors.
|
|
963
|
-
type MinerV0ExpirationSet struct {
|
|
964
|
-
# Sectors expiring "on time" at the end of their committed life
|
|
965
|
-
OnTimeSectors BitField
|
|
966
|
-
# Sectors expiring "early" due to being faulty for too long
|
|
967
|
-
EarlySectors BitField
|
|
968
|
-
# Pledge total for the on-time sectors
|
|
969
|
-
OnTimePledge TokenAmount
|
|
970
|
-
# Power that is currently active (not faulty)
|
|
971
|
-
ActivePower MinerV0PowerPair
|
|
972
|
-
# Power that is currently faulty
|
|
973
|
-
FaultyPower MinerV0PowerPair
|
|
974
|
-
} representation tuple
|
|
975
|
-
```
|
|
976
|
-
|
|
977
|
-
## MultisigActor
|
|
978
|
-
|
|
979
|
-
The MultisigActor state is the same in v0 and v2.
|
|
980
|
-
|
|
981
|
-
### v0
|
|
982
|
-
|
|
983
|
-
<a name="multisigv0state"></a>
|
|
984
|
-
|
|
985
|
-
```ipldsch
|
|
986
|
-
type MultisigV0State struct {
|
|
987
|
-
# Signers may be either public-key or actor ID-addresses. The ID address is canonical, but doesn't exist
|
|
988
|
-
# for a public key that has not yet received a message on chain.
|
|
989
|
-
# If any signer address is a public-key address, it will be resolved to an ID address and persisted
|
|
990
|
-
# in this state when the address is used.
|
|
991
|
-
Signers [Address]
|
|
992
|
-
NumApprovalsThreshold Int
|
|
993
|
-
NextTxnID TransactionID
|
|
994
|
-
# Linear unlock
|
|
995
|
-
InitialBalance TokenAmount
|
|
996
|
-
StartEpoch ChainEpoch
|
|
997
|
-
UnlockDuration ChainEpoch
|
|
998
|
-
PendingTxns &MultisigV0TransactionHAMT # HAMT[TransactionID]Multisigv0Transaction
|
|
999
|
-
} representation tuple
|
|
1000
|
-
```
|
|
1001
|
-
|
|
1002
|
-
### v2
|
|
1003
|
-
|
|
1004
|
-
_(Same as v0)_
|
|
1005
|
-
|
|
1006
|
-
<a name="multisigv2state"></a>
|
|
1007
|
-
|
|
1008
|
-
```ipldsch
|
|
1009
|
-
type MultisigV2State MultisigV0State
|
|
1010
|
-
```
|
|
1011
|
-
|
|
1012
|
-
**HAMT**: This is an ADL representing `type MultisigV0TransactionMap {TransactionIDBytes:MultisigV0Transaction}`
|
|
1013
|
-
|
|
1014
|
-
```ipldsch
|
|
1015
|
-
type MultisigV0TransactionHAMT struct {
|
|
1016
|
-
map Bytes
|
|
1017
|
-
data [ MultisigV0TransactionHAMTElement ]
|
|
1018
|
-
} representation tuple
|
|
1019
|
-
|
|
1020
|
-
type MultisigV0TransactionHAMTElement union {
|
|
1021
|
-
| MultisigV0TransactionHAMTLink "0"
|
|
1022
|
-
| MultisigV0TransactionHAMTBucket "1"
|
|
1023
|
-
} representation keyed
|
|
1024
|
-
|
|
1025
|
-
type MultisigV0TransactionHAMTLink &MultisigV0TransactionHAMT
|
|
1026
|
-
|
|
1027
|
-
type MultisigV0TransactionHAMTBucket [ MultisigV0TransactionHAMTBucketEntry ]
|
|
1028
|
-
|
|
1029
|
-
type MultisigV0TransactionHAMTBucketEntry struct {
|
|
1030
|
-
key Bytes
|
|
1031
|
-
value MultisigV0Transaction # inline
|
|
1032
|
-
} representation tuple
|
|
1033
|
-
|
|
1034
|
-
type MultisigV0Transaction struct {
|
|
1035
|
-
To Address
|
|
1036
|
-
Value TokenAmount
|
|
1037
|
-
Method MethodNum
|
|
1038
|
-
Params CborEncodedParams
|
|
1039
|
-
# This address at index 0 is the transaction proposer, order of this slice must be preserved.
|
|
1040
|
-
Approved [Address]
|
|
1041
|
-
} representation tuple
|
|
1042
|
-
```
|
|
1043
|
-
|
|
1044
|
-
## PaymentChannelActor
|
|
1045
|
-
|
|
1046
|
-
The PaymentChannelActor state is the same in v0 and v2.
|
|
1047
|
-
|
|
1048
|
-
### v0
|
|
1049
|
-
|
|
1050
|
-
<a name="paychv0state"></a>
|
|
1051
|
-
|
|
1052
|
-
> A given payment channel actor is established by From
|
|
1053
|
-
> to enable off-chain microtransactions to To to be reconciled
|
|
1054
|
-
> and tallied on chain.
|
|
1055
|
-
|
|
1056
|
-
```ipldsch
|
|
1057
|
-
type PaychV0State struct {
|
|
1058
|
-
# Channel owner, who has funded the actor
|
|
1059
|
-
From Address
|
|
1060
|
-
# Recipient of payouts from channel
|
|
1061
|
-
To Address
|
|
1062
|
-
# Amount successfully redeemed through the payment channel, paid out on `Collect()`
|
|
1063
|
-
ToSend BigInt
|
|
1064
|
-
# Height at which the channel can be `Collected`
|
|
1065
|
-
SettlingAt ChainEpoch
|
|
1066
|
-
# Height before which the channel `ToSend` cannot be collected
|
|
1067
|
-
MinSettleHeight ChainEpoch
|
|
1068
|
-
# Collections of lane states for the channel, maintained in ID order.
|
|
1069
|
-
LaneStates &PaychV0LaneStatesAMT # AMT[Int]PaychV0LaneState
|
|
1070
|
-
} representation tuple
|
|
1071
|
-
```
|
|
1072
|
-
|
|
1073
|
-
### v2
|
|
1074
|
-
|
|
1075
|
-
_(Same as v0)_
|
|
1076
|
-
|
|
1077
|
-
<a name="paychv2state"></a>
|
|
1078
|
-
|
|
1079
|
-
```ipldsch
|
|
1080
|
-
type PaychV2State PaychV0State
|
|
1081
|
-
```
|
|
1082
|
-
|
|
1083
|
-
**AMT**: This is an ADL representing `type PaychV0LaneStates [PaychV0LaneState]` indexed by Lane ID.
|
|
1084
|
-
|
|
1085
|
-
```ipldsch
|
|
1086
|
-
type PaychV0LaneStatesAMT struct {
|
|
1087
|
-
height Int
|
|
1088
|
-
count Int
|
|
1089
|
-
node PaychV0LaneStatesAMTNode
|
|
1090
|
-
} representation tuple
|
|
1091
|
-
|
|
1092
|
-
type PaychV0LaneStatesAMTNode struct {
|
|
1093
|
-
bitmap Bytes
|
|
1094
|
-
children [&PaychV0LaneStatesAMTNode]
|
|
1095
|
-
values [PaychV0LaneState]
|
|
1096
|
-
} representation tuple
|
|
1097
|
-
|
|
1098
|
-
# The Lane state tracks the latest (highest) voucher nonce used to merge the lane
|
|
1099
|
-
# as well as the amount it has already redeemed.
|
|
1100
|
-
type PaychV0LaneState struct {
|
|
1101
|
-
Redeemed BigInt
|
|
1102
|
-
Nonce Int
|
|
1103
|
-
} representation tuple
|
|
1104
|
-
```
|
|
1105
|
-
|
|
1106
|
-
## StoragePowerActor
|
|
1107
|
-
|
|
1108
|
-
The StoragePowerActor state is the same in v0 and v2.
|
|
1109
|
-
|
|
1110
|
-
### v0
|
|
1111
|
-
|
|
1112
|
-
<a name="powerv0state"></a>
|
|
1113
|
-
|
|
1114
|
-
```ipldsch
|
|
1115
|
-
type PowerV0State struct {
|
|
1116
|
-
TotalRawBytePower StoragePower
|
|
1117
|
-
# TotalBytesCommitted includes claims from miners below min power threshold
|
|
1118
|
-
TotalBytesCommitted StoragePower
|
|
1119
|
-
TotalQualityAdjPower StoragePower
|
|
1120
|
-
# TotalQABytesCommitted includes claims from miners below min power threshold
|
|
1121
|
-
TotalQABytesCommitted StoragePower
|
|
1122
|
-
TotalPledgeCollateral TokenAmount
|
|
1123
|
-
# These fields are set once per epoch in the previous cron tick and used
|
|
1124
|
-
# for consistent values across a single epoch's state transition.
|
|
1125
|
-
ThisEpochRawBytePower StoragePower
|
|
1126
|
-
ThisEpochQualityAdjPower StoragePower
|
|
1127
|
-
ThisEpochPledgeCollateral TokenAmount
|
|
1128
|
-
ThisEpochQAPowerSmoothed nullable FilterEstimate
|
|
1129
|
-
MinerCount Int
|
|
1130
|
-
# Number of miners having proven the minimum consensus power
|
|
1131
|
-
MinerAboveMinPowerCount Int
|
|
1132
|
-
# A queue of events to be triggered by cron, indexed by epoch
|
|
1133
|
-
CronEventQueue &PowerV0CronEventHAMT # Multimap: HAMT[ChainEpoch]AMT[PowerV0CronEvent]
|
|
1134
|
-
# First epoch in which a cron task may be stored.
|
|
1135
|
-
# Cron will iterate every epoch between this and the current epoch inclusively to find tasks to execute.
|
|
1136
|
-
FirstCronEpoch ChainEpoch
|
|
1137
|
-
# Last epoch power cron tick has been processed
|
|
1138
|
-
LastProcessedCronEpoch ChainEpoch
|
|
1139
|
-
# Claimed power for each miner
|
|
1140
|
-
Claims &PowerV0ClaimHAMT # HAMT[address]PowerV0Claim
|
|
1141
|
-
ProofValidationBatch nullable &ProofValidationBatchHAMT # Multimap: HAMT[Address]AMT[SealVerifyInfo]
|
|
1142
|
-
} representation tuple
|
|
1143
|
-
```
|
|
1144
|
-
|
|
1145
|
-
### v2
|
|
1146
|
-
|
|
1147
|
-
<a name="powerv2state"></a>
|
|
1148
|
-
|
|
1149
|
-
```ipldsch
|
|
1150
|
-
type PowerV2State struct {
|
|
1151
|
-
TotalRawBytePower StoragePower
|
|
1152
|
-
# TotalBytesCommitted includes claims from miners below min power threshold
|
|
1153
|
-
TotalBytesCommitted StoragePower
|
|
1154
|
-
TotalQualityAdjPower StoragePower
|
|
1155
|
-
# TotalQABytesCommitted includes claims from miners below min power threshold
|
|
1156
|
-
TotalQABytesCommitted StoragePower
|
|
1157
|
-
TotalPledgeCollateral TokenAmount
|
|
1158
|
-
# These fields are set once per epoch in the previous cron tick and used
|
|
1159
|
-
# for consistent values across a single epoch's state transition.
|
|
1160
|
-
ThisEpochRawBytePower StoragePower
|
|
1161
|
-
ThisEpochQualityAdjPower StoragePower
|
|
1162
|
-
ThisEpochPledgeCollateral TokenAmount
|
|
1163
|
-
ThisEpochQAPowerSmoothed FilterEstimate
|
|
1164
|
-
MinerCount Int
|
|
1165
|
-
# Number of miners having proven the minimum consensus power
|
|
1166
|
-
MinerAboveMinPowerCount Int
|
|
1167
|
-
# A queue of events to be triggered by cron, indexed by epoch
|
|
1168
|
-
CronEventQueue &PowerV0CronEventHAMT # Multimap: HAMT[ChainEpoch]AMT[PowerV0CronEvent]
|
|
1169
|
-
# First epoch in which a cron task may be stored.
|
|
1170
|
-
# Cron will iterate every epoch between this and the current epoch inclusively to find tasks to execute.
|
|
1171
|
-
FirstCronEpoch ChainEpoch
|
|
1172
|
-
# Claimed power for each miner
|
|
1173
|
-
Claims &PowerV2ClaimHAMT # HAMT[address]PowerV2Claim
|
|
1174
|
-
ProofValidationBatch nullable &ProofValidationBatchHAMT # Multimap: HAMT[Address]AMT[SealVerifyInfo]
|
|
1175
|
-
} representation tuple
|
|
1176
|
-
```
|
|
1177
|
-
|
|
1178
|
-
**Multimap (HAMT+AMT)**: This is an ADL representing a List within a Map `type PowerV0CronEventMap {ChainEpochBytes:[PowerV0CronEvent]}`, where the `CronEvent` list is a queue.
|
|
1179
|
-
|
|
1180
|
-
```ipldsch
|
|
1181
|
-
# HAMT/map root structure
|
|
1182
|
-
|
|
1183
|
-
type PowerV0CronEventHAMT struct {
|
|
1184
|
-
map Bytes
|
|
1185
|
-
data [ PowerV0CronEventHAMTElement ]
|
|
1186
|
-
} representation tuple
|
|
1187
|
-
|
|
1188
|
-
type PowerV0CronEventHAMTElement union {
|
|
1189
|
-
| PowerV0CronEventHAMTLink "0"
|
|
1190
|
-
| PowerV0CronEventHAMTBucket "1"
|
|
1191
|
-
} representation keyed
|
|
1192
|
-
|
|
1193
|
-
type PowerV0CronEventHAMTLink &PowerV0CronEventHAMTLink
|
|
1194
|
-
|
|
1195
|
-
type PowerV0CronEventHAMTBucket [ PowerV0CronEventHAMTBucketEntry ]
|
|
1196
|
-
|
|
1197
|
-
type PowerV0CronEventHAMTBucketEntry struct {
|
|
1198
|
-
key ChainEpochBytes
|
|
1199
|
-
value &PowerV0CronEventAMT
|
|
1200
|
-
} representation tuple
|
|
1201
|
-
|
|
1202
|
-
# AMT/set leaf structure (list of CronEvents)
|
|
1203
|
-
|
|
1204
|
-
type PowerV0CronEventAMT struct {
|
|
1205
|
-
height Int
|
|
1206
|
-
count Int
|
|
1207
|
-
node PowerV0CronEventAMTNode
|
|
1208
|
-
} representation tuple
|
|
1209
|
-
|
|
1210
|
-
# This can also be the root of a block
|
|
1211
|
-
type PowerV0CronEventAMTNode struct {
|
|
1212
|
-
bitmap Bytes
|
|
1213
|
-
children [&PowerV0CronEventAMTNode]
|
|
1214
|
-
values [PowerV0CronEvent]
|
|
1215
|
-
} representation tuple
|
|
1216
|
-
|
|
1217
|
-
type PowerV0CronEvent struct {
|
|
1218
|
-
MinerAddr Address
|
|
1219
|
-
CallbackPayload Bytes
|
|
1220
|
-
} representation tuple
|
|
1221
|
-
```
|
|
1222
|
-
|
|
1223
|
-
**HAMT**: This is an ADL representing `type PowerV0ClaimMap {Address:PowerV0Claim}`.
|
|
1224
|
-
|
|
1225
|
-
```ipldsch
|
|
1226
|
-
type PowerV0ClaimMapHAMT struct {
|
|
1227
|
-
map Bytes
|
|
1228
|
-
data [ PowerV0ClaimMapHAMTElement ]
|
|
1229
|
-
} representation tuple
|
|
1230
|
-
|
|
1231
|
-
type PowerV0ClaimMapHAMTElement union {
|
|
1232
|
-
| PowerV0ClaimMapHAMTLink "0"
|
|
1233
|
-
| PowerV0ClaimMapHAMTBucket "1"
|
|
1234
|
-
} representation keyed
|
|
1235
|
-
|
|
1236
|
-
type PowerV0ClaimMapHAMTLink &PowerV0ClaimMapHAMT
|
|
1237
|
-
|
|
1238
|
-
type PowerV0ClaimMapHAMTBucket [ PowerV0ClaimMapHAMTBucketEntry ]
|
|
1239
|
-
|
|
1240
|
-
type PowerV0ClaimMapHAMTBucketEntry struct {
|
|
1241
|
-
key Address
|
|
1242
|
-
value PowerV0Claim
|
|
1243
|
-
} representation tuple
|
|
1244
|
-
|
|
1245
|
-
type PowerV0Claim struct {
|
|
1246
|
-
# Sum of raw byte power for a miner's sectors
|
|
1247
|
-
RawBytePower StoragePower
|
|
1248
|
-
# Sum of quality adjusted power for a miner's sectors
|
|
1249
|
-
QualityAdjPower StoragePower
|
|
1250
|
-
} representation tuple
|
|
1251
|
-
```
|
|
1252
|
-
|
|
1253
|
-
**HAMT**: This is an ADL representing `type PowerV2ClaimMap {Address:PowerV2Claim}`.
|
|
1254
|
-
|
|
1255
|
-
```ipldsch
|
|
1256
|
-
type PowerV2ClaimMapHAMT struct {
|
|
1257
|
-
map Bytes
|
|
1258
|
-
data [ PowerV2ClaimMapHAMTElement ]
|
|
1259
|
-
} representation tuple
|
|
1260
|
-
|
|
1261
|
-
type PowerV2ClaimMapHAMTElement union {
|
|
1262
|
-
| PowerV2ClaimMapHAMTLink "0"
|
|
1263
|
-
| PowerV2ClaimMapHAMTBucket "1"
|
|
1264
|
-
} representation keyed
|
|
1265
|
-
|
|
1266
|
-
type PowerV2ClaimMapHAMTLink &PowerV2ClaimMapHAMT
|
|
1267
|
-
|
|
1268
|
-
type PowerV2ClaimMapHAMTBucket [ PowerV2ClaimMapHAMTBucketEntry ]
|
|
1269
|
-
|
|
1270
|
-
type PowerV2ClaimMapHAMTBucketEntry struct {
|
|
1271
|
-
key Address
|
|
1272
|
-
value PowerV2Claim
|
|
1273
|
-
} representation tuple
|
|
1274
|
-
|
|
1275
|
-
type PowerV2Claim struct {
|
|
1276
|
-
# Miner's proof type used to determine minimum miner size
|
|
1277
|
-
SealProofType RegisteredSealProof
|
|
1278
|
-
# Sum of raw byte power for a miner's sectors
|
|
1279
|
-
RawBytePower StoragePower
|
|
1280
|
-
# Sum of quality adjusted power for a miner's sectors
|
|
1281
|
-
QualityAdjPower StoragePower
|
|
1282
|
-
} representation tuple
|
|
1283
|
-
```
|
|
1284
|
-
|
|
1285
|
-
**Multimap (HAMT+AMT)**: This is an ADL representing a List within a Map `type ProofValidationBatchMap {Address:[SealVerifyInfo]}`, where `SealVerifyInfo` is a queue.
|
|
1286
|
-
|
|
1287
|
-
```ipldsch
|
|
1288
|
-
# HAMT/map root structure
|
|
1289
|
-
|
|
1290
|
-
type ProofValidationBatchHAMT struct {
|
|
1291
|
-
map Bytes
|
|
1292
|
-
data [ ProofValidationBatchHAMTElement ]
|
|
1293
|
-
} representation tuple
|
|
1294
|
-
|
|
1295
|
-
type ProofValidationBatchHAMTElement union {
|
|
1296
|
-
| ProofValidationBatchHAMTLink "0"
|
|
1297
|
-
| ProofValidationBatchHAMTBucket "1"
|
|
1298
|
-
} representation keyed
|
|
1299
|
-
|
|
1300
|
-
type ProofValidationBatchHAMTLink &ProofValidationBatchHAMTLink
|
|
1301
|
-
|
|
1302
|
-
type ProofValidationBatchHAMTBucket [ ProofValidationBatchHAMTBucketEntry ]
|
|
1303
|
-
|
|
1304
|
-
type ProofValidationBatchHAMTBucketEntry struct {
|
|
1305
|
-
key Address
|
|
1306
|
-
value &ProofValidationBatchAMT
|
|
1307
|
-
} representation tuple
|
|
1308
|
-
|
|
1309
|
-
# AMT/set leaf structure (list of CronEvents)
|
|
1310
|
-
|
|
1311
|
-
type ProofValidationBatchAMT struct {
|
|
1312
|
-
height Int
|
|
1313
|
-
count Int
|
|
1314
|
-
node ProofValidationBatchAMTNode
|
|
1315
|
-
} representation tuple
|
|
1316
|
-
|
|
1317
|
-
# This can also be the root of a block
|
|
1318
|
-
type ProofValidationBatchAMTNode struct {
|
|
1319
|
-
bitmap Bytes
|
|
1320
|
-
children [&ProofValidationBatchAMTNode]
|
|
1321
|
-
values [SealVerifyInfo]
|
|
1322
|
-
} representation tuple
|
|
1323
|
-
|
|
1324
|
-
# Information needed to verify a seal proof.
|
|
1325
|
-
type SealVerifyInfo struct {
|
|
1326
|
-
SealProof RegisteredSealProof
|
|
1327
|
-
SectorID SectorID
|
|
1328
|
-
DealIDs [DealID]
|
|
1329
|
-
Randomness Bytes
|
|
1330
|
-
InteractiveRandomness Bytes
|
|
1331
|
-
Proof Bytes
|
|
1332
|
-
# Safe because we get those from the miner actor
|
|
1333
|
-
SealedCID &Any # CommR: A CID with fil-commitment-sealed + poseidon-bls12_381-ac-fc1
|
|
1334
|
-
UnsealedCID &Any # CommD: A CID with fil-commitment-unsealed + sha2_256-trunc254-padded
|
|
1335
|
-
} representation tuple
|
|
1336
|
-
```
|
|
1337
|
-
|
|
1338
|
-
## VerifiedRegistryActor
|
|
1339
|
-
|
|
1340
|
-
The VerifiedRegistryActor state is the same in v0 and v2.
|
|
1341
|
-
|
|
1342
|
-
### v0
|
|
1343
|
-
|
|
1344
|
-
<a name="verifregv0state"></a>
|
|
1345
|
-
|
|
1346
|
-
```ipldsch
|
|
1347
|
-
type VerifregV0State struct {
|
|
1348
|
-
# Root key holder multisig.
|
|
1349
|
-
# Authorize and remove verifiers.
|
|
1350
|
-
RootKey Address
|
|
1351
|
-
# Verifiers authorize VerifiedClients.
|
|
1352
|
-
# Verifiers delegate their DataCap.
|
|
1353
|
-
Verifiers &DataCapHAMT
|
|
1354
|
-
# VerifiedClients can add VerifiedClientData, up to DataCap.
|
|
1355
|
-
VerifiedClients &DataCapHAMT
|
|
1356
|
-
}
|
|
1357
|
-
```
|
|
1358
|
-
|
|
1359
|
-
### v2
|
|
1360
|
-
|
|
1361
|
-
_(Same as v0)_
|
|
1362
|
-
|
|
1363
|
-
<a name="verifregv2state"></a>
|
|
1364
|
-
|
|
1365
|
-
```ipldsch
|
|
1366
|
-
type VerifregV2State VerifregV0State
|
|
1367
|
-
```
|
|
1368
|
-
|
|
1369
|
-
**HAMT**: This is an ADL representing `type DataCapMap {Address:StoragePower}`.
|
|
1370
|
-
|
|
1371
|
-
```ipldsch
|
|
1372
|
-
type DataCapHAMT struct {
|
|
1373
|
-
map Bytes
|
|
1374
|
-
data [ DataCapHAMTElement ]
|
|
1375
|
-
} representation tuple
|
|
1376
|
-
|
|
1377
|
-
type DataCapHAMTElement union {
|
|
1378
|
-
| DataCapHAMTLink "0"
|
|
1379
|
-
| DataCapHAMTBucket "1"
|
|
1380
|
-
} representation keyed
|
|
1381
|
-
|
|
1382
|
-
type DataCapHAMTLink &DataCapHAMT
|
|
1383
|
-
|
|
1384
|
-
type DataCapHAMTBucket [ DataCapHAMTBucketEntry ]
|
|
1385
|
-
|
|
1386
|
-
type DataCapHAMTBucketEntry struct {
|
|
1387
|
-
key Address
|
|
1388
|
-
value DataCap # inline
|
|
1389
|
-
} representation tuple
|
|
1390
|
-
```
|
|
1391
|
-
|
|
1392
|
-
## SystemActor
|
|
1393
|
-
|
|
1394
|
-
Note that `SystemV0State` is an empty struct, which encodes as an empty CBOR array (`0x80`).
|
|
1395
|
-
|
|
1396
|
-
The SystemActor state is the same in v0 and v2.
|
|
1397
|
-
|
|
1398
|
-
### v0
|
|
1399
|
-
|
|
1400
|
-
<a name="systemv0state"></a>
|
|
1401
|
-
|
|
1402
|
-
```ipldsch
|
|
1403
|
-
type SystemV0State struct {
|
|
1404
|
-
} representation tuple
|
|
1405
|
-
```
|
|
1406
|
-
|
|
1407
|
-
### v2
|
|
1408
|
-
|
|
1409
|
-
_(Same as v0)_
|
|
1410
|
-
|
|
1411
|
-
<a name="systemv2state"></a>
|
|
1412
|
-
|
|
1413
|
-
```ipldsch
|
|
1414
|
-
type SystemV2State SystemV0State
|
|
1415
|
-
```
|