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

Feature: Proof mode for the VM #34

Merged
merged 15 commits into from
Sep 10, 2023
Merged

Feature: Proof mode for the VM #34

merged 15 commits into from
Sep 10, 2023

Conversation

rodrigo-pino
Copy link
Contributor

@rodrigo-pino rodrigo-pino commented Sep 1, 2023

To prove correct execution, the cairo-runner must show to the verifier the execution proof. This proof consists of two elements: the execution trace (PC_i, AP_i, FP_i) for each instruction and the resulting memory. To accomplish this we added:

  1. Trace gathering while running instructions if PROOF_MODE is on.
  2. Relocation logic to organize segments as continuos memory.
  3. A new method Proof() which returns this values

pkg/vm/vm.go Outdated Show resolved Hide resolved
pkg/vm/vm.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ElijahVlasov ElijahVlasov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! Some parts are thought-provoking so left some comments :)

@rodrigo-pino rodrigo-pino merged commit 458945a into main Sep 10, 2023
3 checks passed
@rodrigo-pino rodrigo-pino deleted the feat-trace branch September 10, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants