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

Step circuit instance encoding solidity (with tests) #21

Merged
merged 18 commits into from
Oct 10, 2023

Conversation

willemolding
Copy link
Collaborator

@willemolding willemolding commented Oct 3, 2023

Depends on #18 . Merge that first once it is ready.

  • Adds a Solidity implementation of the instance hashing for the step circuit in a library
  • Exposes this in a test contract so it can be deployed and tested
  • Adds a new module to step.rs in the integration tests that ensures it exactly matches the Rust implementation
    • This uses automatically generated ABIs from the build artifacts and reads code from the out directory in contracts
  • Adds CI task for building contracts as these are needed for the Rust tests now

There are only 2 files with changes that really need reviewing (contracts/src/SyncStepLib.sol and lightclient-circuits/tests/step.rs). The rest of the changes are mainly version bumps and changes to the contracts dir setup so it all works and builds again.

The provided tests should give immediate feedback if there are any changes between the two implementations in the future.

@willemolding willemolding requested review from nulltea and ec2 and removed request for nulltea October 3, 2023 23:03
Copy link
Member

@nulltea nulltea left a comment

Choose a reason for hiding this comment

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

Looks good! The question about the solidity version in generated contracts can be addressed separately or in the next PR

contracts/snark-verifiers/sync_step.sol Outdated Show resolved Hide resolved
@willemolding willemolding merged commit 029283d into main Oct 10, 2023
1 check passed
@willemolding willemolding deleted the willem/step-instance-encoding-solidity branch October 10, 2023 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants