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

fix: resolve misc bugs handling phases in avm witgen #11218

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

Conversation

dbanks12
Copy link
Collaborator

@dbanks12 dbanks12 commented Jan 14, 2025

  • At the end of teardown, witgen needs to reset gas back to parent's end gas.
  • Make sure that order of enqueued calls is right in TX for bb-prover tests (should be a stack)
  • Add a test that reverts in teardown and can still be proven

Copy link
Contributor

Changes to circuit sizes

Generated at commit: 1370387154bf37fc75bd29575ca3e4f3771b2f28, compared to commit: 107f1754c7fc33cda1c3afb820b3b099745882ed

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_tail -1 ✅ -0.02% 0 ➖ 0.00%
private_kernel_reset -2 ✅ -0.00% -2 ✅ -0.00%
private_kernel_reset_0_0_0_64_0_0_0_0_0 -2 ✅ -0.01% -2 ✅ -0.00%
private_kernel_reset_0_64_0_0_0_0_0_0_0 -2 ✅ -0.01% -2 ✅ -0.00%
private_kernel_reset_32_32_32_32_32_32_32_32_32 -2 ✅ -0.00% -3 ✅ -0.00%
private_kernel_reset_32_16_32_16_4_4_64_64_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_16_4_4_64_64_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_16_4_4_64_4_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_16_16_16_16_16_16_16_16_16 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_16_4_4_64_4_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_16_4_4_4_64_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_16_4_4_4_64_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_16_4_4_4_4_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_16_4_4_4_4_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_16_4_4_64_64_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_4_4_4_64_64_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_16_4_4_64_64_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_16_4_4_64_4_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_4_4_4_64_64_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_4_4_4_64_4_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_16_4_4_64_4_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_4_4_4_64_4_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_16_4_4_4_64_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_4_4_4_4_64_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_16_4_4_4_64_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_16_4_4_4_4_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_4_4_4_4_64_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_4_4_4_4_4_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_16_4_4_4_4_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_16_32_4_4_4_4_4_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_4_4_4_64_64_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_4_4_4_64_64_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_4_4_4_64_4_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_4_4_4_64_4_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_4_4_4_4_64_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_4_4_4_4_64_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_4_4_4_4_4_32 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_0_0_0_0_64_0_0_0_0 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_32_4_32_4_4_4_4_4_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_4_4_4_4_4_4_4_4_4 -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_inner -2 ✅ -0.01% -3 ✅ -0.00%
private_kernel_reset_0_0_0_0_0_64_0_0_0 -2 ✅ -0.01% -3 ✅ -0.01%
private_kernel_reset_0_0_64_0_0_0_0_0_0 -2 ✅ -0.02% -3 ✅ -0.01%
private_kernel_reset_64_0_0_0_0_0_0_0_0 -2 ✅ -0.02% -3 ✅ -0.01%
private_kernel_tail_to_public -5 ✅ -0.04% -5 ✅ -0.01%
private_kernel_init -629 ✅ -3.34% -572 ✅ -1.43%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
private_kernel_tail 4,416 (-1) -0.02% 26,424 (0) 0.00%
private_kernel_reset 72,232 (-2) -0.00% 612,754 (-2) -0.00%
private_kernel_reset_0_0_0_64_0_0_0_0_0 27,568 (-2) -0.01% 267,847 (-2) -0.00%
private_kernel_reset_0_64_0_0_0_0_0_0_0 26,222 (-2) -0.01% 256,277 (-2) -0.00%
private_kernel_reset_32_32_32_32_32_32_32_32_32 47,641 (-2) -0.00% 336,681 (-3) -0.00%
private_kernel_reset_32_16_32_16_4_4_64_64_32 37,788 (-2) -0.01% 205,103 (-3) -0.00%
private_kernel_reset_32_16_32_16_4_4_64_64_4 35,371 (-2) -0.01% 200,494 (-3) -0.00%
private_kernel_reset_32_16_32_16_4_4_64_4_32 36,171 (-2) -0.01% 198,958 (-3) -0.00%
private_kernel_reset_16_16_16_16_16_16_16_16_16 33,976 (-2) -0.01% 196,346 (-3) -0.00%
private_kernel_reset_32_16_32_16_4_4_64_4_4 33,754 (-2) -0.01% 194,348 (-3) -0.00%
private_kernel_reset_32_16_32_16_4_4_4_64_32 35,510 (-2) -0.01% 189,310 (-3) -0.00%
private_kernel_reset_32_16_32_16_4_4_4_64_4 33,093 (-2) -0.01% 184,700 (-3) -0.00%
private_kernel_reset_32_16_32_16_4_4_4_4_32 33,893 (-2) -0.01% 183,164 (-3) -0.00%
private_kernel_reset_32_16_32_16_4_4_4_4_4 31,476 (-2) -0.01% 178,554 (-3) -0.00%
private_kernel_reset_32_4_32_16_4_4_64_64_32 34,728 (-2) -0.01% 163,310 (-3) -0.00%
private_kernel_reset_32_16_32_4_4_4_64_64_32 34,492 (-2) -0.01% 161,181 (-3) -0.00%
private_kernel_reset_32_4_32_16_4_4_64_64_4 32,311 (-2) -0.01% 158,701 (-3) -0.00%
private_kernel_reset_32_4_32_16_4_4_64_4_32 33,111 (-2) -0.01% 157,165 (-3) -0.00%
private_kernel_reset_32_16_32_4_4_4_64_64_4 32,075 (-2) -0.01% 156,572 (-3) -0.00%
private_kernel_reset_32_16_32_4_4_4_64_4_32 32,875 (-2) -0.01% 155,036 (-3) -0.00%
private_kernel_reset_32_4_32_16_4_4_64_4_4 30,694 (-2) -0.01% 152,555 (-3) -0.00%
private_kernel_reset_32_16_32_4_4_4_64_4_4 30,458 (-2) -0.01% 150,426 (-3) -0.00%
private_kernel_reset_32_4_32_16_4_4_4_64_32 32,450 (-2) -0.01% 147,517 (-3) -0.00%
private_kernel_reset_32_16_32_4_4_4_4_64_32 32,214 (-2) -0.01% 145,388 (-3) -0.00%
private_kernel_reset_32_4_32_16_4_4_4_64_4 30,033 (-2) -0.01% 142,907 (-3) -0.00%
private_kernel_reset_32_4_32_16_4_4_4_4_32 30,833 (-2) -0.01% 141,371 (-3) -0.00%
private_kernel_reset_32_16_32_4_4_4_4_64_4 29,797 (-2) -0.01% 140,778 (-3) -0.00%
private_kernel_reset_32_16_32_4_4_4_4_4_32 30,597 (-2) -0.01% 139,242 (-3) -0.00%
private_kernel_reset_32_4_32_16_4_4_4_4_4 28,416 (-2) -0.01% 136,761 (-3) -0.00%
private_kernel_reset_32_16_32_4_4_4_4_4_4 28,180 (-2) -0.01% 134,632 (-3) -0.00%
private_kernel_reset_32_4_32_4_4_4_64_64_32 31,432 (-2) -0.01% 119,388 (-3) -0.00%
private_kernel_reset_32_4_32_4_4_4_64_64_4 29,015 (-2) -0.01% 114,779 (-3) -0.00%
private_kernel_reset_32_4_32_4_4_4_64_4_32 29,815 (-2) -0.01% 113,243 (-3) -0.00%
private_kernel_reset_32_4_32_4_4_4_64_4_4 27,398 (-2) -0.01% 108,633 (-3) -0.00%
private_kernel_reset_32_4_32_4_4_4_4_64_32 29,154 (-2) -0.01% 103,595 (-3) -0.00%
private_kernel_reset_32_4_32_4_4_4_4_64_4 26,737 (-2) -0.01% 98,985 (-3) -0.00%
private_kernel_reset_32_4_32_4_4_4_4_4_32 27,537 (-2) -0.01% 97,449 (-3) -0.00%
private_kernel_reset_0_0_0_0_64_0_0_0_0 13,667 (-2) -0.01% 94,698 (-3) -0.00%
private_kernel_reset_32_4_32_4_4_4_4_4_4 25,120 (-2) -0.01% 92,839 (-3) -0.00%
private_kernel_reset_4_4_4_4_4_4_4_4_4 23,720 (-2) -0.01% 91,089 (-3) -0.00%
private_kernel_inner 29,224 (-2) -0.01% 73,089 (-3) -0.00%
private_kernel_reset_0_0_0_0_0_64_0_0_0 18,644 (-2) -0.01% 48,052 (-3) -0.01%
private_kernel_reset_0_0_64_0_0_0_0_0_0 11,374 (-2) -0.02% 34,663 (-3) -0.01%
private_kernel_reset_64_0_0_0_0_0_0_0_0 11,374 (-2) -0.02% 34,663 (-3) -0.01%
private_kernel_tail_to_public 12,626 (-5) -0.04% 38,123 (-5) -0.01%
private_kernel_init 18,196 (-629) -3.34% 39,420 (-572) -1.43%

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.

1 participant