autosetup: keep solc_optimize_map consistent when files change - #105
Merged
jar-ben merged 5 commits intoJul 27, 2026
Merged
Conversation
naftali-g
approved these changes
Jul 26, 2026
shellygr
added a commit
that referenced
this pull request
Jul 29, 2026
Conflict resolution highlights, reconciling the branch with #88/#102/#105/#107: - _seed_compile_maps: master's setdefault-fold style extended to the declared solc_evm_version (folds into a pre-existing map as the default for uncovered contracts; seeded only when declared — absence means each solc's default, which a map entry cannot express). - The strict-Yul-steps rung and the relax-autofinders last resort are re-gated on master's map-aware _yul_optimizer_pending (the pre-#88 scalar check never fired in solc_optimize_map mode); ladder remains add-optimizer -> solc default Yul steps -> relax autofinder assertion, one rung per pass. - get_build_system_config_dict_with_updates: _reconcile_evm_version_keys runs BEFORE drop_scalars_superseded_by_maps — the helper expands the declared scalar into the map's missing entries, impossible once the scalar is dropped. - update_evm_version_map_for_contract added beside #105's update_optimize_map_for_contract and wired into _update_compiler_maps_for_new_contracts, so contracts added after compilation analysis keep the evm map total. - Both parents' appended test sections kept; the two #88 optimize-map ladder tests updated for the strict-steps rung (escalation now passes through strict_solc_optimizer, and enabling map entries no longer jumps straight to relaxing the autofinder assertion). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sync_compiler_maps_with_filesand_update_compiler_maps_for_new_contractsmaintained totality forcompiler_map/solc_via_ir_map/solc_evm_version_map, but notsolc_optimize_map. So when call resolution adds files to a conf that uses a per-contractsolc_optimize_map(non-uniformoptimizer_runs), the new files have no entry and certoraRun hard-rejects the conf ("files are not matched in solc_optimize_map") before any solc invocation.Changes
sync_compiler_maps_with_files: added asolc_optimize_maptrim block (keep only entries matching a contract infiles), mirroringsolc_via_ir_map/solc_evm_version_map.update_optimize_map_for_contract(new): mirrorsupdate_via_ir_map_for_contract— adds a map entry for a newly-added contract, using the reference map value when present else"200"(the established default; values are strings to match the map). Only the map form is extended; a scalarsolc_optimizealready covers every file._update_compiler_maps_for_new_contracts.Tests
tests/test_compiler_flag_reconciliation.py: added 4 cases (adds with default, prefers reference value, no-op without a map, no-op when already present). Full file: 12 passed.