Skip to content

Commit ddac30b

Browse files
aarshkshah1992jsoaresanorth
authored
Update FIP-0083 to incorporate changes to the Market Actor events and Sector Activation events as per FIP discussion (#897)
* fip for built-in Actor events * finish draft * fix formatting * changes as per review #1 * link FIPs * Apply suggestions from code review Applying editorial changes. Co-authored-by: Jorge Soares <[email protected]> * update Market Actor events * add FIP number * update fip-0083 to incorporate changes to market actor and sector activation events * Apply suggestions from code review Co-authored-by: Alex North <[email protected]> * change language --------- Co-authored-by: Jorge Soares <[email protected]> Co-authored-by: Alex North <[email protected]>
1 parent 4b3a449 commit ddac30b

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

FIPS/fip-0083.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,15 @@ This event is emitted for each pre-committed sector that is successfully activat
205205

206206
The event payload is defined as:
207207

208-
| flags | key | value |
209-
| --- | --- |-----------------------------|
210-
| Index Key + Value | “$type" | "sector-activated" (string) |
211-
| Index Key + Value | “sector” | <SECTOR_NUMER> (int) |
208+
| flags | key | value |
209+
|-------------------|----------------|-----------------------------|
210+
| Index Key + Value | “$type" | "sector-activated" (string) |
211+
| Index Key + Value | “sector” | <SECTOR_NUMER> (int) |
212+
| Index Key + Value | “unsealed-cid” | <SECTOR_COMMD> (cid) |
213+
| Index Key + Value | "piece-cid" | <PIECE_CID> (cid) |
214+
| Index Key + Value | "piece-size" | <PIECE_SIZE> (bigint) |
215+
216+
- Note that `piece-cid` and `piece-size` is included for each piece in the sector.
212217

213218
#### Sector Updated
214219
This event is emitted for each CC sector that is updated to contained actual sealed data.
@@ -248,11 +253,12 @@ Once a deal is published, clients have access to the `dealId` of the deal. All M
248253
for the “deal published” event have the `dealId` in their payload, which clients can use to filter for events
249254
they are interested in and then query the chain state for more information.
250255

251-
The `dealId` is not known to the storage client before the deal is actually published as it is generated by
252-
the storage provider during the call to `PublishStorageDeals`. Therefore, to make the `deal-published`
253-
event useful to subscribers and storage clients, the payload for that event also includes the `client`
254-
and `provider` Actors IDs so that listeners can filter this event by specific deal making parties they are
255-
interested in.
256+
All Market Actor events have the client and provider Actor IDs in the event payload. This enables users
257+
to filter these events by the specific deal making parties they are interested in and then query the chain
258+
state with the corresponding `dealId` to get more information.
259+
260+
However, note that the `dealId` is not known to the storage client before the deal is actually published as it is generated by
261+
the storage provider during the call to `PublishStorageDeals`.
256262

257263
Note that cron jobs do not return message receipts containing the emitted events back to the user.
258264
Therefore, the Market Actor `deal-terminated` event will not be usable as it stands today as the deals
@@ -286,6 +292,12 @@ that can be processed immediately by the `TerminateSectors` method are rate-limi
286292
The events emitted for these terminations will not be available to the client because they are
287293
emitted from a cron job.
288294

295+
Once [FIP-0076](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0076.md) is implemented,
296+
sectors can be activated with data that is not associated with a built-in market actor deal. This means that clients may
297+
not be able to obtain additional information about this data by querying the Market Actor state.
298+
Therefore, the sector activation events contains the `unsealed_cid(COMMD)` and the `piece_cid` and
299+
`piece_size` for each piece in the sector as this information will be useful to aggregators, indexers etc.
300+
289301
## Backwards Compatibility
290302
This proposal does not remove or change any exported APIs, nor change any state schemas.
291303
It is backwards compatible for all callers. Since it requires a change to actor code, a network upgrade is
@@ -321,7 +333,7 @@ emit the events defined in this FIP.
321333
While this increased gas cost is borne by the users of the methods, the benefit of the emitted events
322334
is enjoyed by networking monitoring tools, network accounting tools, block explorer tools and other
323335
external agents that provide some value-added services to the Filecoin network.  Improved
324-
implementation of these tools should indirectly benefit the network users.
336+
implementation of these tools will indirectly benefit the network users.
325337

326338
## Product Considerations
327339
This FIP will enable tools dedicated to network observability, monitoring, and accounting, as well as

0 commit comments

Comments
 (0)