Consolidate syscall handler trait implementations
igaray opened this issue · 0 comments
igaray commented
There are multiple implementations of the SyscallHandler trait used for various tests.
It would be good to consolidate them into a single, fully functional, public implementation.
If any of the implementations is substantially or justifiably different, it can be left out.
- https://github.com/lambdaclass/cairo_native/blob/main/src/utils.rs#L1193
- https://github.com/lambdaclass/cairo_native/blob/main/src/bin/utils/test.rs#L274
- https://github.com/lambdaclass/cairo_native/blob/main/tests/tests/starknet/syscalls.rs#L15
- https://github.com/lambdaclass/cairo_native/blob/main/tests/tests/starknet/keccak.rs#L13
- https://github.com/lambdaclass/cairo_native/blob/main/tests/tests/starknet/secp256.rs#L14
- The DummySyscallHandler in
starnet.rs
might possibly be an exemption - The implementations in the examples may also be an exception, as they hardcode values and leave stubs to keep the examples short. If in the process of consolidating syscall handler implementations a sufficiently functional one is achieved, they could also be replaced in the examples.
Good documentation of the implementation would be a great contribution.