Assertions should be failing for wasm relating to generator indices, but ASSERT does nothing in wasm.
When you build for --preset wasm with -DCMAKE_BUILD_TYPE=Debug (set during cmake configure or in wasm preset), it makes ASSERT work. Turns out the following assertion is failing for wasm, but it only materializes when in debug mode:
ASSERT(index.sub_index < num_generators_per_hash_index);
Assertion is here in get_generator_data.
In a non-debug build (when assertions are ignored), get_generator_data is called with index.sub_index = 34 while num_generators_per_hash_index is a constant 16 for wasm.
To replicate:
# checkout master
cd circuits/cpp
cmake --preset wasm -DCMAKE_BUILD_TYPE=Debug && cmake --build --preset wasm --target aztec3_circuits_abis_tests
wasmtime --dir .. ./build-wasm/bin/aztec3_circuits_abis_tests --env GTEST_FILTER=*.hash_vk*
Assertions should be failing for wasm relating to generator indices, but
ASSERTdoes nothing in wasm.When you build for
--preset wasmwith-DCMAKE_BUILD_TYPE=Debug(set during cmake configure or in wasm preset), it makesASSERTwork. Turns out the following assertion is failing for wasm, but it only materializes when in debug mode:Assertion is here in
get_generator_data.In a non-debug build (when assertions are ignored),
get_generator_datais called withindex.sub_index= 34 whilenum_generators_per_hash_indexis a constant 16 for wasm.To replicate: