@@ -542,6 +542,63 @@ struct OnMinerSectorsTerminateParams {
542
542
The sector is removed from the ` ProviderSectors ` mapping, if present.
543
543
Any deals mapped to that sector are marked as terminated, and subsequent processing deferred to cron.
544
544
545
+ ### Verified registry actor
546
+
547
+ The built-in verified registry actor exports FRC-0042 methods to iterate all allocations and claims.
548
+ ` ListAllocations ` returns all allocation IDs up to some caller-specified limit,
549
+ and an opaque cursor which can be used to continue the listing where the first response left off.
550
+ ` ListClaims ` similarly returns all claim IDs up to some limit, and a cursor for continuation.
551
+ The order of iteration is undefined to the caller, and will match the internal HAMT structure's ordering.
552
+ A cursor is tied to the actor state from which it was generated.
553
+ Clients can only assume a cursor is valid for use immediately after it is returned.
554
+
555
+ ```
556
+ // Exported API
557
+ struct ListAllocationsParams {
558
+ Cursor: RawBytes,
559
+ Limit: u64,
560
+ }
561
+
562
+ struct AllocationKey {
563
+ Client: ActorID,
564
+ ID: AllocationID,
565
+ }
566
+
567
+ struct ListAllocationsResponse {
568
+ Allocations: Vec<AllocationKey>,
569
+ NextCursor: Option<RawBytes>,
570
+ }
571
+
572
+ struct ListClaimsParams {
573
+ Cursor: RawBytes,
574
+ Limit: u64,
575
+ }
576
+
577
+ struct ClaimKey {
578
+ Provider: ActorID,
579
+ ID: ClaimID,
580
+ }
581
+
582
+ struct ListClaimsResponse {
583
+ Claims: Vec<ClaimKey>,
584
+ NextCursor: Option<RawBytes>,
585
+ }
586
+ ```
587
+
588
+ A cursor is a serialized representation of the HAMT root CID, the next client/provider ID,
589
+ and the next allocation/claim ID for that client/provider.
590
+ A cursor is rejected with ` USR_ILLEGAL_ARGUMENT ` if the HAMT root does not match the verified registry state,
591
+ or the IDs do not exist.
592
+
593
+ ```
594
+ // Internal structure
595
+ struct Cursor {
596
+ Root: Cid,
597
+ OuterKey: ActorID,
598
+ InnerKey: u64, // Allocation or claim ID
599
+ }
600
+
601
+ ```
545
602
### Migration
546
603
547
604
The built-in market actor's ` ProviderSectors ` mapping is initialised from the existing deal state
@@ -622,6 +679,12 @@ as a side effect of publishing a deal.
622
679
The reason for this change is that verified allocations and deals are independent: a client can allocate DataCap
623
680
without necessarily involving the built-in market actor, and save the SP significant gas costs by doing so.
624
681
682
+ ### Verified registry iteration APIs
683
+
684
+ The methods to list allocations and claims provide simpler accessibility of these structures,
685
+ since in many cases they may be the only on-chain representation of a "deal".
686
+ The methods are primarily intended to be invoked from off-chain, replacing direct state inspection.
687
+
625
688
## Backwards Compatibility
626
689
627
690
This proposal deprecated the miner methods ` PreCommitSector ` (method 6), ` PreCommitSectorBatch ` (method 25),
0 commit comments