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(ssa): Expand feature set of the Brillig constraint check #7060

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

rkarabut
Copy link
Contributor

@rkarabut rkarabut commented Jan 14, 2025

Description

This PR resolves a number of issues that came up in the initial introduction of the Brillig constraint check, expanding its feature set.

Problem

#6698, #6706, #6713, #6735

Summary

Resolves #6698 by creating and maintaining additional tainted value sets for every result array element, #6713 by tracking EnableSideEffectsIf condition values, and #6735 along with #6706 by introducing a quick pass gathering information on Brillig calls. New tests for every issue are included.

As fixing #6698 makes the check_underconstrained_regression test program (correctly) issue a bug warning now, the program has been updated to properly constrain the involved array elements.

Additional Context

Documentation

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Execution Memory Report

Program Peak Memory
keccak256 74.69M
workspace 123.86M
regression_4709 316.01M
ram_blowup_regression 512.61M
rollup-root 230.97M
rollup-merge 205.71M
rollup-block-root 1.03G
rollup-block-merge 230.98M
rollup-base-public 479.05M
rollup-base-private 324.89M
private-kernel-tail 180.70M
private-kernel-reset 245.31M
private-kernel-inner 208.71M

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Compilation Memory Report

Program Peak Memory
keccak256 77.63M
workspace 123.53M
regression_4709 424.14M
ram_blowup_regression 1.46G
rollup-root 336.79M
rollup-merge 229.76M
rollup-block-root-single-tx 15.97G
rollup-block-root-empty 223.93M
rollup-block-root 15.97G
rollup-block-merge 336.78M
rollup-base-public 2.12G
rollup-base-private 874.53M
private-kernel-tail 207.25M
private-kernel-reset 584.27M
private-kernel-inner 294.47M

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Compilation Report

Program Compilation Time %
sha256_regression 1.300s 28%
regression_4709 0.807s -2%
ram_blowup_regression 17.700s 9%
rollup-root 3.444s 3%
rollup-merge 1.984s 6%
rollup-block-root-single-tx 140.000s -1%
rollup-block-root-empty 2.036s 5%
rollup-block-root 139.000s -3%
rollup-block-merge 3.640s 6%
rollup-base-public 130.000s 328%
rollup-base-private 20.800s 109%
private-kernel-tail 0.956s -3%
private-kernel-reset 6.702s 7%
private-kernel-inner 2.140s 5%

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Execution Report

Program Execution Time %
sha256_regression 0.051s -2%
regression_4709 0.001s 0%
ram_blowup_regression 0.601s -1%
rollup-root 0.104s 0%
rollup-merge 0.006s 0%
rollup-block-root 36.500s -2%
rollup-block-merge 0.106s 1%
rollup-base-public 1.218s -2%
rollup-base-private 0.451s 0%
private-kernel-tail 0.019s 0%
private-kernel-reset 0.320s 2%
private-kernel-inner 0.068s 0%

@TomAFrench
Copy link
Member

image

This is a pretty brutal increase, we may need to switch off this check by default if this is unavoidable.

@rkarabut
Copy link
Contributor Author

This is a pretty brutal increase, we may need to switch off this check by default if this is unavoidable.

Indeed, would have to look into it

@TomAFrench
Copy link
Member

TomAFrench commented Jan 15, 2025

#6698, #6706, #6713, #6735

Can you mark which of these this PR closes? I'd like to avoid dangling issues.

@rkarabut
Copy link
Contributor Author

Can you mark which of these this PR closes? I'd like to avoid dangling issues.

Should be all of them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants