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
514 stars 144 forks source link

fix: make MemorySegmentManager.finalize() public #1771

Closed odesenfans closed 4 months ago

odesenfans commented 4 months ago

Context: this method is used in some of the bootloader hints, see here.

We are currently taking out the bootloader hints out of our fork of cairo-vm so we need this method to be public. This is among the last changes required to get this done and use upstream cairo-vm (probably one more change related to the initial value of exec_scopes but that's it).

Alternative solutions:

  1. Implement this hint in cairo-vm directly: this hint comes with quite a lot of code that is specific to the bootloader. I think it's simpler to make finalize() public, maybe with a disclaimer explaining why it's public to avoid mistakes.

Checklist