@@ -561,6 +561,63 @@ struct GetDealSectorReturn {
561
561
}
562
562
```
563
563
564
+ ### Verified registry actor
565
+
566
+ The built-in verified registry actor exports FRC-0042 methods to iterate all allocations and claims.
567
+ ` ListAllocations ` returns all allocation IDs up to some caller-specified limit,
568
+ and an opaque cursor which can be used to continue the listing where the first response left off.
569
+ ` ListClaims ` similarly returns all claim IDs up to some limit, and a cursor for continuation.
570
+ The order of iteration is undefined to the caller, and will match the internal HAMT structure's ordering.
571
+ A cursor is tied to the actor state from which it was generated.
572
+ Clients can only assume a cursor is valid for use immediately after it is returned.
573
+
574
+ ```
575
+ // Exported API
576
+ struct ListAllocationsParams {
577
+ Cursor: RawBytes,
578
+ Limit: u64,
579
+ }
580
+
581
+ struct AllocationKey {
582
+ Client: ActorID,
583
+ ID: AllocationID,
584
+ }
585
+
586
+ struct ListAllocationsResponse {
587
+ Allocations: Vec<AllocationKey>,
588
+ NextCursor: Option<RawBytes>,
589
+ }
590
+
591
+ struct ListClaimsParams {
592
+ Cursor: RawBytes,
593
+ Limit: u64,
594
+ }
595
+
596
+ struct ClaimKey {
597
+ Provider: ActorID,
598
+ ID: ClaimID,
599
+ }
600
+
601
+ struct ListClaimsResponse {
602
+ Claims: Vec<ClaimKey>,
603
+ NextCursor: Option<RawBytes>,
604
+ }
605
+ ```
606
+
607
+ A cursor is a serialized representation of the HAMT root CID, the next client/provider ID,
608
+ and the next allocation/claim ID for that client/provider.
609
+ A cursor is rejected with ` USR_ILLEGAL_ARGUMENT ` if the HAMT root does not match the verified registry state,
610
+ or the IDs do not exist.
611
+
612
+ ```
613
+ // Internal structure
614
+ struct Cursor {
615
+ Root: Cid,
616
+ OuterKey: ActorID,
617
+ InnerKey: u64, // Allocation or claim ID
618
+ }
619
+
620
+ ```
564
621
### Migration
565
622
566
623
The built-in market actor's ` ProviderSectors ` mapping is initialised from the existing deal state
@@ -641,6 +698,12 @@ as a side effect of publishing a deal.
641
698
The reason for this change is that verified allocations and deals are independent: a client can allocate DataCap
642
699
without necessarily involving the built-in market actor, and save the SP significant gas costs by doing so.
643
700
701
+ ### Verified registry iteration APIs
702
+
703
+ The methods to list allocations and claims provide simpler accessibility of these structures,
704
+ since in many cases they may be the only on-chain representation of a "deal".
705
+ The methods are primarily intended to be invoked from off-chain, replacing direct state inspection.
706
+
644
707
## Backwards Compatibility
645
708
646
709
This proposal deprecated the miner methods ` PreCommitSector ` (method 6), ` PreCommitSectorBatch ` (method 25),
0 commit comments