You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C++ expects a length 8 (ARGS_LENGTH) array as input for abis__hash_constructor(), but TS is allowing any # of args. C++ has no clue since serialized arrays don't include a length prefix (only vectors do). So, in abis.test.ts, TS was calling hashConstructor with args of length 2, and C++ was assuming it should be length 8 and reading in garbage for the last 6 entries.
Whenever we call a cbind from TS that has a fixed-length std::array arg, TS should enforce that the length is correct. The other option would be to always accept dynamic length vectors in cbinds and enforce in C++ that they do not surpass the required length before copying them into a fixed-length array for use in circuits.
The text was updated successfully, but these errors were encountered:
C++ expects a length 8 (
ARGS_LENGTH
) array as input forabis__hash_constructor()
, but TS is allowing any # of args. C++ has no clue since serialized arrays don't include a length prefix (only vectors do). So, in abis.test.ts, TS was callinghashConstructor
withargs
of length 2, and C++ was assuming it should be length 8 and reading in garbage for the last 6 entries.Whenever we call a cbind from TS that has a fixed-length
std::array
arg, TS should enforce that the length is correct. The other option would be to always accept dynamic length vectors in cbinds and enforce in C++ that they do not surpass the required length before copying them into a fixed-length array for use in circuits.The text was updated successfully, but these errors were encountered: