Skip to content
8 changes: 4 additions & 4 deletions yarn-project/simulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ It's able to simulate three different types of functions:

Private functions are simulated and proved client-side, and verified client-side in the private kernel circuit.

The public inputs of private functions is defined [here](../stdlib/src/structs/private_circuit_public_inputs.ts).
The public inputs of private functions are defined [here](../stdlib/src/structs/private_circuit_public_inputs.ts).

They are run with the assistance of a DB oracle that provides any private data requested by the function.

Expand All @@ -22,17 +22,17 @@ Private functions can call another private function, and can request to call a p

Public functions are simulated and proved on the sequencer side, and verified by the public kernel circuit.

The public inputs of public functions is defined [here](../stdlib/src/structs/avm/avm_circuit_public_inputs.ts).
The public inputs of public functions are defined [here](../stdlib/src/structs/avm/avm_circuit_public_inputs.ts).

They are run with the assistance of an oracle that provides any value read from the public state tree.

Public functions can call other public function, but no private functions.
Public functions can call other public functions, but cannot call private functions.

See the specifications of the [Aztec Virtual Machine (AVM) for public execution](./docs/avm/index.md).

### Unconstrained Functions

Unconstrained functions are useful to extract useful data for users that could produce very large execution traces - such as the summed balance of all a users notes
Unconstrained functions are useful to extract data for users that could produce very large execution traces - such as the summed balance of all of a user's notes.
They are not proved, and are simulated client-side.

They are run with the assistance of a DB oracle that provides any private data requested by the function.
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/simulator/docs/avm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public execution requests.
The AVM:
* Executes specified public bytecode, instruction by instruction, given some arguments.
* Meters execution by tracking gas costs per-executed-instruction.
* Tracks both "mana" (aka L2 gas) and "data availability" gas.
* Tracks both L2 gas (computation) and DA gas (data availability).
* Supports nested contract calls and conditional error recovery.
* Manages access to public state, L1↔L2 messages, public logs, and some limited private state.
* Finalizes state updates initiated during private execution.
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/simulator/docs/avm/gas.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Gas Metering

The AVM tracks gas consumption across two dimensions: **L2 gas** (execution costs, also called **mana**) and **DA gas** (data availability costs).
The AVM tracks gas consumption across two dimensions: **L2 gas** (execution costs) and **DA gas** (data availability costs). Note that L2 gas is _not_ the same as mana: mana is the higher-level unit of account that incorporates L2 gas, DA gas, and L1 gas costs together.

## Gas Dimensions

* **L2 Gas** (mana): roughly represents the computational cost of executing (and especially proving) operations.
* **L2 Gas**: roughly represents the computational cost of executing (and especially proving) operations.
* **DA Gas**: represents the cost of publishing data to Layer 1 for data availability. This includes:
- State updates that must be published to L1
- Emitting logs
Expand Down