risc0 / risc0-foundry-template

Template for integrating RISC Zero and Ethereum using Foundry
https://risczero.com
95 stars 55 forks source link

New Bonsai Foundry Template #74

Closed capossele closed 7 months ago

capossele commented 8 months ago

Closes https://github.com/risc0/risc0/issues/1219 Closes https://github.com/risc0/risc0-ethereum/issues/4

nategraf commented 8 months ago

How can the developer run tests of their contract without calling out to Bonsai for a proof each time? In particular, how could they get checks running in their CI?

I accidentally hit send before reaching the end of the PR. I see it now, the mock verifier in the test folder.

nategraf commented 8 months ago

Nice work on this! It is much much simpler in terms of conceptual load on the developer and a big progression over the previous version!

nategraf commented 8 months ago

I went about taking the new template for a test drive, and ran into a few issues. https://github.com/risc0/bonsai-foundry-template/pull/76 contains a number of suggestions I had from the process of trying to use and understand the template better.

I also noticed that when I checked out the branch, forge test was actually failing 😕 . I did not end up having enough time today to look into it.

nategraf commented 8 months ago

I've opened https://github.com/risc0/bonsai-foundry-template/pull/77 with some more suggestions. I think there is a still a lot we can make better, but today I was able to walk through the README and deployment guide without errors, after this round of edits. I think with those suggestions, we've reached a point where it's better than what we have on main now, and we can go ahead and merge. I've started collecting TODOs to resolve

nategraf commented 8 months ago

One big open for me is: How can we give people a path to actually integrating with their own application. I worry to current approach with the CLI doesn't strike the right balance because it is not something that folks would ever actually use in a production or testnet deployment, but it also hides enough details and provides enough magic that it's unclear how a user should proceed. The Ethereum SDK is definitely a step in the right direction, but it's current form needs some love before it seems like something we should advice devs to import and use in their applications.

pdg744 commented 8 months ago

It looks to me like the new numbered steps no longer align with the diagram -- is this diagram still helpful? image

EDIT: nvm; this diagram has been deprecated :)

capossele commented 8 months ago

It looks to me like the new numbered steps no longer align with the diagram -- is this diagram still helpful? image

I thought that has been removed/replaced by the new one, no?

nategraf commented 8 months ago

Marking this PR as "draft" to indicate that there is some ongoing refactoring and a dependency on publishing the new risc0-ethereum repository, in which the contracts currently in risc0 will live.