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

fix: add cbind declarations for new methods to fix autogen #6622

Merged
merged 3 commits into from
May 23, 2024

Conversation

ledwards2225
Copy link
Contributor

@ledwards2225 ledwards2225 commented May 22, 2024

Some declarations for new cbind methods were missing which was causing the autogen bindings in index.ts not to be produced.

I guess these aren't being tested? Update: seems like most are tested and it was working because the CI does not re-autogen the bindings so if they've been manually implemented it works?

@ledwards2225 ledwards2225 marked this pull request as ready for review May 22, 2024 23:09
@ledwards2225 ledwards2225 self-assigned this May 22, 2024
@AztecBot
Copy link
Collaborator

AztecBot commented May 23, 2024

Benchmark results

No metrics with a significant change found.

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 5,700 1,545 (+3%) 709 764 (+1%) 768

L2 block published to L1

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

Metric 8 txs 32 txs 64 txs
l1_rollup_calldata_size_in_bytes 1,412 1,412 1,412
l1_rollup_calldata_gas 9,464 9,452 9,476
l1_rollup_execution_gas 616,105 616,093 616,117
l2_block_processing_time_in_ms 1,350 (-1%) 5,061 (-1%) 10,051 (-1%)
l2_block_building_time_in_ms 46,982 (+1%) 186,193 (+1%) 371,639
l2_block_rollup_simulation_time_in_ms 46,805 (+1%) 185,557 (+1%) 370,393 (+1%)
l2_block_public_tx_process_time_in_ms 25,751 (+4%) 105,012 (+1%) 213,982 (+1%)

L2 chain processing

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

Metric 3 blocks 5 blocks
node_history_sync_time_in_ms 10,066 (+1%) 15,305
node_database_size_in_bytes 14,508,112 21,385,296
pxe_database_size_in_bytes 18,071 29,868

Circuits stats

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

Circuit protocol_circuit_simulation_time_in_ms protocol_circuit_witness_generation_time_in_ms protocol_circuit_proving_time_in_ms protocol_circuit_input_size_in_bytes protocol_circuit_output_size_in_bytes protocol_circuit_proof_size_in_bytes protocol_circuit_num_public_inputs protocol_circuit_size_in_gates
private-kernel-init 161 (+1%) 3,631 22,148 19,990 61,798 86,720 2,643 1,048,576
private-kernel-inner 605 4,196 47,732 (-2%) 88,862 61,798 86,720 2,643 2,097,152
private-kernel-tail 531 3,158 (+12%) 35,458 86,653 76,438 10,624 265 2,097,152
base-parity 6.54 (-1%) 1,226 (-1%) 2,872 (-1%) 128 64.0 2,208 2.00 131,072
root-parity 50.0 (+1%) 65.9 (-1%) 43,846 27,084 64.0 2,720 18.0 2,097,152
base-rollup 758 2,318 (+1%) 74,532 (+1%) 119,578 756 3,648 47.0 4,194,304
root-rollup 114 66.3 (-1%) 19,582 (+1%) 25,297 620 3,456 41.0 1,048,576
public-kernel-app-logic 525 2,842 (-1%) 47,071 (-1%) 103,405 84,766 116,832 3,584 2,097,152
public-kernel-tail 1,194 23,181 (-3%) 154,108 (-1%) 393,850 7,490 10,624 265 8,388,608
private-kernel-reset-small 581 2,172 (-4%) 26,686 (+8%) 118,173 61,798 86,720 2,643 1,048,576
merge-rollup 28.7 N/A N/A 16,534 756 N/A N/A N/A
public-kernel-setup 638 N/A N/A 103,405 84,766 N/A N/A N/A
public-kernel-teardown 539 (+1%) N/A N/A 103,405 84,766 N/A N/A N/A
private-kernel-tail-to-public N/A 9,573 (-2%) 83,205 (+2%) N/A N/A 116,832 3,584 4,194,304

Stats on running time collected for app circuits

Function app_circuit_proof_size_in_bytes app_circuit_proving_time_in_ms app_circuit_size_in_gates app_circuit_num_public_inputs
SchnorrAccount:entrypoint 16,128 45,758 (-1%) 2,097,152 437
Token:transfer 16,128 45,962 (+6%) 2,097,152 437

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 512 leaves 1024 leaves 2048 leaves 4096 leaves 32 leaves
batch_insert_into_append_only_tree_16_depth_ms 11.4 18.5 (-1%) N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.7 31.8 N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.662 0.568 (-1%) N/A N/A N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 52.8 81.4 261 508 987 (-1%) 1,953 N/A
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 543 1,055 2,079 4,127 N/A
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.540 (+1%) 0.502 0.475 0.474 0.468 0.467 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 62.7 119 377 (-1%) 748 1,470 (-1%) 2,918 N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 106 208 692 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.544 0.536 0.512 0.514 0.509 (-1%) 0.508 N/A
batch_insert_into_indexed_tree_40_depth_ms N/A N/A N/A N/A N/A N/A N/A N/A 67.2
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A N/A N/A N/A N/A N/A N/A 107
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A N/A N/A N/A N/A N/A N/A 0.596

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 82,705 664,768

Transaction size based on fee payment method

| Metric | |
| - | |

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes 2 new note hashes
tx_pxe_processing_time_ms 11,596 (+4%) 4,225 69,972
Metric 1 public data writes 2 public data writes 3 public data writes 4 public data writes 8 public data writes
tx_sequencer_processing_time_ms 3,233 (+1%) 2,133 6,179 (+1%) 2,307 (-1%) 2,597 (-1%)

Copy link
Contributor

@lucasxia01 lucasxia01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -1229,6 +1229,6 @@ export class BarretenbergApiSync {
outTypes.map(t => t.SIZE_IN_BYTES),
);
const out = result.map((r, i) => outTypes[i].fromBuffer(r));
return out as any;
return out[0];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe I forgot to test this function through wasm? This function isn't tested through CI, so its possible that out as any was wrong.

@ledwards2225 ledwards2225 enabled auto-merge (squash) May 23, 2024 14:18
@ledwards2225 ledwards2225 merged commit 2429cd8 into master May 23, 2024
83 checks passed
@ledwards2225 ledwards2225 deleted the lde/autogen branch May 23, 2024 14:44
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