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: Goblin Recursive Verifier #6778

Merged
merged 3 commits into from
May 31, 2024
Merged

feat: Goblin Recursive Verifier #6778

merged 3 commits into from
May 31, 2024

Conversation

maramihali
Copy link
Contributor

@maramihali maramihali commented May 30, 2024

Implements a Goblin Recursive Verifier without the Merge. Removes hack in Translator Recursive Verifier and ensures we are able to pass the Transcript from ECCVM to Translator Recursive Verifier.

@AztecBot
Copy link
Collaborator

AztecBot commented May 30, 2024

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (public-kernel-setup): 649 (-24%)
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,815 (+2%) 1,584 (+1%) 728 (+3%) 791 (+4%) 788 (+2%)
proof_construction_time_sha256_30_ms 11,639 (+2%) 3,155 (+4%) 1,443 (+5%) 1,458 (+2%) 1,519 (+5%)
proof_construction_time_sha256_100_ms 45,068 (+3%) 12,350 (+5%) 6,016 (+11%) 5,849 (+9%) 5,815 (+9%)
proof_construction_time_poseidon_hash_ms 78.0 34.0 35.0 (+3%) 59.0 (+2%) 88.0
proof_construction_time_poseidon_hash_30_ms 1,531 (+1%) 422 (+1%) 202 231 (+5%) 271
proof_construction_time_poseidon_hash_100_ms 5,837 (+2%) 1,606 (+2%) 751 (+4%) 785 (+2%) 815 (+2%)

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,440 9,464
l1_rollup_execution_gas 616,105 616,081 616,105
l2_block_processing_time_in_ms 1,298 (+1%) 4,862 (+1%) 9,552 (+1%)
l2_block_building_time_in_ms 42,980 (-1%) 170,325 (-1%) 339,782 (-1%)
l2_block_rollup_simulation_time_in_ms 42,797 (-1%) 169,648 (-1%) 338,447 (-1%)
l2_block_public_tx_process_time_in_ms 37,242 (-1%) 166,354 (+2%) 335,172

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 9,615 (+2%) 14,644 (+2%)
node_database_size_in_bytes 14,495,824 21,356,624
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 simulation_time_in_ms witness_generation_time_in_ms proving_time_in_ms input_size_in_bytes output_size_in_bytes proof_size_in_bytes num_public_inputs size_in_gates
private-kernel-init 135 (+1%) 474 12,977 (-7%) 20,634 64,614 89,536 2,731 524,288
private-kernel-inner 406 (-1%) 956 43,676 (-12%) 92,326 64,614 89,536 2,731 2,097,152
private-kernel-tail 580 (-2%) 2,688 45,434 (-1%) 96,545 77,732 11,648 297 2,097,152
base-parity 6.43 591 (-8%) 2,705 (-4%) 128 64.0 2,208 2.00 131,072
root-parity 49.7 (+2%) 60.4 (-11%) 38,905 (-7%) 27,100 64.0 2,720 18.0 2,097,152
base-rollup 8,874 (-2%) 2,404 (+1%) 78,256 (-3%) 119,738 756 3,648 47.0 4,194,304
root-rollup 110 77.2 (+1%) 23,064 (-6%) 25,309 620 3,456 41.0 1,048,576
public-kernel-app-logic 545 (-1%) 3,643 (+1%) 43,381 (-6%) 106,345 86,550 116,768 3,582 2,097,152
public-kernel-tail 1,114 (-1%) 24,528 (+1%) 183,846 (+2%) 401,006 7,646 11,648 297 8,388,608
private-kernel-reset-small 587 (-2%) 1,941 (-14%) 50,357 (-1%) 120,737 64,614 89,536 2,731 2,097,152
merge-rollup 30.2 (-3%) N/A N/A 16,542 756 N/A N/A N/A
public-kernel-setup ⚠️ 649 (-24%) N/A N/A 106,345 86,550 N/A N/A N/A
public-kernel-teardown 551 (-13%) N/A N/A 106,345 86,550 N/A N/A N/A
private-kernel-tail-to-public N/A 8,253 106,084 (+2%) N/A N/A 116,768 3,582 4,194,304

Stats on running time collected for app circuits

Function input_size_in_bytes output_size_in_bytes witness_generation_time_in_ms proof_size_in_bytes proving_time_in_ms size_in_gates num_public_inputs
ContractClassRegisterer:register 1,344 9,944 467 (-1%) N/A N/A N/A N/A
ContractInstanceDeployer:deploy 1,408 9,944 41.9 N/A N/A N/A N/A
MultiCallEntrypoint:entrypoint 1,920 9,944 1,719 (-8%) N/A N/A N/A N/A
SchnorrAccount:constructor 1,312 9,944 1,445 (-7%) N/A N/A N/A N/A
SchnorrAccount:entrypoint 2,304 9,944 2,655 16,768 53,977 (-1%) 2,097,152 457
Token:privately_mint_private_note 1,280 9,944 1,563 (-1%) N/A N/A N/A N/A
Token:transfer 1,376 9,944 4,971 16,768 53,441 (-8%) 2,097,152 457
Benchmarking:create_note 1,344 9,944 1,405 N/A N/A N/A N/A
FPC:fee_entrypoint_public 1,344 9,944 241 N/A N/A N/A N/A
SchnorrAccount:spend_private_authwit 1,280 9,944 77.7 (+1%) N/A N/A N/A N/A
Token:unshield 1,376 9,944 3,786 N/A N/A N/A N/A
FPC:fee_entrypoint_private 1,376 9,944 4,641 (-1%) N/A N/A N/A N/A

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 10.5 (+1%) 17.1 (+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.607 (+1%) 0.523 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 49.0 (+1%) 76.9 (+1%) 249 (+1%) 483 (+2%) 935 (+1%) 1,845 (+1%) 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.499 (+1%) 0.473 (+1%) 0.451 (+1%) 0.450 (+2%) 0.444 (+1%) 0.441 (+1%) N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 58.7 (+1%) 114 (+2%) 361 (+2%) 709 (+2%) 1,406 (+2%) 2,771 (+1%) 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.507 (+1%) 0.509 (+1%) 0.488 (+2%) 0.487 (+1%) 0.485 (+1%) 0.482 (+1%) 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 63.2 (+1%)
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.560 (+1%)

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 84,050 665,267

Transaction size based on fee payment method

| Metric | |
| - | |

@maramihali maramihali added the crypto cryptography label May 31, 2024
@maramihali maramihali changed the title feat: ensure that we can pass transcript between eccvm and translator recursive verifiers feat: Goblin Recursive Verifier May 31, 2024
@maramihali maramihali marked this pull request as ready for review May 31, 2024 09:42
@codygunton codygunton changed the base branch from mm/eccvm-pcs-work to master May 31, 2024 19:15
Copy link
Collaborator

@AztecBot AztecBot left a comment

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'C++ Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.05.

Benchmark suite Current: 02eef4f Previous: f296d88 Ratio
nativeconstruct_proof_ultrahonk_power_of_2/20 6390.346931000039 ms/iter 5654.945444999996 ms/iter 1.13

This comment was automatically generated by workflow using github-action-benchmark.

CC: @ludamad @codygunton

Copy link
Contributor

@codygunton codygunton left a comment

Choose a reason for hiding this comment

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

LGTM

@codygunton codygunton merged commit 53d0d55 into master May 31, 2024
34 checks passed
@codygunton codygunton deleted the mm/transcript-trickery branch May 31, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crypto cryptography
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants