Skip to content

Files

Latest commit

3166529 · Dec 12, 2024

History

History
This branch is 49 commits ahead of, 1254 commits behind AztecProtocol/aztec-packages:master.

avm-transpiler

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 7, 2024
Dec 6, 2024
Jan 31, 2024
Oct 11, 2024
May 29, 2024
Dec 12, 2024
Nov 25, 2024
Nov 7, 2024
Nov 7, 2024
Nov 25, 2024
Mar 7, 2024
Oct 11, 2024
Apr 23, 2024

AVM Transpiler

This component transpiles Aztec public contracts code from Noir's Brillig bytecode to AVM (Aztec Virtual Machine) bytecode.

Build

./bootstrap.sh

Run

cargo run <aztec-contract-artifact-json> <transpiled-output-json>

Testing Transpiler Changes

After bootstrap in avm-transpiler, go to noir-contracts and only compile avm_test_contract with:

nargo compile --package avm_test_contract --inliner-aggressiveness=0 --silence-warnings

Important: use the right nargo binary located in aztec-packages/noir/noir-repo/target/release/nargo If required, build nargo by going in noir/noir-repo and run cargo build --release.

Then, transpile it:

scripts/transpile.sh

Go to yarn-project/simulator and run:

yarn build:fast

This takes in the TS generated by the compilation and transpilation.

Finally, run

yarn test src/avm/avm_simulator.test.ts

To test against some .cpp changes, compile the bb binary and run bb prover test:

yarn test src/avm_proving.test.ts