Results 10 issues of Facundo

### Aim Transpile to AVM bytecode ### Expected Behavior Should avoid using u254 integer ops, use Field instead or some other trick ### Bug `modulo_instruction` uses 254-bit integer multiplication to...

bug

### Aim Implement a trait for types implementing some other trait. E.g., SerializeToSlice based on Serialize. ```rust trait SerializeToSlice { fn serialize_to_slice(self) -> [Field]; } impl SerializeToSlice for [Field] {...

bug

PIL * Moved ALU lookups to alu.pil. These are mostly range checks and I expect them to be different once @IlyasRidhuan finishes setting up the gadget changes. CPP * Made...

IIUC, right now we calculate the inverse for a lookup if the source or target selector is 1. Moreover, we set the target selector to be 1 for ALL the...

optimisation
avm

There are currently some unconstrained steps, because otherwise we'd have multiple rows per opcode on the main trace.

avm

Hi there! When compiling with `-Wall` in clang (which is common practice), we get warnings (now errors) for basically any use of `tie`, `make_tuple`, `forward_as_tuple`, etc. See https://godbolt.org/z/zd9xfafEs (it has...

Also some changes to tx trace based on discussions.

TODO/COMMENTS * Think whether this approach makes sense * Document/comment caveats and footguns: e.g., you may not find a revertreason if you went beyond limits * Make tests pass *...

ci-full

If you compile with clag20-assert, this test fails. ``` [ RUN ] MerkleCheckTraceGenTest.MixedEvents vm2_tests: /mnt/user-data/facundo/aztec-packages/barretenberg/cpp/src/barretenberg/vm2/tracegen/merkle_check_trace.cpp:114: void bb::avm2::tracegen::MerkleCheckTraceBuilder::process(const simulation::EventEmitterInterface::Container &, TraceContainer &): Assertion `current_index_in_layer == 0' failed. ```

C-avm
team-bonobos

totalInstructions and manaUsed are broken since https://github.com/AztecProtocol/aztec-packages/pull/17952