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

Integrate risc0-ethereum on CI #1525

Merged
merged 56 commits into from
Mar 19, 2024
Merged

Integrate risc0-ethereum on CI #1525

merged 56 commits into from
Mar 19, 2024

Conversation

capossele
Copy link
Contributor

@capossele capossele commented Mar 7, 2024

  • Drop Ethereum crates, now moved into the risc0-ethereum own repo
  • Update the xtask bootstrap-groth16 tool to work with the external risc0-ethereum repo
  • Fix ceremony.dockerfile
  • Add to CI a workflow to check when changes brake our ethereum-related repos (risc0-ethereum and bonsai-foundry-template). The patching is done via a python script rather than with Cargo patch as it is more flexible, allowing to also patch git submodule dependencies without requiring any changes on the external repos.
    These checks also include checking the Solidity verifier (on risc0-ethereum) against a Groth16 receipt generated from the risc0 repo.
    • risc0-ethereum
    • bonsai-foundry-template

TODO:

  • remove the capossele/risc0-CI branch once we land the required changes on risc0-ethereum #38 and bonsai-foundry-template #89
  • move the governance example to risc0-ethereum and adjust its website's related links temporarly to 0.20 branch

Resolves: https://github.com/risc0/scratch/issues/270
Resolves: #1406

Copy link

vercel bot commented Mar 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2024 9:55am

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-1525.d1uc3c4lom8wx5.amplifyapp.com

@capossele
Copy link
Contributor Author

Converting to draft until we fix one small issue after some introduced changes

@capossele
Copy link
Contributor Author

We got a green light for an integration test against a modified branch of risc0-ethereum and bonsai-foundry-template here: https://github.com/risc0/risc0/actions/runs/8327243926/job/22784515671?pr=1525
Switching to ready for review again

// When running a new ceremony, update them by running cargo xtask bootstrap-groth16.
// Constants from: risc0-ethereum/contracts/src/groth16/Groth16Verifier.sol
// When running a new ceremony, update them by running cargo xtask bootstrap-groth16
// after udpating the new Groth16Verifier.sol on the risc0-ethereum repo.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a future improvement of this will be to save each ID to a file so we can update them more easily by running the bootstrap command rather than copy/paste. we could do include_str!(file); where file contains the id's themselves that get updated. I know a few places where we could do something like this like the reproducible build workflow so we could pile them up into a single gh issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

btw - no action needed on this, I'm just thinking out loud

env:
RUST_BACKTRACE: full
steps:
# This is a workaround from: https://github.com/actions/checkout/issues/590#issuecomment-970586842
Copy link
Contributor

Choose a reason for hiding this comment

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

This is another comment, no action needed at this time: so now that we don't have any sub-modules in risc0, we could consider dropping this workaround. We can still keep it around though

Copy link
Contributor

@nategraf nategraf left a comment

Choose a reason for hiding this comment

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

Just gave this another look. Thanks for making those changes! I think this looks good 👌

.github/cargo_local_patch.py Outdated Show resolved Hide resolved
@capossele capossele merged commit dba225f into main Mar 19, 2024
31 of 33 checks passed
@capossele capossele deleted the capossele/risc0-ethereum-CI branch March 19, 2024 10:46
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.

[BUG] Building the entire workspace fails (missing req.)
3 participants