Generate reference test files #66
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes issue #33
Added several programs to e2e_test/Cairo
basic - simple arithmetic operations
bitwise - simple bitwise operations
ecdsa - checks signature
hash_pedersen - performs pedersen hashing
hash_poseidon - performs poseidon hashing
keccak - calculates hash
Added script to generate test files in the test_files folder test_generate_files.sh Updated test.sh to generate and check proofs for all new programs
NOTE: despite the fact that I've added keccak and bitwise programs. They do not work. Keccak alledgedly requires starknet os environemnt @m-kus might provide more accurate explanation. For some reason bitwise operators are not implemented in cairo1 for felt252. There might a separate function for that, but I got really tired debugging rest of the cases that decided to leave it out of scope.
While implementing this I realised that I should've probably created test matrix with layouts in columns and builtins in rows and try to tick as many points as possible, but, well, If only I knew where I'm going to fall.
I've struggled a lot to find a way to pass arguments to cairo program, and realised how to do that only today (almost at the end). I'd love to update programs to a more interesting examples, and happy to do that on request. For now I've decided to at least commit what has been done.