Cairo’s Continuous Memory Exercise II

What’s wrong with the following code?

func main():
    [ap] = 300
    [ap + 10000000000] = 400
    ret
end

Solution

The problem is that there is a huge gap in memory in the code and hence it will use an absurd amount of memory from the Prover when creating a cryptographic proof of an otherwise trivial program.

Reference

The exercise in this article can be found in this section of the Cairo docs.

So, what do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.