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

Jb/trim booster ground truth #4038

Merged
merged 12 commits into from
Aug 21, 2024
Merged

Jb/trim booster ground truth #4038

merged 12 commits into from
Aug 21, 2024

Conversation

jberthold
Copy link
Member

@jberthold jberthold commented Aug 19, 2024

When booster checks predicates with a given ground truth (a substitution and other predicates assumed true), this change filters the substitution and the ground truth to only contain predicates using relevant variables (from the predicates to check, and transitively from other relevant predicates).

As of now, the substitution parameter is always emtpy at the call
sites of `checkPredicates`, but we filter the substitution equations
anyway.

The helper functions are made local, they can be promoted later if
need be.
@jberthold jberthold marked this pull request as ready for review August 21, 2024 01:20
@jberthold
Copy link
Member Author

KEVM test perfomance appears unchanged (this change probably only pays off for larger proofs)

Test jb-trim-booster-ground-truth time master-cfebf1216 time (jb-trim-booster-ground-truth/master-cfebf1216) time
erc20/ds/totalSupply-spec.k 39.43 41.32 0.9542594385285575
kontrol/test-expectcalltest-testexpectregularcall-0-spec.k 41.83 43.69 0.957427328908217
benchmarks/ecrecoverloop02-sig0-invalid-spec.k 61.43 64.16 0.9574501246882794
benchmarks/ecrecoverloop02-sigs-valid-spec.k 76.84 80.15 0.9587024329382408
benchmarks/overflow00-nooverflow-spec.k 40.29 38.91 1.0354664610639939
mcd/flopper-file-pass-rough-spec.k 338.03 321.09 1.052757793764988
TOTAL 597.85 589.32 1.0144743093735151

@jberthold
Copy link
Member Author

kontrol also without performance change.

Test jb-trim-booster-ground-truth time master-cfebf1216 time (jb-trim-booster-ground-truth/master-cfebf1216) time
ExpectRevertTest.testFail_expectRevert_empty() 11.99 14.63 0.8195488721804511
ExpectCallTest.testExpectStaticCall() 17.13 19.67 0.8708693441789526
FeeTest.test_fee_setup() 25.91 28.13 0.9210806967650196
kontrol/src/tests/integration/test_foundry_prove.py::test_foundry_prove_skips_setup 102.87 111.52 0.9224354375896701
],uint256)) 40.09 42.51 0.9430722183015762
CoinBaseTest.test_coinbase_setup() 27.31 28.91 0.9446558284330681
FreshBytesTest.test_symbolic_bytes_1 35.42 36.83 0.9617159923975022
HevmTests.prove_revert 11.93 12.4 0.9620967741935483
AssertTest.test_assert_true_branch(uint256) 35.01 36.36 0.9628712871287128
BMCLoopsTest.test_countdown_concrete() 12.78 13.27 0.9630746043707611
FreshCheatcodes.test_address() 17.11 17.75 0.9639436619718309
LabelTest.testLabel() 12.24 12.68 0.9652996845425867
AssertTest.checkFail_assert_false() 22.18 21.4 1.0364485981308411
SetUpTest.testSetupData() 27.92 26.55 1.0516007532956686
ExpectRevertTest.testFail_expectRevert_bytes4() 22.83 20.39 1.119666503187837
ExpectCallTest.testExpectRegularCall() 19.25 17.0 1.1323529411764706
ExpectRevertTest.testFail_expectRevert_multipleReverts() 19.61 17.0 1.153529411764706
TOTAL 461.58 477.0 0.9676729559748429

@rv-jenkins rv-jenkins merged commit 3230905 into master Aug 21, 2024
6 checks passed
@rv-jenkins rv-jenkins deleted the jb/trim-booster-ground-truth branch August 21, 2024 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants