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.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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
PreCommitSector2andPreCommitSectorBatch2capable 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
SectorPrecommitInfoto acceptUnsealedSectorCIDand remove unused fields, while maintaining old function signatures ofPreCommitSectorandPrecommitSectorBatchwhich will forward messages to their*2variants withunsealed_sector_cid = None.pub struct SectorPreCommitInfo { pub seal_proof: RegisteredSealProof, pub sector_number: SectorNumber, pub sealed_cid: Cid, pub seal_rand_epoch: ChainEpoch, pub deal_ids: Vec<DealID>, pub expiration: ChainEpoch, - pub replace_capacity: bool, - pub replace_sector_deadline: u64, - pub replace_sector_partition: u64, - pub replace_sector_number: SectorNumber, + pub unsealed_sector_cid: Option<Cid>, }Introduce two new methods to the Miner actor
PreCommitSector2andPreCommitSectorBatch2using the newSectorPreCommitInfo.Perform migration of the
SectorPreCommitOnChainInfofilling outunsealed_sector_cidfield withNone.Beta Was this translation helpful? Give feedback.
All reactions