Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Enables JSON logging in AWS #8096

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

spalladino
Copy link
Collaborator

@spalladino spalladino commented Aug 21, 2024

Cloudwatch is smart enough to parse JSON logs, and we can use the different fields extracted for querying in Insights.

Builds on #8095

Cloudwatch is smart enough to parse JSON logs, and we can use the
different fields extracted for querying in Insights.
@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • avm_simulation_time_ms (Token:mint_public): 69.8 (+57%)
  • avm_simulation_time_ms (Token:assert_minter_and_mint): 39.7 (-41%)
Detailed results

All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.

This benchmark source data is available in JSON format on S3 here.

Proof generation

Each column represents the number of threads used in proof generation.

Metric 1 threads 4 threads 16 threads 32 threads 64 threads
proof_construction_time_sha256_ms 5,760 1,552 706 (+1%) 755 (-1%) 775 (+1%)
proof_construction_time_sha256_30_ms 11,859 (-1%) 3,197 1,421 (-15%) 1,466 (-8%) 1,490 (-3%)
proof_construction_time_sha256_100_ms 45,453 (+1%) 12,181 6,666 5,618 (-6%) 5,417 (-4%)
proof_construction_time_poseidon_hash_ms 78.0 34.0 34.0 58.0 86.0 (-1%)
proof_construction_time_poseidon_hash_30_ms 1,527 420 202 228 269 (+1%)
proof_construction_time_poseidon_hash_100_ms 5,633 1,511 679 (+1%) 715 (-4%) 744 (-1%)

L2 block published to L1

Each column represents the number of txs on an L2 block published to L1.

Metric 4 txs 8 txs 16 txs
l1_rollup_calldata_size_in_bytes 4,324 7,844 14,852
l1_rollup_calldata_gas 49,612 92,488 177,656
l1_rollup_execution_gas 1,383,106 2,130,950 3,958,157
l2_block_processing_time_in_ms 251 (-3%) 435 (-4%) 829 (-2%)
l2_block_building_time_in_ms 9,039 (+1%) 17,399 35,367 (+1%)
l2_block_rollup_simulation_time_in_ms 9,039 (+1%) 17,399 35,367 (+1%)
l2_block_public_tx_process_time_in_ms 7,639 (+1%) 15,896 33,815 (+1%)

L2 chain processing

Each column represents the number of blocks on the L2 chain where each block has 8 txs.

Metric 3 blocks 5 blocks
node_history_sync_time_in_ms 2,850 (-2%) 3,800 (-5%)
node_database_size_in_bytes 12,660,816 (+1%) 16,740,432
pxe_database_size_in_bytes 16,254 26,813

Circuits stats

Stats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.

Circuit simulation_time_in_ms witness_generation_time_in_ms input_size_in_bytes output_size_in_bytes proving_time_in_ms
private-kernel-init 88.8 (+6%) 396 (-1%) 21,502 44,858 N/A
private-kernel-inner 156 (-1%) 727 (+2%) 72,180 45,005 N/A
private-kernel-reset-tiny 476 869 (-1%) 65,502 44,844 N/A
private-kernel-tail 200 161 (-1%) 50,606 52,256 N/A
base-parity 5.58 N/A 160 96.0 N/A
root-parity 33.4 N/A 69,084 96.0 N/A
base-rollup 2,750 N/A 187,817 664 N/A
root-rollup 38.8 (-1%) N/A 54,525 716 N/A
public-kernel-setup 84.4 (-1%) N/A 103,760 71,222 N/A
public-kernel-app-logic 95.6 N/A 103,599 71,222 N/A
public-kernel-tail 553 N/A 409,190 16,414 N/A
private-kernel-reset-small 459 (-2%) N/A 66,085 45,629 N/A
private-kernel-tail-to-public 1,020 (+3%) 657 (+1%) 473,529 1,697 N/A
public-kernel-teardown 82.2 (-1%) N/A 104,005 71,222 N/A
merge-rollup 19.0 N/A 35,742 664 N/A
undefined N/A N/A N/A N/A 66,705 (+1%)

Stats on running time collected for app circuits

Function input_size_in_bytes output_size_in_bytes witness_generation_time_in_ms
ContractClassRegisterer:register 1,344 11,731 343
ContractInstanceDeployer:deploy 1,408 11,731 18.2 (-1%)
MultiCallEntrypoint:entrypoint 1,920 11,731 421
FeeJuice:deploy 1,376 11,731 389
SchnorrAccount:constructor 1,312 11,731 104 (-2%)
SchnorrAccount:entrypoint 2,304 11,731 433 (+1%)
Token:privately_mint_private_note 1,280 11,731 143 (-1%)
FPC:fee_entrypoint_public 1,344 11,731 26.6 (-13%)
Token:transfer 1,312 11,731 268 (-3%)
Benchmarking:create_note 1,344 11,731 103
SchnorrAccount:verify_private_authwit 1,280 11,731 27.2
Token:unshield 1,376 11,731 551 (-1%)
FPC:fee_entrypoint_private 1,376 11,731 752 (-1%)

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 54.6 7,739
FeeJuice:set_portal 11.2 (+1%) 2,354
Token:constructor 78.1 (-3%) 26,525
FPC:constructor 58.6 (+13%) 18,383
FeeJuice:mint_public 37.4 (-2%) 5,877
Token:mint_public ⚠️ 69.8 (+57%) 10,917
Token:assert_minter_and_mint ⚠️ 39.7 (-41%) 7,512
AuthRegistry:set_authorized 45.3 (-2%) 4,391
FPC:prepare_fee 227 (-12%) 7,712
Token:transfer_public 27.6 (-10%) 39,946
FPC:pay_refund 56.2 (-5%) 10,811
Benchmarking:increment_balance 936 6,929
Token:_increase_public_balance 45.7 8,433
FPC:pay_refund_with_shielded_rebate 67.1 (+1%) 11,360

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index 0.157 (-1%)

Tree insertion stats

The duration to insert a fixed batch of leaves into each tree type.

Metric 1 leaves 16 leaves 64 leaves 128 leaves 256 leaves 512 leaves 1024 leaves
batch_insert_into_append_only_tree_16_depth_ms 2.18 (-2%) 3.90 (-1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.8 31.7 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.113 (-2%) 0.110 (-1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 11.6 (-1%) 18.0 30.8 (-1%) 58.8 (-3%) 116 (+2%)
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 287 543 1,055
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.111 (-1%) 0.104 0.100 (-1%) 0.101 (-3%) 0.103 (+1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.7 (+2%) 25.7 (-1%) 43.9 81.7 (-3%) 165 (+2%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 109 207 355 691 1,363
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.111 (+2%) 0.104 (-1%) 0.106 0.101 (-3%) 0.105 (+3%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.4 (-1%) N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 132 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.106 (-1%) N/A N/A N/A N/A

Miscellaneous

Transaction sizes based on how many contract classes are registered in the tx.

Metric 0 registered classes 1 registered classes
tx_size_in_bytes 64,779 668,997

Transaction size based on fee payment method

| Metric | |
| - | |

@spalladino spalladino merged commit 20a65eb into palla/json-log Aug 21, 2024
94 of 96 checks passed
@spalladino spalladino deleted the palla/enable-json-log-in-aws branch August 21, 2024 11:56
spalladino added a commit that referenced this pull request Aug 21, 2024
Cloudwatch is smart enough to parse JSON logs, and we can use the
different fields extracted for querying in Insights.

**Builds on #8095**
spalladino added a commit that referenced this pull request Aug 21, 2024
Cloudwatch is smart enough to parse JSON logs, and we can use the
different fields extracted for querying in Insights.

**Builds on #8095**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants