Skip to content

chore: deterministically sort cached_partial_non_native_field_multiplication across wasm32 and native compilations (duplicate)#3431

Closed
kevaundray wants to merge 3 commits intomasterfrom
kw/kw/fix-non-determinism-between-wasm-native-github-broken
Closed

chore: deterministically sort cached_partial_non_native_field_multiplication across wasm32 and native compilations (duplicate)#3431
kevaundray wants to merge 3 commits intomasterfrom
kw/kw/fix-non-determinism-between-wasm-native-github-broken

Conversation

@kevaundray
Copy link
Contributor

Please provide a paragraph or two giving a summary of the change, including relevant motivation and context.

Checklist:

Remove the checklist to signal you've completed it. Enable auto-merge if the PR is ready to merge.

  • If the pull request requires a cryptography review (e.g. cryptographic algorithm implementations) I have added the 'crypto' tag.
  • I have reviewed my diff in github, line by line and removed unexpected formatting changes, testing logs, or commented-out code.
  • Every change is related to the PR description.
  • I have linked this pull request to relevant issues (if any exist).

@kevaundray
Copy link
Contributor Author

Duplicate of #3425 because it won't update with my commits for some reason

@AztecBot
Copy link
Collaborator

Benchmark results

Metrics with a significant change:

  • circuit_simulation_time_in_ms (base-rollup): 4,081 (+133%)
  • l2_block_building_time_in_ms (8): 30,132 (+46%)
  • l2_block_building_time_in_ms (32): 119,259 (+46%)
  • l2_block_building_time_in_ms (128): 474,671 (+45%)
  • l2_block_rollup_simulation_time_in_ms (8): 21,508 (+80%)
  • l2_block_rollup_simulation_time_in_ms (32): 84,897 (+79%)
  • l2_block_rollup_simulation_time_in_ms (128): 339,567 (+80%)
  • note_trial_decrypting_time_in_ms (8): 100 (+1635%)
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.

Values are compared against data from master at commit 2001d474 and shown if the difference exceeds 1%.

L2 block published to L1

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

Metric 8 txs 32 txs 128 txs
l1_rollup_calldata_size_in_bytes 45,444 179,588 716,132
l1_rollup_calldata_gas 222,984 868,208 3,449,312
l1_rollup_execution_gas 842,071 3,595,316 22,204,681
l2_block_processing_time_in_ms 2,019 7,565 (-2%) 30,258 (+1%)
note_successful_decrypting_time_in_ms 296 (-1%) 881 3,322 (+3%)
note_trial_decrypting_time_in_ms ⚠️ 100 (+1635%) 91.5 142 (+1%)
l2_block_building_time_in_ms ⚠️ 30,132 (+46%) ⚠️ 119,259 (+46%) ⚠️ 474,671 (+45%)
l2_block_rollup_simulation_time_in_ms ⚠️ 21,508 (+80%) ⚠️ 84,897 (+79%) ⚠️ 339,567 (+80%)
l2_block_public_tx_process_time_in_ms 8,581 (-1%) 34,219 134,586 (-3%)

L2 chain processing

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

Metric 5 blocks 10 blocks
node_history_sync_time_in_ms 21,912 42,829 (+1%)
note_history_successful_decrypting_time_in_ms 2,047 4,015
note_history_trial_decrypting_time_in_ms 125 (-1%) 157 (+1%)
node_database_size_in_bytes 1,627,448 1,095,297
pxe_database_size_in_bytes 29,748 59,307

Circuits stats

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

Circuit circuit_simulation_time_in_ms circuit_input_size_in_bytes circuit_output_size_in_bytes
private-kernel-init 767 61,697 18,905
private-kernel-ordering 127 24,297 8,153
base-rollup ⚠️ 4,081 (+133%) 656,428 873
root-rollup 143 (-15%) 4,072 1,097
private-kernel-inner 791 81,568 18,905
public-kernel-private-input 563 (-2%) 41,519 18,905
public-kernel-non-first-iteration 407 41,561 18,905
merge-rollup 15.5 (+1%) 2,592 873

Miscellaneous

Transaction sizes based on how many contracts are deployed in the tx.

Metric 0 deployed contracts 1 deployed contracts
tx_size_in_bytes 8,787 27,547

@kevaundray kevaundray closed this Nov 27, 2023
@ludamad ludamad deleted the kw/kw/fix-non-determinism-between-wasm-native-github-broken branch August 22, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants