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 13 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.630
workspace 123.190
regression_4709 315.940
ram_blowup_regression 512.570
rollup-root 498.700
rollup-merge 473.340
rollup-block-root 1230.000
rollup-block-merge 498.710
rollup-base-public 734.390
rollup-base-private 590.800
private-kernel-tail 180.840
private-kernel-reset 245.440
private-kernel-inner 208.840

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Compilation Memory Report

Program Peak Memory
keccak256 77.560
workspace 123.870
regression_4709 424.070
ram_blowup_regression 1460.000
rollup-root 601.600
rollup-merge 494.440
rollup-block-root-single-tx 16060.000
rollup-block-root-empty 489.060
rollup-block-root 16070.000
rollup-block-merge 601.590
rollup-base-public 2380.000
rollup-base-private 1140.000
private-kernel-tail 207.250
private-kernel-reset 584.400
private-kernel-inner 294.620

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Compilation Report

Program Compilation Time %
sha256_regression 1.190s 15%
regression_4709 0.821s 2%
ram_blowup_regression 17.200s 6%
rollup-root 3.622s 1%
rollup-merge 2.112s 1%
rollup-block-root-single-tx 137.000s -6%
rollup-block-root-empty 2.068s -1%
rollup-block-root 138.000s -1%
rollup-block-merge 3.746s 6%
rollup-base-public 48.040s 73%
rollup-base-private 14.320s 40%
private-kernel-tail 0.966s -4%
private-kernel-reset 6.480s 7%
private-kernel-inner 2.058s -1%

Copy link
Contributor

github-actions bot commented Jan 14, 2025

Execution Report

Program Execution Time %
sha256_regression 0.052s -2%
regression_4709 0.001s 0%
ram_blowup_regression 0.601s 1%
rollup-root 0.104s 0%
rollup-merge 0.007s 0%
rollup-block-root 38.900s 1%
rollup-block-merge 0.104s 0%
rollup-base-public 1.224s 0%
rollup-base-private 0.455s 0%
private-kernel-tail 0.019s 0%
private-kernel-reset 0.313s 0%
private-kernel-inner 0.067s -2%

@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

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Compilation Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.10.

Benchmark suite Current: 0effedd Previous: dd70845 Ratio
sha256_regression 1.19 s 1.03 s 1.16
rollup-base-public 48.04 s 27.66 s 1.74
rollup-base-private 14.32 s 10.16 s 1.41

This comment was automatically generated by workflow using github-action-benchmark.

CC: @TomAFrench

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