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: add input support for chained transactions ("pending_read_requests" in private kernel circuit) #2869

Merged
merged 24 commits into from
Oct 17, 2023

Conversation

dan-aztec
Copy link
Contributor

@dan-aztec dan-aztec commented Oct 16, 2023

starting first few task in https://hackmd.io/G0uD0r52Qca89BCINuDByQ

this adds a "non functional" pending_read_requests array to the private kernel circuit inputs and accumualtors, and updates the typescript types.

the pending reads are not used though - it is merely a placeholder input for follow up implementation.

@dan-aztec dan-aztec changed the title feat: add pending_read_requests to private kernel feat: add support for chained transactions ("pending_read_requests" in private kernel circuit) Oct 16, 2023
@AztecBot
Copy link
Collaborator

AztecBot commented Oct 17, 2023

Benchmark 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 20ad5779 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,972 868,268 3,449,468
l1_rollup_execution_gas 842,059 3,595,376 22,204,837
l2_block_processing_time_in_ms 1,026 (-1%) 3,886 (-1%) 15,191 (-3%)
note_successful_decrypting_time_in_ms 332 1,030 (+1%) 3,870 (+3%)
note_trial_decrypting_time_in_ms 36.0 (+6%) 108 (+1%) 137 (+1%)
l2_block_building_time_in_ms 8,937 (-1%) 35,889 (-1%) 155,640 (+3%)
l2_block_rollup_simulation_time_in_ms 6,594 (-1%) 26,565 (-1%) 104,136 (-2%)
l2_block_public_tx_process_time_in_ms 2,305 (+1%) 9,202 ⚠️ 50,900 (+13%)

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 11,353 (-2%) 21,604 (-3%)
note_history_successful_decrypting_time_in_ms 2,365 4,603 (-4%)
note_history_trial_decrypting_time_in_ms 122 (-2%) ⚠️ 206 (+39%)
node_database_size_in_bytes 1,662,634 1,201,203
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 46.2 (+6%) 61,697 (+9%) ⚠️ 18,841 (+28%)
private-kernel-ordering 23.1 (+9%) ⚠️ 24,233 (+20%) 8,089
base-rollup 850 639,797 (+1%) 811
root-rollup 38.8 (+2%) 4,072 1,097
private-kernel-inner ⚠️ 40.7 (+13%) ⚠️ 81,504 (+13%) ⚠️ 18,841 (+28%)
public-kernel-private-input 46.9 (-1%) ⚠️ 41,455 (+11%) ⚠️ 18,841 (+28%)
public-kernel-non-first-iteration ⚠️ 30.9 (+11%) ⚠️ 41,497 (+11%) ⚠️ 18,841 (+28%)
merge-rollup 0.891 (+9%) 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,723 27,508 (+2%)

@dan-aztec dan-aztec marked this pull request as ready for review October 17, 2023 13:42
@dan-aztec dan-aztec requested a review from LeilaWang October 17, 2023 13:43
@dan-aztec dan-aztec changed the title feat: add support for chained transactions ("pending_read_requests" in private kernel circuit) feat: add input support for chained transactions ("pending_read_requests" in private kernel circuit) Oct 17, 2023
yarn-project/circuits.js/README.md Outdated Show resolved Hide resolved
@dan-aztec dan-aztec enabled auto-merge (squash) October 17, 2023 14:12
@dan-aztec dan-aztec merged commit c1dff38 into master Oct 17, 2023
2 checks passed
@dan-aztec dan-aztec deleted the dan/chained-tx-private-kernel branch October 17, 2023 14:26
@dan-aztec dan-aztec mentioned this pull request Oct 17, 2023
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.

3 participants