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: fixing making sent txs fail with correct error messages #7852

Conversation

sklppy88
Copy link
Contributor

@sklppy88 sklppy88 commented Aug 8, 2024

This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.

Copy link
Contributor Author

sklppy88 commented Aug 8, 2024

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @sklppy88 and the rest of your teammates on Graphite Graphite

@sklppy88 sklppy88 changed the title init fix: fixing making sent txs fail with correct errror messages Aug 8, 2024
@sklppy88 sklppy88 force-pushed the ek/fix/4781/fixing-sent-transactions-failing-by-expecting-error-message branch 3 times, most recently from 180c9ed to 12610a4 Compare August 8, 2024 17:22
@AztecBot
Copy link
Collaborator

AztecBot commented Aug 8, 2024

Benchmark results

Metrics with a significant change:

  • protocol_circuit_simulation_time_in_ms (private-kernel-tail-to-public): 4,067 (+19%)
  • public_db_access_time_ms (get-nullifier-index): 2.38 (+1393%)
  • avm_simulation_time_ms (Token:_increase_public_balance): 54.6 (+430%)
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,738 (+1%) 1,544 701 741 (-1%) 771 (+1%)
proof_construction_time_sha256_30_ms 11,721 (+4%) 3,146 (+3%) 1,399 1,443 (+1%) 1,472 (+1%)
proof_construction_time_sha256_100_ms 43,801 (+3%) 12,264 (+2%) 5,626 (+2%) 5,604 (+2%) 5,497 (+2%)
proof_construction_time_poseidon_hash_ms 78.0 34.0 35.0 (+3%) 58.0 (-3%) 88.0
proof_construction_time_poseidon_hash_30_ms 1,523 (+1%) 418 199 226 (+4%) 268
proof_construction_time_poseidon_hash_100_ms 5,624 (+2%) 1,514 677 719 (-2%) 742

L2 block published to L1

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

Metric 4 txs 8 txs 16 txs
l1_rollup_calldata_size_in_bytes 740 740 740
l1_rollup_calldata_gas 6,692 6,718 6,692
l1_rollup_execution_gas 611,959 612,136 612,261
l2_block_processing_time_in_ms 255 (+1%) 442 (-1%) 801 (-1%)
l2_block_building_time_in_ms 9,603 (-1%) 18,701 (-1%) 37,289
l2_block_rollup_simulation_time_in_ms 9,603 (-1%) 18,701 (-1%) 37,289
l2_block_public_tx_process_time_in_ms 7,978 16,902 (-1%) 35,419

L2 chain processing

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

Metric 3 blocks 5 blocks
node_history_sync_time_in_ms 2,785 3,595 (-3%)
node_database_size_in_bytes 12,722,256 16,875,600
pxe_database_size_in_bytes 16,254 26,813

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 input_size_in_bytes output_size_in_bytes proving_time_in_ms proof_size_in_bytes num_public_inputs size_in_gates
private-kernel-init 102 (+7%) 438 (+8%) 21,846 44,858 N/A N/A N/A N/A
private-kernel-inner 172 (-1%) 726 (+4%) 72,545 45,005 N/A N/A N/A N/A
private-kernel-tail 682 832 (+1%) 53,216 50,574 N/A N/A N/A N/A
base-parity 5.95 (+2%) 596 (-1%) 160 96.0 1,685 (-3%) 13,188 19.0 65,536
root-parity 110 116 (-11%) 69,084 96.0 27,684 (-10%) 13,188 19.0 4,194,304
base-rollup 2,961 (-1%) 5,500 (+2%) 182,736 664 86,570 (-13%) 14,020 45.0 16,777,216
root-rollup 97.4 (+1%) 102 (-10%) 54,525 716 25,792 (-9%) 13,988 44.0 4,194,304
public-kernel-setup 90.6 (-1%) 2,743 (-2%) 103,513 70,710 15,432 (-12%) 128,708 3,629 2,097,152
public-kernel-app-logic 106 (+1%) 4,084 (-2%) 103,513 70,710 8,825 (-13%) 128,708 3,629 1,048,576
public-kernel-tail 579 (-1%) 28,557 (-9%) 403,238 11,326 93,178 (-10%) 27,204 457 16,777,216
private-kernel-reset-tiny 196 (+7%) 875 (+5%) 68,621 44,750 N/A N/A N/A N/A
private-kernel-tail-to-public ⚠️ 4,067 (+19%) 1,586 (+1%) 942,862 1,697 N/A N/A N/A N/A
public-kernel-teardown 86.4 4,189 (+3%) 103,513 70,710 16,361 (-12%) 128,708 3,629 2,097,152
merge-rollup 59.4 (-1%) N/A 35,742 664 N/A N/A N/A N/A
undefined N/A N/A N/A N/A 67,237 (-5%) N/A N/A N/A

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
ContractClassRegisterer:register 1,344 11,731 339 N/A N/A
ContractInstanceDeployer:deploy 1,408 11,731 18.4 (+1%) N/A N/A
MultiCallEntrypoint:entrypoint 1,920 11,731 475 N/A N/A
FeeJuice:deploy 1,376 11,731 387 (+1%) N/A N/A
SchnorrAccount:constructor 1,312 11,731 177 (+1%) N/A N/A
SchnorrAccount:entrypoint 2,304 11,731 537 N/A N/A
Token:privately_mint_private_note 1,280 11,731 231 (+3%) N/A N/A
FPC:fee_entrypoint_public 1,344 11,731 35.9 (+16%) N/A N/A
Token:transfer 1,312 11,731 469 (+5%) N/A N/A
AuthRegistry:set_authorized (avm) 18,491 N/A N/A 147,296 2,659 (+8%)
FPC:prepare_fee (avm) 22,958 N/A N/A 147,360 3,474 (+9%)
Token:transfer_public (avm) 61,614 N/A N/A 147,360 17,738 (-2%)
AuthRegistry:consume (avm) 41,719 N/A N/A 147,328 7,567 (+1%)
FPC:pay_refund (avm) 26,227 N/A N/A 147,328 7,367 (-1%)
Benchmarking:create_note 1,344 11,731 168 (-2%) N/A N/A
SchnorrAccount:verify_private_authwit 1,280 11,731 27.3 N/A N/A
Token:unshield 1,376 11,731 730 (-1%) N/A N/A
FPC:fee_entrypoint_private 1,376 11,731 974 (-1%) N/A N/A

AVM Simulation

Time to simulate various public functions in the AVM.

Function time_ms bytecode_size_in_bytes
FeeJuice:_increase_public_balance 93.7 (-2%) 8,139
FeeJuice:set_portal 10.7 (-21%) 2,362
Token:constructor 121 (-2%) 31,107
FPC:constructor 92.7 22,380
FeeJuice:mint_public 78.4 (+1%) 6,150
Token:mint_public 99.1 (+21%) 11,720
Token:assert_minter_and_mint 82.7 (-6%) 8,028
AuthRegistry:set_authorized 10.0 (-4%) 4,537
FPC:prepare_fee 285 (-4%) 8,812
Token:transfer_public 31.5 (-24%) 47,374
FPC:pay_refund 63.6 (-1%) 12,114
Benchmarking:increment_balance 1,013 7,450
Token:_increase_public_balance ⚠️ 54.6 (+430%) 8,960
FPC:pay_refund_with_shielded_rebate 141 (+2%) 12,663

Public DB Access

Time to access various public DBs.

Function time_ms
get-nullifier-index ⚠️ 2.38 (+1393%)

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 256 leaves 512 leaves 1024 leaves
batch_insert_into_append_only_tree_16_depth_ms 2.14 3.86 (-1%) N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_count 16.8 31.7 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_16_depth_hash_ms 0.112 (+1%) 0.110 N/A N/A N/A N/A N/A
batch_insert_into_append_only_tree_32_depth_ms N/A N/A 11.4 (+1%) 17.6 (-2%) 30.8 (-1%) 58.8 (-1%) 112 (-1%)
batch_insert_into_append_only_tree_32_depth_hash_count N/A N/A 95.9 159 287 543 1,055
batch_insert_into_append_only_tree_32_depth_hash_ms N/A N/A 0.110 (+2%) 0.103 (-2%) 0.100 (-1%) 0.101 0.101 (-1%)
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 14.4 (+1%) 26.7 (+5%) 43.6 (-2%) 81.7 (-1%) 159 (-1%)
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 109 207 355 691 1,363
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.111 (+2%) 0.109 (+6%) 0.106 (-2%) 0.101 (-1%) 0.101 (-3%)
batch_insert_into_indexed_tree_40_depth_ms N/A N/A 16.5 (+1%) N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_count N/A N/A 132 N/A N/A N/A N/A
batch_insert_into_indexed_tree_40_depth_hash_ms N/A N/A 0.105 (+1%) N/A N/A N/A N/A

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 63,593 665,008

Transaction size based on fee payment method

| Metric | |
| - | |

@sklppy88 sklppy88 force-pushed the ek/fix/4781/fixing-sent-transactions-failing-by-expecting-error-message branch from 12610a4 to 5714ddc Compare August 8, 2024 18:45
@sklppy88 sklppy88 changed the title fix: fixing making sent txs fail with correct errror messages fix: fixing making sent txs fail with correct error messages Aug 8, 2024
@sklppy88 sklppy88 force-pushed the ek/fix/4781/fixing-sent-transactions-failing-by-expecting-error-message branch from 5714ddc to fdef608 Compare August 8, 2024 20:30
@sklppy88 sklppy88 marked this pull request as ready for review August 9, 2024 15:49
@sklppy88 sklppy88 requested a review from nventuro August 9, 2024 15:49
@sklppy88 sklppy88 merged commit d13b336 into ek/fix/4781/sent-transactions-should-also-fail-early-if-invalid Aug 9, 2024
96 of 97 checks passed
@sklppy88 sklppy88 deleted the ek/fix/4781/fixing-sent-transactions-failing-by-expecting-error-message branch August 9, 2024 17:27
sklppy88 added a commit that referenced this pull request Aug 12, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 12, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 12, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 12, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 13, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 18, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 26, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 27, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 27, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 27, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 27, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 28, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 28, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 28, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 28, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 29, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 30, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
sklppy88 added a commit that referenced this pull request Aug 31, 2024
This PR fixes the outdated error messages brought on by #7841.

Please see that PR for more context.
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.

2 participants