Future Compatibility for PreCommit with UnsealedSectorCID #380
Replies: 3 comments 2 replies
-
Thanks @Kubuxu, 💯 . I'm restating a bit of the background here to refresh it for myself, and others. The sector proving protocol requires providers to commit to the sector data (UnsealedSectorCID, aka CommD) at pre-commit time. The current flow does so indirectly: the provider gives the deal IDs at pre-commit time, and the miner actor later on gets the UnsealedSectorCID by asking the built-in market actor to compute it. Introducing the new pre-commit parameters now will give operators many months to transition to calling them, before we deprecate the old methods when enabling user-programmable markets. We expect these new parameters to be the right ones for the future (albeit with pre-commit deal IDs redundant/ignored). |
Beta Was this translation helpful? Give feedback.
-
will this have an impact on gas_used? |
Beta Was this translation helpful? Give feedback.
-
Today, PreCommit accepts DealID and later based on it looks up UnsealedSectorCID. Future changes, with high probability, will move away from that approach, towards accepting UnsealedSectorCID directly.
I propose we add
PreCommitSector2
andPreCommitSectorBatch2
capable of accepting UnsealedSectorCID directly.Motivation
When there is a necessary change in parameters of an actor's method exposed to users, the cleanest mechanism to execute such change is to add a new method and permissively continue to accept calls to the old method.
This mechanism increases implementation complexity as old code pathways have to continue functioning.
In this case, the motivating factors for the change are User Deployable Storage Markets and FVM Programmability. These two, by themselves, will be complex changes to built-in actors.
By introducing new method signatures before behavioural changes, the primary change can omit compatibility with old method signatures and thus reduce their complexity and work required.
Proposal
Modify
SectorPrecommitInfo
to acceptUnsealedSectorCID
and remove unused fields, while maintaining old function signatures ofPreCommitSector
andPrecommitSectorBatch
which will forward messages to their*2
variants withunsealed_sector_cid = None
.Introduce two new methods to the Miner actor
PreCommitSector2
andPreCommitSectorBatch2
using the newSectorPreCommitInfo
.Perform migration of the
SectorPreCommitOnChainInfo
filling outunsealed_sector_cid
field withNone
.Beta Was this translation helpful? Give feedback.
All reactions