Skip to content

Commit 557aede

Browse files
committed
feat: udpate example
1 parent 726f3f0 commit 557aede

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/docs/guides/developer_guides/smart_contracts/profiling_transactions.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ In this guide, we will look at how to profile the private execution of a transac
2424

2525
The profiling tool is integrated into the `aztec-wallet`.
2626

27-
In this example, we will profile a simple "private token transfer" transaction using the [transfer_in_private](https://github.com/AztecProtocol/aztec-packages/blob/master/noir-projects/noir-contracts/contracts/token_contract/src/main.nr#L376) method in the token contract.
27+
In this example, we will profile a simple "private token transfer" transaction which uses the [transfer](https://github.com/AztecProtocol/aztec-packages/blob/master/noir-projects/noir-contracts/contracts/token_contract/src/main.nr#L269) method in the token contract.
2828

2929
Let's deploy the necessary account and token contracts first:
3030

@@ -42,13 +42,13 @@ Now, the `user` can transfer tokens by running:
4242

4343
```bash
4444
# Send the tokens back to the owner
45-
aztec-wallet send transfer_in_private -ca token --args accounts:user accounts:owner 100 0 -f user
45+
aztec-wallet send transfer -ca token --args accounts:user accounts:owner 100 -f user
4646
```
4747

4848
Instead of sending the above transaction, you can simulate it by running the `simulate` command with the same parameters, and then add a `--profile` flag to profile the gate count of each private function in the transaction.
4949

5050
```bash
51-
aztec-wallet simulate --profile transfer_in_private -ca token --args accounts:user accounts:owner 100 0 -f user
51+
aztec-wallet simulate --profile transfer -ca token --args accounts:user accounts:owner 100 -f user
5252
```
5353

5454
This will print the following results after some time:
@@ -57,12 +57,12 @@ This will print the following results after some time:
5757
Gate count per circuit:
5858
SchnorrAccount:entrypoint Gates: 26,363 Acc: 26,363
5959
private_kernel_init Gates: 34,887 Acc: 61,250
60-
Token:transfer_in_private Gates: 128,095 Acc: 189,345
61-
private_kernel_inner Gates: 57,530 Acc: 246,875
62-
private_kernel_reset Gates: 86,600 Acc: 333,475
63-
private_kernel_tail Gates: 13,045 Acc: 346,520
60+
Token:transfer Gates: 28,229 Acc: 89,479
61+
private_kernel_inner Gates: 57,530 Acc: 147,009
62+
private_kernel_reset Gates: 86,600 Acc: 233,609
63+
private_kernel_tail Gates: 13,045 Acc: 246,654
6464

65-
Total gates: 346,520
65+
Total gates: 246,654
6666
```
6767

6868
Here you can see the gate count of each private function call in the transaction along with the kernel circuits needed in between, and the total gate count.

0 commit comments

Comments
 (0)