-
Notifications
You must be signed in to change notification settings - Fork 10
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
Certora verification #103
Comments
Why do we "hash a hash" for getting the Proof challenge? codex-contracts-eth/contracts/Proofs.sol Line 61 in 70b22b2
|
I still do not understand the "Period * 67" in calculation of the pointer: #75 |
My thinking at the time was that proof-of-work mining usually imposes some kind of structure on the block hash (e.g. the hash should start with 10 zeroes). That could be bad for the calculation of proof probability, so I just added another hash to make sure that there's no structure in the challenge. |
There is a small explanation in the commit that introduces it, but I'll try to elaborate a bit. Every time that we go to a new period, we have to select a new block hash from the list of 256 block hashes that are available in the EVM. First we did the naive thing, which is to add the period to the block hash pointer: To alleviate this, we want to move the pointer by more than 1 every period. If we choose to move the pointer by 64 then we can be sure that we move out of the pointer downtime window should we be in it: To avoid these cycles, we can choose a prime number to increase the pointer by every period. The closest prime number larger than 64 is 67, so we end up with: |
Should Proof's |
codex-contracts-eth/contracts/Proofs.sol Line 86 in 70b22b2
I assume this is there in order to scale the probability to compensate for downtime? |
codex-contracts-eth/contracts/Proofs.sol Line 122 in 70b22b2
Should we potentially emit an event for when Proof was marked as missed? |
I chose to just support it and interpret it as |
Yes, indeed. See also: https://github.com/codex-storage/codex-research/blob/master/design/storage-proof-timing.md#pointer-downtime |
So far we've only added events that were needed for the code nodes to do their job. What would be the use of this event? |
Should we check in the |
I thought about it and decided not to. There's no harm in providing more proofs than needed. And adding a check for it could actually be harmful, because a proof requirement can be dropped at the last moment due to a wrap-around of the block pointer. |
@AuHau are we ok to close this issue? |
During writing Application Properties for Certora integration, I am slowly discovering a lot of small things that should be fixed, but maybe not necessarily need a whole issue. I will dump them here and afterwards fix them.
The text was updated successfully, but these errors were encountered: