Skip to content

feat(acir)!: Add predicate to call opcode#5616

Merged
vezenovm merged 20 commits into
masterfrom
mv/call-pred
Apr 8, 2024
Merged

feat(acir)!: Add predicate to call opcode#5616
vezenovm merged 20 commits into
masterfrom
mv/call-pred

Conversation

@vezenovm

@vezenovm vezenovm commented Apr 8, 2024

Copy link
Copy Markdown
Contributor

Resolves this issue noir-lang/noir#4707.

We simply add a predicate onto the Call opcode and handle it how we do other predicates such as for Brillig opcodes and memory ops. I also made a general utility method for checking a predicate in the VM as it now happens for three different opcodes.

AztecBot and others added 16 commits April 4, 2024 13:53
…-lang/noir#4703)

fix(acvm): Mark outputs of Opcode::Call solvable (noir-lang/noir#4708)
fix: Field comparisons (noir-lang/noir#4704)
feat(acvm_js): Execute program  (noir-lang/noir#4694)
chore: simplify how blns is loaded into tests (noir-lang/noir#4705)
fix(ssa): Do not use get_value_max_num_bits when we want pure type information (noir-lang/noir#4700)
chore: remove conditional compilation around `acvm_js` package (noir-lang/noir#4702)
feat(docs): Documenting noir codegen (noir-lang/noir#4454)
chore: check for references to private functions during path resolution (noir-lang/noir#4622)
chore: fix clippy errors (noir-lang/noir#4684)
fix: Last use analysis & make it an SSA pass (noir-lang/noir#4686)
feat: improve SSA type-awareness in EQ and MUL instructions (noir-lang/noir#4691)
feat: improve optimisations on range constraints (noir-lang/noir#4690)
chore: remove last traces of nix (noir-lang/noir#4679)
chore: Use is_entry_point helper on RuntimeType (noir-lang/noir#4678)
…g/noir#4725)

chore: remove unused env vars from `Cross.toml` (noir-lang/noir#4717)
feat: improve nargo check cli with --override flag and feedback for existing files (noir-lang/noir#4575)
feat: Allow slices to brillig entry points (noir-lang/noir#4713)
chore: simplify how `acvm_backend.wasm` is embedded (noir-lang/noir#4703)
fix(acvm): Mark outputs of Opcode::Call solvable (noir-lang/noir#4708)
fix: Field comparisons (noir-lang/noir#4704)
feat(acvm_js): Execute program  (noir-lang/noir#4694)
chore: simplify how blns is loaded into tests (noir-lang/noir#4705)
fix(ssa): Do not use get_value_max_num_bits when we want pure type information (noir-lang/noir#4700)
chore: remove conditional compilation around `acvm_js` package (noir-lang/noir#4702)
feat(docs): Documenting noir codegen (noir-lang/noir#4454)
chore: check for references to private functions during path resolution (noir-lang/noir#4622)
chore: fix clippy errors (noir-lang/noir#4684)
fix: Last use analysis & make it an SSA pass (noir-lang/noir#4686)
feat: improve SSA type-awareness in EQ and MUL instructions (noir-lang/noir#4691)
feat: improve optimisations on range constraints (noir-lang/noir#4690)
chore: remove last traces of nix (noir-lang/noir#4679)
chore: Use is_entry_point helper on RuntimeType (noir-lang/noir#4678)
chore: remove unused env vars from `Cross.toml` (noir-lang/noir#4717)
feat: improve nargo check cli with --override flag and feedback for existing files (noir-lang/noir#4575)
feat: Allow slices to brillig entry points (noir-lang/noir#4713)
chore: simplify how `acvm_backend.wasm` is embedded (noir-lang/noir#4703)
fix(acvm): Mark outputs of Opcode::Call solvable (noir-lang/noir#4708)
fix: Field comparisons (noir-lang/noir#4704)
feat(acvm_js): Execute program  (noir-lang/noir#4694)
chore: simplify how blns is loaded into tests (noir-lang/noir#4705)
fix(ssa): Do not use get_value_max_num_bits when we want pure type information (noir-lang/noir#4700)
chore: remove conditional compilation around `acvm_js` package (noir-lang/noir#4702)
feat(docs): Documenting noir codegen (noir-lang/noir#4454)
chore: check for references to private functions during path resolution (noir-lang/noir#4622)
chore: fix clippy errors (noir-lang/noir#4684)
fix: Last use analysis & make it an SSA pass (noir-lang/noir#4686)
feat: improve SSA type-awareness in EQ and MUL instructions (noir-lang/noir#4691)
feat: improve optimisations on range constraints (noir-lang/noir#4690)
chore: remove last traces of nix (noir-lang/noir#4679)
chore: Use is_entry_point helper on RuntimeType (noir-lang/noir#4678)
@vezenovm

vezenovm commented Apr 8, 2024

Copy link
Copy Markdown
Contributor Author

I was originally branched off of the sync-noir branch, so that is why you see these other commits.

@vezenovm vezenovm requested review from TomAFrench and guipublic April 8, 2024 15:54
Comment thread noir/noir-repo/acvm-repo/acvm/src/pwg/mod.rs Outdated
Comment thread noir/noir-repo/acvm-repo/acvm/src/pwg/mod.rs Outdated
vezenovm and others added 3 commits April 8, 2024 17:32
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
@vezenovm vezenovm enabled auto-merge (squash) April 8, 2024 16:34
@vezenovm vezenovm merged commit e8cec0a into master Apr 8, 2024
@vezenovm vezenovm deleted the mv/call-pred branch April 8, 2024 17:10
@AztecBot

AztecBot commented Apr 8, 2024

Copy link
Copy Markdown
Collaborator

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.

Values are compared against data from master at commit a974ec82 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 64 txs
l1_rollup_calldata_size_in_bytes 676 676 676
l1_rollup_calldata_gas 6,412 6,424 6,364 (-1%)
l1_rollup_execution_gas 585,745 585,757 585,697
l2_block_processing_time_in_ms 1,324 (-1%) 4,884 (+3%) 9,510
note_successful_decrypting_time_in_ms 240 (-9%) 640 (+13%) 1,039
note_trial_decrypting_time_in_ms 42.4 (-36%) 48.4 (-36%) 45.0 (-30%)
l2_block_building_time_in_ms 11,909 (-1%) 43,175 (+1%) 84,490 (+1%)
l2_block_rollup_simulation_time_in_ms 11,874 (-1%) 43,053 (+1%) 84,251 (+1%)
l2_block_public_tx_process_time_in_ms 6,118 (-2%) 24,212 (+1%) 48,390 (+2%)

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 14,339 (-1%) 26,398 (-4%)
note_history_successful_decrypting_time_in_ms 1,247 (-5%) 2,414 (-2%)
note_history_trial_decrypting_time_in_ms 69.4 (-45%) 103 (-5%)
node_database_size_in_bytes 18,620,496 35,037,264
pxe_database_size_in_bytes 29,859 59,414

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 181 (+1%) 44,377 26,164
private-kernel-ordering 160 (-1%) 50,830 39,026
base-parity 3,855 (-3%) 128 311
root-parity 1,059 (+6%) 1,244 311
base-rollup 14,276 110,464 861
root-rollup 49.1 (-1%) 4,359 725
private-kernel-inner 214 (-1%) 71,744 26,164
public-kernel-app-logic 120 (+1%) 47,695 40,661
public-kernel-tail 163 (+1%) 53,372 7,125
merge-rollup 9.57 (+2%) 2,568 861
public-kernel-teardown 114 (-2%) 47,695 40,661
public-kernel-setup 112 (-3%) 47,695 40,661

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.0 16.0 (-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.8 31.6 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.584 0.494 (-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 46.0 (+1%) 72.9 (+1%) 233 (+1%) 448 887 (+1%) 1,734 N/A
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 96.0 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.472 0.449 (+1%) 0.423 (+1%) 0.418 0.421 (+1%) 0.415 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 54.4 107 338 663 1,320 (+3%) 2,622 (+1%) N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 105 207 691 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.480 0.483 0.459 0.456 0.456 (+2%) 0.455 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 61.3
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 109
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.535

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 40,372 496,534

Transaction size based on fee payment method

Metric native fee payment method fpc_public fee payment method fpc_private fee payment method
tx_with_fee_size_in_bytes 905 1,161 1,377

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes 2 new note hashes
tx_pxe_processing_time_ms 1,651 (-1%) 1,079 5,235 (-4%)
Metric 1 public data writes 2 public data writes 3 public data writes 4 public data writes 5 public data writes 8 public data writes
tx_sequencer_processing_time_ms 574 (+1%) 386 (-3%) 1,033 (-3%) 502 (-1%) 1,688 (-2%) 565 (-1%)

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.

5 participants