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

feat: fix contract membership check #3034

Merged

Conversation

sirasistant
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).

@AztecBot
Copy link
Collaborator

AztecBot commented Oct 25, 2023

Benchmark results

Metrics with a significant change:

  • circuit_simulation_time_in_ms (private-kernel-init): 774 (+839%)
  • circuit_simulation_time_in_ms (private-kernel-ordering): 130 (+157%)
  • circuit_simulation_time_in_ms (base-rollup): 2,423 (+16%)
  • circuit_simulation_time_in_ms (private-kernel-inner): 723 (+1135%)
  • circuit_simulation_time_in_ms (merge-rollup): 1.19 (+45%)
  • node_history_sync_time_in_ms (10): 56,379 (+16%)
  • l2_block_building_time_in_ms (8): 17,344 (+19%)
  • l2_block_building_time_in_ms (32): 69,191 (+19%)
  • l2_block_building_time_in_ms (128): 276,718 (+20%)
  • l2_block_rollup_simulation_time_in_ms (8): 15,783 (+19%)
  • l2_block_rollup_simulation_time_in_ms (32): 62,966 (+20%)
  • l2_block_rollup_simulation_time_in_ms (128): 251,863 (+20%)
  • l2_block_processing_time_in_ms (8): 2,657 (+18%)
  • l2_block_processing_time_in_ms (32): 10,208 (+18%)
  • l2_block_processing_time_in_ms (128): 40,272 (+18%)
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 388a47ba 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,876 868,136 3,447,992
l1_rollup_execution_gas 841,963 3,595,244 22,203,361
l2_block_processing_time_in_ms ⚠️ 2,657 (+18%) ⚠️ 10,208 (+18%) ⚠️ 40,272 (+18%)
note_successful_decrypting_time_in_ms 334 (-2%) 1,028 (-2%) 3,822 (-1%)
note_trial_decrypting_time_in_ms 36.0 (-18%) 110 (-6%) 144 (+6%)
l2_block_building_time_in_ms ⚠️ 17,344 (+19%) ⚠️ 69,191 (+19%) ⚠️ 276,718 (+20%)
l2_block_rollup_simulation_time_in_ms ⚠️ 15,783 (+19%) ⚠️ 62,966 (+20%) ⚠️ 251,863 (+20%)
l2_block_public_tx_process_time_in_ms 1,513 (+13%) 6,074 (+15%) 24,305 (+15%)

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 28,833 (+15%) ⚠️ 56,379 (+16%)
note_history_successful_decrypting_time_in_ms 2,405 (-6%) 4,719 (-5%)
note_history_trial_decrypting_time_in_ms 126 (+4%) 155 (+7%)
node_database_size_in_bytes 1,633,273 1,100,153
pxe_database_size_in_bytes 27,188 54,187

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 ⚠️ 774 (+839%) 61,697 18,905
private-kernel-ordering ⚠️ 130 (+157%) 24,297 8,153 (+1%)
base-rollup ⚠️ 2,423 (+16%) 656,311 814
root-rollup 103 (+15%) 4,072 1,097
private-kernel-inner ⚠️ 723 (+1135%) 81,568 18,905
public-kernel-private-input 54.5 (+17%) 41,519 18,841
public-kernel-non-first-iteration 33.8 (+18%) 41,497 18,841
merge-rollup ⚠️ 1.19 (+45%) 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 (+1%) 27,304 (-7%)

@sirasistant sirasistant merged commit 8ebdec5 into feature_branch/private-kernel Oct 25, 2023
79 checks passed
@sirasistant sirasistant deleted the arv/fix_contract_membership branch October 25, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants