diff --git a/include/nil/blueprint/extract_constructor_parameters.hpp b/include/nil/blueprint/extract_constructor_parameters.hpp index d29a3f0e..7ac59750 100644 --- a/include/nil/blueprint/extract_constructor_parameters.hpp +++ b/include/nil/blueprint/extract_constructor_parameters.hpp @@ -83,9 +83,10 @@ namespace nil { ptr_type input_ptr = static_cast( typename BlueprintFieldType::integral_type(detail::var_value(variables[input_value], assignment, internal_storage, gen_mode.has_assignments()).data)); if (gen_mode.has_assignments()) { + size_type elem_size = (BlueprintFieldType::number_bits + 7) / 8; for (std::size_t i = 0; i < input_length; i++) { - ASSERT(memory[input_ptr].size == (BlueprintFieldType::number_bits + 7) / 8); - const auto v = memory.load(input_ptr++); + const auto v = memory.load(input_ptr, elem_size); + input_ptr += elem_size; const auto value = detail::var_value(v, assignment, internal_storage, true); res.push_back(detail::put_internal_value(value, internal_storage)); } diff --git a/include/nil/blueprint/integers/bit_de_composition.hpp b/include/nil/blueprint/integers/bit_de_composition.hpp index 7a7d849a..79143b54 100644 --- a/include/nil/blueprint/integers/bit_de_composition.hpp +++ b/include/nil/blueprint/integers/bit_de_composition.hpp @@ -71,9 +71,10 @@ namespace nil { ptr_type result_ptr = static_cast( typename BlueprintFieldType::integral_type(detail::var_value (variables[result_value], assignment, internal_storage, true).data)); + size_type elem_size = (BlueprintFieldType::number_bits + 7) / 8; for (var v : result) { - ASSERT(memory[result_ptr].size == (BlueprintFieldType::number_bits + 7) / 8); - memory.store(result_ptr++, v); + memory.store(result_ptr, (BlueprintFieldType::number_bits + 7) / 8, v); + result_ptr += elem_size; } } } diff --git a/include/nil/blueprint/recursive_prover/fri_array_swap.hpp b/include/nil/blueprint/recursive_prover/fri_array_swap.hpp index 7b75d034..d05feb9d 100644 --- a/include/nil/blueprint/recursive_prover/fri_array_swap.hpp +++ b/include/nil/blueprint/recursive_prover/fri_array_swap.hpp @@ -80,8 +80,9 @@ namespace nil { detail::var_value (frame.scalars[result_value], assignment, internal_storage, true).data)); for (std::size_t i = 0; i < array_size; i++) { - ASSERT(memory[result_ptr].size == (BlueprintFieldType::number_bits + 7) / 8); - memory.store(result_ptr++, res[i]); + size_type elem_size = (BlueprintFieldType::number_bits + 7) / 8; + memory.store(result_ptr, elem_size, res[i]); + result_ptr += elem_size; } } } diff --git a/include/nil/blueprint/recursive_prover/fri_cosets.hpp b/include/nil/blueprint/recursive_prover/fri_cosets.hpp index b5fc3072..bbeab6de 100644 --- a/include/nil/blueprint/recursive_prover/fri_cosets.hpp +++ b/include/nil/blueprint/recursive_prover/fri_cosets.hpp @@ -74,8 +74,9 @@ namespace nil { (variables[result_value], assignment, internal_storage, true).data)); for (std::size_t i = 0; i < result.size(); i++) { for (std::size_t j = 0; j < 3; j++) { - ASSERT(memory[result_ptr].size == (BlueprintFieldType::number_bits + 7) / 8); - memory.store(result_ptr++, result[i][j]); + size_type elem_size = (BlueprintFieldType::number_bits + 7) / 8; + memory.store(result_ptr, elem_size, result[i][j]); + result_ptr += elem_size; } } }