-
Notifications
You must be signed in to change notification settings - Fork 453
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
Support new preimage types in proving #1814
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1814 +/- ##
==========================================
+ Coverage 28.59% 28.69% +0.10%
==========================================
Files 218 219 +1
Lines 32681 32709 +28
==========================================
+ Hits 9345 9386 +41
+ Misses 22275 22264 -11
+ Partials 1061 1059 -2 |
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.
LGTM
if s.config.CheckAlreadyExists { | ||
_, err = s.syncTo.GetByHash(ctx, hash) | ||
} | ||
if err == nil || errors.Is(err, ErrNotFound) { |
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.
I am a bit confused what is checked here
in case CheckAlreadyExists
is set, if err == nil
then GetByHash
must have succeeded and entry under hash
already exists, if the error is ErrNotFound
then GetByHash
didn't find entry under hash
.
Is it something that is required by some StorageServices? What is the logic here?
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.
Yeah this code doesn't look right but it's mostly unrelated to this PR. I'll open up a separate ticket to fix it.
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.
LGTM
6ecadc3
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.
LGTM
This PR adds the infrastructure for resolving additional types of preimages in proving, and as a proof of concept, adds sha256 support and uses it in the host io rust proving test. This is fully backwards compatible with older replay binaries.
Pulls in OffchainLabs/nitro-contracts#50