-
Notifications
You must be signed in to change notification settings - Fork 185
Export Sector Status #1220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Export Sector Status #1220
Conversation
jsoares
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardly the strongest change motivation section, but seems clear enough.
| <!--"If you can't explain it simply, you don't understand it well enough." Provide a simplified and layman-accessible explanation of the FIP.--> | ||
| We propose exporting a new method `validate_sector_status` from the builtin miner actor for creating user space FEVM smart contracts that can check the status of filecoin sectors, either live or dead, on chain. An additional exported method `generate_sector_status_info` can be used in an offchain call to generate inputs to `validate_sector_status`. | ||
|
|
||
| Combined with the recent changes to ProveCommitSectors3 in FIP 109 allowing smart contract notifications upon sector commitent, this FIP establishes a minimally useful interface for a rich set of programmable storage applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Combined with the recent changes to ProveCommitSectors3 in FIP 109 allowing smart contract notifications upon sector commitent, this FIP establishes a minimally useful interface for a rich set of programmable storage applications. | |
| Combined with the recent changes to ProveCommitSectors3 in FIP-0109 allowing smart contract notifications upon sector commitent, this FIP establishes a minimally useful interface for a rich set of programmable storage applications. |
| <!--A short (~200 word) description of the technical issue being addressed.--> | ||
| We propose exporting a new method `validate_sector_status` from the builtin miner actor for creating user space FEVM smart contracts that can check the status of filecoin sectors, either live or dead, on chain. An additional exported method `generate_sector_status_info` can be used in an offchain call to generate inputs to `validate_sector_status`. | ||
|
|
||
| Combined with the recent changes to ProveCommitSectors3 in FIP 109 allowing smart contract notifications upon sector commitent, this FIP establishes a minimally useful interface for a rich set of programmable storage applications. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Combined with the recent changes to ProveCommitSectors3 in FIP 109 allowing smart contract notifications upon sector commitent, this FIP establishes a minimally useful interface for a rich set of programmable storage applications. | |
| Combined with the recent changes to ProveCommitSectors3 in FIP-0109 allowing smart contract notifications upon sector commitent, this FIP establishes a minimally useful interface for a rich set of programmable storage applications. |
|
|
||
| We forwent a similar validating interface pattern with `get_sector_expiration`. This would look like a method that takes in the correct expiration and returns True or False depending on whether the input expiration is correct. This is done for expediency and convenience. The thinking is that this method only ever provides a useful hint anyway as it cannot provide any useful information when handling early terminations. | ||
|
|
||
| We considered including the most current guess of a sectors expiration from `get_sector_expiration` this could be accomplished by providing the sector location and traversing the partition's expiration queue. This would effectively expose a signal of a sector's faultiness which runs counter to our design of `validate_sector_status`. If we want to expose this information we should be consistent and create a new `Fault` sector status value from the enum. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| We considered including the most current guess of a sectors expiration from `get_sector_expiration` this could be accomplished by providing the sector location and traversing the partition's expiration queue. This would effectively expose a signal of a sector's faultiness which runs counter to our design of `validate_sector_status`. If we want to expose this information we should be consistent and create a new `Fault` sector status value from the enum. | |
| We considered including the most current guess of a sectors expiration from `get_sector_expiration`, which could be accomplished by providing the sector location and traversing the partition's expiration queue. This would effectively expose a signal of a sector's faultiness which runs counter to our design of `validate_sector_status`. If we want to expose this information we should be consistent and create a new `Fault` sector status value from the enum. |
| a) sector number recorded in the `sectors` bitfield of some `Partition` | ||
| b) sector number NOT recorded in the `terminated` bitfield of the same `Partition` | ||
|
|
||
| Furthermore the separation of the search for the partition and deadline index into the offchain call `generate_sector_status_info` ensures that gas costs and miner state size have no impact on a user's ability to make this call. Hence there is no provide practical denial of service to make the call and condition (1) is satisfied both in principle and in practice. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Furthermore the separation of the search for the partition and deadline index into the offchain call `generate_sector_status_info` ensures that gas costs and miner state size have no impact on a user's ability to make this call. Hence there is no provide practical denial of service to make the call and condition (1) is satisfied both in principle and in practice. | |
| Furthermore the separation of the search for the partition and deadline index into the offchain call `generate_sector_status_info` ensures that gas costs and miner state size have no impact on a user's ability to make this call. Hence there is no denial of service vector and condition (1) is satisfied both in principle and in practice. |
This sentence is broken in at least two ways -- I'm not sure if this is what was meant, so feel free to ignore the suggestion and rewrite as you wish.
|
|
||
| ## Implementation | ||
| <!--The implementations must be completed before any core FIP is given status "Final", but it need not be completed before the FIP is accepted. While there is merit to the approach of reaching consensus on the specification and rationale before writing code, the principle of "rough consensus and running code" is still useful when it comes to resolving many discussions of API details.--> | ||
| WIP builtin actors PR here: https://github.com/filecoin-project/builtin-actors/pull/1707/files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| WIP builtin actors PR here: https://github.com/filecoin-project/builtin-actors/pull/1707/files | |
| WIP builtin actors PR here: https://github.com/filecoin-project/builtin-actors/pull/1707 |
This FIP is to add a liveness check method to the builtin miner actor to allow for user space fevm contracts to check on the status of filecoin sectors based on sector number.
Still WIP. Will move out of Draft PR when it is ready for review.
Discussion #1108