Exposure of Sector Status Method to Smart contracts from Builtin Miner Actor #1108
Replies: 1 comment 3 replies
-
One tricky part is handling early termination. At the moment, sector terminations update the partition state but don't touch the sector info (because, e.g., they might be processed from cron and we want to minimize the amount of work). The solution is to either:
Another tricky part is that, after a sector is terminated, we really don't want to keep any information around regarding this sector. So, at that point, all we'll know is "this sector doesn't exist". Unfortunately, we likely won't know when the sector ceased to exist. We could consider keeping some form of rolling history of sector terminations, but we'd have to carefully consider the cost of doing this. Finally, none of these address the issue if figuring out the fault status of a sector. If we know the "location" (partition/deadline) of the sector, we can query the faulty status. But otherwise we can't. IMO:
|
Beta Was this translation helpful? Give feedback.
-
Abstract
We should expose the method somewhat similar to StateSectorExpiration method from the built-in miner actor to smart contracts. This enhancement will enable smart contracts to access sector status information, facilitating the development of decentralized marketplaces around Direct-Data-Onboarding (DDO) and the design of Service Level Agreements (SLAs) and payment structures based on sector duration and early termination.
Motivation
Currently, smart contracts lack direct access to sector status information, limiting their ability to interact with storage-related data. By exposing these methods, developers can create more dynamic and responsive smart contracts that can monitor sector lifecycles, thereby enabling innovative solutions such as automated SLAs and payment systems that account for storage duration and early termination. With DDO, this become more critical as sectors are the only thing to track the status of client data stored by SPs.
Specification
Modify the built-in miner actor to expose the following method to the Filecoin Virtual Machine (FVM):
Rationale
Exposing these methods will provide smart contracts with the necessary tools to access real-time sector status, promoting the development of decentralized applications that can manage and monetize storage more effectively. Given that these are state read methods, they are non-intrusive and should not introduce significant overhead or security risks.
Implementation
The implementation will involve modifying the built-in miner actor code to develop and expose the specified method to the FVM. Testing can be conducted to ensure the methods function as intended within smart contracts.
Security Considerations
As the method is read-only and do not alter state, the security risks are minimal. However, thorough testing can be done to avoid any issue.
Beta Was this translation helpful? Give feedback.
All reactions