From 036496ce7496132b7376c9a6708a9a6ed460771d Mon Sep 17 00:00:00 2001 From: Ilyas Ridhuan Date: Mon, 6 Jan 2025 16:47:07 +0000 Subject: [PATCH] fix: add bytecode instances in reverse (#11064) Since we cache hints from earlier instances, when receiving hints for instances we keep the earliest hints Co-authored-by: David Banks <47112877+dbanks12@users.noreply.github.com> --- .../cpp/src/barretenberg/vm/avm/trace/execution_hints.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/trace/execution_hints.hpp b/barretenberg/cpp/src/barretenberg/vm/avm/trace/execution_hints.hpp index be57dc4da6d..dc554ebd2b5 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/trace/execution_hints.hpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/trace/execution_hints.hpp @@ -275,7 +275,7 @@ struct ExecutionHints { std::vector contract_instance_hints_vec; read(it, contract_instance_hints_vec); std::map contract_instance_hints; - for (const auto& instance : contract_instance_hints_vec) { + for (const auto& instance : std::views::reverse(contract_instance_hints_vec)) { contract_instance_hints[instance.address] = instance; }