Skip to content
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

Merged
merged 5 commits into from
Sep 29, 2023
Merged

Conversation

PlasmaPower
Copy link
Collaborator

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

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Aug 17, 2023
@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Merging #1814 (d8fa192) into master (4b170f7) will increase coverage by 0.10%.
The diff coverage is 39.69%.

@@            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     

joshuacolvin0
joshuacolvin0 previously approved these changes Sep 29, 2023
Copy link
Member

@joshuacolvin0 joshuacolvin0 left a 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) {
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

magicxyyz
magicxyyz previously approved these changes Sep 29, 2023
Copy link
Contributor

@magicxyyz magicxyyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@magicxyyz magicxyyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants