You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
In some situations, we have a top-level Cairo program that itself executes other Cairo programs.
The Cairo Runner is being initialized with the top-level program. This means that, when executing hint, the constants passed to the hint belong to the top-level program. If the inner programs has hints that depends on constants defined only in the inner program, then the execution would fail as the constants are being searched in the top-level program's constants, and not in the inner program's constants.
This PR fixes this by having the constants specified on compile_hint, rather than on execute_hint. When compiling a hint for the inner program, we can specify the constants of that inner program.
Breaking Changes
This PR introduces breaking changes:
The signature of the HintProcessor methods changed. We now specify constants on compile_hint, rather than on execute_hint.
The CairoRunner::step_hint method no longer receives the program constants, as they no longer require it.
The CairoRunner::step method only receives constants when the test-utils features is enabled, as its used for the pre/post step hooks.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.66%. Comparing base (d2f7b09) to head (e8978b6). ⚠️ Report is 1 commits behind head on 2.x.y.
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.
In some situations, we have a top-level Cairo program that itself executes other Cairo programs.
The Cairo Runner is being initialized with the top-level program. This means that, when executing hint, the constants passed to the hint belong to the top-level program. If the inner programs has hints that depends on constants defined only in the inner program, then the execution would fail as the constants are being searched in the top-level program's constants, and not in the inner program's constants.
This PR fixes this by having the constants specified on
compile_hint
, rather than onexecute_hint
. When compiling a hint for the inner program, we can specify the constants of that inner program.Breaking Changes
This PR introduces breaking changes:
compile_hint
, rather than onexecute_hint
.CairoRunner::step_hint
method no longer receives the program constants, as they no longer require it.CairoRunner::step
method only receives constants when thetest-utils
features is enabled, as its used for the pre/post step hooks.