lambdaclass / cairo-vm

cairo-vm is a Rust implementation of the Cairo VM. Cairo (CPU Algebraic Intermediate Representation) is a programming language for writing provable programs, where one party can prove to another that a certain computation was executed correctly without the need for this party to re-execute the same program.
https://lambdaclass.github.io/cairo-vm
Apache License 2.0
522 stars 150 forks source link

feat: SECP related hints #1829

Open odesenfans opened 2 months ago

odesenfans commented 2 months ago

Context: port of the Starknet OS to Rust.

We need an implementation of the hints used by the Starknet OS in the SECP syscalls. These hints rely on private primitives in cairo-vm and must be implemented in this repository.

Checklist

pefontana commented 1 month ago

Hi @odesenfans !! Sorry the delay, we didn't saw this PR Can you merge to main and solve the conflicts?

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 57.26950% with 241 lines in your changes missing coverage. Please review.

Project coverage is 94.31%. Comparing base (63b4a55) to head (5337a25). Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...int_processor/builtin_hint_processor/secp/hints.rs 64.57% 169 Missing :warning:
...int_processor/builtin_hint_processor_definition.rs 14.28% 72 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1829 +/- ## ========================================== - Coverage 94.83% 94.31% -0.53% ========================================== Files 101 102 +1 Lines 39579 40142 +563 ========================================== + Hits 37536 37858 +322 - Misses 2043 2284 +241 ``` | [Flag](https://app.codecov.io/gh/lambdaclass/cairo-vm/pull/1829/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lambdaclass) | Coverage Δ | | |---|---|---| | [](https://app.codecov.io/gh/lambdaclass/cairo-vm/pull/1829/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lambdaclass) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=lambdaclass#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pefontana commented 1 month ago

@odesenfans some more points:

whichqua commented 2 weeks ago

@pefontana The requested changes and integration tests have been added. Please feel free to run the workflows and review the code.

pefontana commented 6 days ago

@whichqua sorry for the delay, you can ping me on telegram if I don't respond here https://t.me/Pedrofontana5 Some CI checks are failing

whichqua commented 5 days ago

@JulianGCalderon @pefontana Let me know if there is anything else needed. Would be nice to get the tests passing.

JulianGCalderon commented 4 days ago

Hi @whichqua, two jobs seem to be failing:

The second job fails because the hint is not found. This is because this job on the CI runs all the standalone files in cairo_programs and compares it's execution. You could try to move these files to another directory cairo_programs/cairo-0-secp-hints-feature and see if it fixes it. Keep in mind that this will probably fix the CI, but it will not fix the underlying error that is breaking the first job.