-
Notifications
You must be signed in to change notification settings - Fork 170
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
Off-chain Window PoSt verification #42
Comments
@Stebalien and I are spiking on concrete implementation of this to narrow the uncertainty and focus analysis. |
18 tasks
I think this is a great idea. I think most/all SNARK verification that we do could be moved to a slashing model. |
Re: censoring
|
This was referenced Dec 16, 2020
Merged
Note: this should be merged only if our reporting dispute code is ready. |
Shipped as FIP-0010! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Window PoSt messages are necessary for ongoing maintenance of storage power. Verifying the submitted proofs is expensive and when the gas base fee rises (due to congestion) these messages become expensive. In bad cases, for small miners with mostly-empty partitions, this cost can exceed their expected reward from maintaining power. We need to ensure that these messages are cheap for miners, even when specifying a very high gas fee cap.
Note the framing of the problem here assumes congestion. There is a separate and just-as-pressing problem of reducing congestion. But even if we make great improvements there, congestion will happen sometimes in the future for different reasons (E.g. massive popularity! Deals! DeFi!) and we'll need Window PoSt to remain cheap and effective.
This is an alternative to the Fast Track for Window PoSt and related proposals.
Proposed solution
Don't verify most Window PoSt proofs "on chain". Assume they are valid, and implement a challenge mechanism for external parties to dispute an invalid proof, verifying on-chain only at that point.
Outline
With this mechanism, the vast majority of Window PoSt proofs would never be validated on chain. The network cost of maintaining storage would be effectively constant, rather than linear in storage as it is today (at sufficient scale it would revert to linear for the work of submitting the proofs, but over that timeframe expect to develop other aggregation techniques).
Discussion
This issue is intended for discussion. There are a number of details to work out before drafting a FIP.
Impact
The proof verification syscall accounts for 88% of SubmitWindowPoSt's gas cost, and loading the thousands of SectorOnChainInfo that form public inputs for the bulk of the remainder. Both of these are avoided for valid proofs, and the cost paid by a challenger rather than the miner. So the gas cost reduction will be in the range of 10-20x (maybe more for full partitions).
Rather than every node on the network validating every proof, we instead need that at least one node verifies every proof.
Note that a similar technique could be applied to ProveCommit proof verifications too, but that's a bit trickier and out of scope for this proposal.
Incentives
This proposal does not include a reward for a successful challenge, though one could be added.
Verification mechanics
Off-chain verification lends itself to continued technical improvements without the need for protocol upgrades.
Risks
Some risks to consider and satisfy ourselves about.
Implementation notes
The miner state update required for a successful challenge will be very similar to the state change currently implemented during the deadline cron when a "missed PoSt" is detected. Snapshotting the partition state is expected to be cheap since we can content-address state that already exists in the state tree.
Since submitting a proof will no longer involve loading all the sector information, we can probably increase the number of partitions that may be batched into a single submission (currently, and somewhat arbitrarily, set to 4).
Open questions
A bunch of details to be worked out include:
The text was updated successfully, but these errors were encountered: