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

feat(blobs): re-add brillig gates check to protocol circuits #10754

Open
Tracked by #8955
MirandaWood opened this issue Dec 16, 2024 · 0 comments
Open
Tracked by #8955

feat(blobs): re-add brillig gates check to protocol circuits #10754

MirandaWood opened this issue Dec 16, 2024 · 0 comments

Comments

@MirandaWood
Copy link
Contributor

After a new brillig unconstrained gates check was added to noir (possibly noir-lang/noir#6658), this slowed down the compile time of blob code from ~6mins to ~3hrs. To make it mergeable, I temporarily added --skip-brillig-constraints-check to any build commands.
We definitely want to check and catch underconstrained code in the future. Once this can be run in a reasonable time, removed the above flag from:

  • noir-projects/Earthfile (f420a79)
  • noir-projects/noir-protocol-circuits/bootstrap.sh (e6fc5b5)
This was referenced Dec 16, 2024
MirandaWood added a commit that referenced this issue Jan 8, 2025
Removes unecessary import of abis to `l1-publisher`, now that we add
errors to the `RollupAbi` (thanks to #10697). This means we can remove
my ugly code to try and catch blob and leonidas errors from a header
check.

---

Note: I found that the use of `getContractError` is still needed in
`tryGetErrorFromRevertedTx`. Viem doesn't play nice when simulating blob
txs and either doesn't allow blob sidecars (hence the `checkBlobSlot`
override) or doesn't throw an error to catch.

I found a middle ground where `prepareTransactionRequest` would throw
with the error we wanted in the case of a blob issue (e.g. incorrect
blob proof), but this error still only has the selector thrown and not
the custom name e.g.
`Execution reverted with reason: custom error 0x5ca17bef:
0113d536ef349476f9a5112623449dd1cf574b8213bc6fe33c1edd63bf832890.`
To get the name, I used viem's `getContractError` which works fine:
`The contract function "propose" reverted. Error:
Rollup__InvalidBlobProof(bytes32 blobHash)
(0x0113d536ef349476f9a5112623449dd1cf574b8213bc6fe33c1edd63bf832890)`

---

Another note: I also snuck in adding the issue number for #10754 in some
comments (sorry)
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

No branches or pull requests

1 participant