diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/trace/helper.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/trace/helper.cpp index f946ff6ed45..1960cac37b3 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/trace/helper.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/trace/helper.cpp @@ -116,6 +116,9 @@ std::string to_name(AvmError error) return "ENVIRONMENT VARIABLE UNKNOWN"; case AvmError::CONTRACT_INST_MEM_UNKNOWN: return "CONTRACT INSTANCE MEMBER UNKNOWN"; + default: + throw std::runtime_error("Invalid error type"); + break; } } diff --git a/barretenberg/cpp/src/barretenberg/vm/avm/trace/trace.cpp b/barretenberg/cpp/src/barretenberg/vm/avm/trace/trace.cpp index 336d3fb4831..90131c20715 100644 --- a/barretenberg/cpp/src/barretenberg/vm/avm/trace/trace.cpp +++ b/barretenberg/cpp/src/barretenberg/vm/avm/trace/trace.cpp @@ -3115,6 +3115,7 @@ ReturnDataError AvmTraceBuilder::op_revert(uint8_t indirect, uint32_t ret_offset pc = UINT32_MAX; // This ensures that no subsequent opcode will be executed. return ReturnDataError{ + .return_data = {}, .error = op_valid ? AvmError::NO_ERROR : AvmError::TAG_ERROR, }; } diff --git a/yarn-project/simulator/src/avm/opcodes/ec_add.test.ts b/yarn-project/simulator/src/avm/opcodes/ec_add.test.ts index 46629398e38..7fe9e7ac199 100644 --- a/yarn-project/simulator/src/avm/opcodes/ec_add.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/ec_add.test.ts @@ -4,7 +4,7 @@ import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { beforeEach } from '@jest/globals'; import { type AvmContext } from '../avm_context.js'; -import { Field, Uint32 } from '../avm_memory_types.js'; +import { Field, Uint1, Uint32 } from '../avm_memory_types.js'; import { initContext } from '../fixtures/index.js'; import { EcAdd } from './ec_add.js'; @@ -47,7 +47,7 @@ describe('EC Instructions', () => { it(`Should double correctly`, async () => { const x = new Field(grumpkin.generator().x); const y = new Field(grumpkin.generator().y); - const zero = new Uint32(0); + const zero = new Uint1(0); context.machineState.memory.set(0, x); context.machineState.memory.set(1, y); @@ -81,7 +81,7 @@ describe('EC Instructions', () => { it('Should add correctly', async () => { const G2 = grumpkin.add(grumpkin.generator(), grumpkin.generator()); - const zero = new Uint32(0); + const zero = new Uint1(0); const x1 = new Field(grumpkin.generator().x); const y1 = new Field(grumpkin.generator().y);