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
517 stars 148 forks source link

add HintError::CustomHintEx and trait HintProcessorError #1540

Closed zuphitf closed 10 months ago

zuphitf commented 10 months ago

Add trait HintProcessorError and a CustomHintEx variant to HintError that uses the trait. The extended custom hint error is to be used by the hint processor in Starknet 's Blockifier to improve error handling.

Checklist

Oppen commented 10 months ago

We already use anyhow::Error to allow for custom VM errors coming mostly from the HintProcessor. Is there any reason we need a new trait rather than using that?

zuphitf commented 10 months ago

We already use anyhow::Error to allow for custom VM errors coming mostly from the HintProcessor. Is there any reason we need a new trait rather than using that?

We haven't noticed it. Thanks for pointing this out. Will try utilizing this error instead. Will close the PR for now.