AztecProtocol / dev-rel

All of Aztec's workshops, resources, tutorials, ideas, and useful tools
43 stars 17 forks source link

Flamegraph profile DEX alpha build winners #301

Closed critesjosh closed 2 months ago

critesjosh commented 3 months ago

helper script: https://github.com/AztecProtocol/aztec-packages/pull/7077/files profile: ~Batcher contracts: https://github.com/porco-rosso-j/aztec-dex-build~ AMM: https://github.com/madtechnologistproton/cloakfinance-ts

critesjosh commented 3 months ago

issues with installing old versions of the sandbox / bugs

critesjosh commented 3 months ago

So to get the constraint size - just rewrite one private function (swap_private), have dummy public function calls (only the ones that swap_private enqueues), also leave public storage out. And then pass the private method into the flamegraph

critesjosh commented 3 months ago

private token swap:

Opcode count: 895, Total gates by opcodes: 442598, Circuit size: 443059

Image