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

chore(docs): rewriting absolute paths #6511

Merged
merged 8 commits into from
May 23, 2024
Merged

Conversation

signorecello
Copy link
Contributor

Please read contributing guidelines and remove this line.

Copy link
Contributor Author

signorecello commented May 17, 2024

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

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

@AztecBot
Copy link
Collaborator

AztecBot commented May 17, 2024

Benchmark results

Metrics with a significant change:

  • app_circuit_proving_time_in_ms (Test:emit_nullifier): 1,601 (-27%)
  • app_circuit_proving_time_in_ms (FPC:fee_entrypoint_public): 9,095 (-38%)
  • protocol_circuit_witness_generation_time_in_ms (private-kernel-tail): 3,365 (+25%)
  • protocol_circuit_witness_generation_time_in_ms (base-parity): 1,393 (+51%)
  • protocol_circuit_witness_generation_time_in_ms (public-kernel-app-logic): 294 (+104%)
  • protocol_circuit_witness_generation_time_in_ms (public-kernel-tail): 543 (-23%)
  • protocol_circuit_proving_time_in_ms (base-parity): 3,800 (+26%)
  • protocol_circuit_proving_time_in_ms (public-kernel-app-logic): 810 (+29%)
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,695 1,548 709 (-1%) 766 (-3%) 773 (+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 772 772 772
l1_rollup_calldata_gas 6,844 6,880 6,880
l1_rollup_execution_gas 587,384 587,420 587,420
l2_block_processing_time_in_ms 1,358 5,086 10,107
l2_block_building_time_in_ms 32,394 (+1%) 127,323 254,409
l2_block_rollup_simulation_time_in_ms 32,223 (+1%) 126,704 253,178
l2_block_public_tx_process_time_in_ms 16,772 69,370 (-1%) 141,914

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 15,206 28,276
node_database_size_in_bytes 21,188,688 37,773,392
pxe_database_size_in_bytes 29,868 12,535

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 159 (-1%) 3,404 (-2%) 24,687 (+3%) 19,985 61,999 86,720 2,643 1,048,576
private-kernel-inner 605 4,507 (+2%) 44,630 (-3%) 89,053 61,999 86,720 2,643 2,097,152
private-kernel-tail 531 ⚠️ 3,365 (+25%) 41,253 (+1%) 86,849 78,838 10,624 265 2,097,152
base-parity 6.38 (-1%) ⚠️ 1,393 (+51%) ⚠️ 3,800 (+26%) 128 64.0 2,208 2.00 131,072
root-parity 48.6 (-1%) 75.9 (+8%) 44,337 (-1%) 27,064 64.0 2,720 18.0 2,097,152
base-rollup 733 (-3%) 2,471 (-2%) 47,857 (-1%) 112,602 957 3,136 31.0 2,097,152
root-rollup 91.6 64.0 (+5%) 8,790 11,518 821 3,456 41.0 524,288
public-kernel-app-logic 242 ⚠️ 294 (+104%) ⚠️ 810 (+29%) 96,850 84,967 116,320 3,568 4,096
public-kernel-tail 861 (-1%) ⚠️ 543 (-23%) 953 (-13%) 388,084 7,691 10,112 249 512
private-kernel-reset-small 581 2,177 (+7%) 24,760 (-8%) 118,369 61,999 86,720 2,643 1,048,576
public-kernel-setup 218 (+2%) 163 (-16%) 715 (+5%) 143,141 84,967 116,320 3,568 4,096
public-kernel-teardown 220 214 (-5%) 981 (+15%) 143,141 84,967 116,320 3,568 4,096
merge-rollup 6.40 (-2%) 33.6 1,440 (+2%) 2,760 957 3,136 31.0 65,536
private-kernel-tail-to-public N/A 9,442 (-2%) 80,901 (-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 51,901 2,097,152 437
Test:emit_nullifier 16,128 ⚠️ 1,601 (-27%) 65,536 437
FPC:fee_entrypoint_public 16,128 ⚠️ 9,095 (-38%) 524,288 437
FPC:fee_entrypoint_private 16,128 9,530 524,288 437
Token:unshield 16,128 53,816 2,097,152 437
SchnorrAccount:spend_private_authwit 16,128 2,645 (+2%) 131,072 437
Token:transfer 16,128 39,891 (+1%) 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 10.9 (-1%) 17.8 (-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.636 (-1%) 0.546 (-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 51.4 80.5 262 504 984 1,948 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.526 0.497 0.476 0.471 0.466 (-1%) 0.465 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 61.5 119 377 740 1,461 (-1%) 2,914 (-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.536 0.534 0.511 0.509 0.506 (-1%) 0.506 (-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 66.9
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 108
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.587

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,613 664,966

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 28,885 (-3%) 4,232 131,723 (-1%)
Metric 0 public data writes 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 1,288 (-4%) 2,208 1,480 3,900 (-1%) 1,648 1,924 (-1%)

@signorecello signorecello force-pushed the zpedro/docs_relative_urls branch from 624ccbc to 34efdb1 Compare May 20, 2024 12:14
@AztecBot
Copy link
Collaborator

AztecBot commented May 20, 2024

Docs Preview

Hey there! 👋 You can check your preview at https://664f2f4883eecd07d866cb48--aztec-docs-dev.netlify.app

@signorecello signorecello force-pushed the zpedro/docs_relative_urls branch from 34088a8 to eded443 Compare May 20, 2024 16:07
@signorecello signorecello force-pushed the zpedro/docs_relative_urls branch from eded443 to 5755f1f Compare May 20, 2024 16:08
@signorecello signorecello force-pushed the zpedro/docs_relative_urls branch from 5755f1f to 8e696e2 Compare May 20, 2024 16:17
@signorecello signorecello changed the title script to rewrite absolute paths chore(docs): rewriting absolute paths May 20, 2024
@signorecello signorecello marked this pull request as ready for review May 20, 2024 16:23
@signorecello signorecello requested a review from a team May 20, 2024 16:23
@signorecello signorecello force-pushed the zpedro/docs_relative_urls branch from 8e696e2 to 952c4ef Compare May 20, 2024 16:39
@signorecello signorecello force-pushed the zpedro/docs_relative_urls branch from 952c4ef to 7039534 Compare May 20, 2024 16:42
Base automatically changed from zpedro/docs_urls to master May 20, 2024 17:17
@signorecello signorecello force-pushed the zpedro/docs_relative_urls branch from 7039534 to 8298ee8 Compare May 20, 2024 18:09
Copy link
Contributor

@critesjosh critesjosh left a comment

Choose a reason for hiding this comment

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

Are relative paths better than absolute?

If a file is moved, its contained links with relative paths would need to be updated, but with absolute paths they wouldn't.

@signorecello
Copy link
Contributor Author

That was both my reasoning to do it, and also the easiest way out of the refactor mess, but @jzaki made me see the light:

  1. It's the recommended way
  2. It's future-proof when using it for versioning.

Took me a while to write that script to rewrite the paths, mostly because of the regex. ChatGPT was useless so I ended up writing it myself.

But relative links seem the right thing to do in docusaurus.

@jzaki
Copy link
Contributor

jzaki commented May 21, 2024

I did the quadrant breakdown in slack regarding paths/urls, relative/absolute. And linked to the docusaurus docs on links and versioning.
The absolute url paths were not in the repo previously, and relative file paths have their advantages listed. I didn't go deep to compare against absolute file paths, and relative url paths (we were using both before.

Dont recall where it's captured, but relative file paths make sense within a section, and absolute file paths make sense between sections.
They're all tools at our disposal for how we want docs to live. Eg changing url paths while not changing file paths, which arguable we'd be doing more of the former.

@signorecello signorecello force-pushed the zpedro/docs_relative_urls branch from f16267f to 0274c09 Compare May 22, 2024 16:21
@signorecello signorecello enabled auto-merge (squash) May 23, 2024 09:31
@signorecello signorecello force-pushed the zpedro/docs_relative_urls branch from ab4e7a0 to 39b2ea9 Compare May 23, 2024 11:50
Copy link
Contributor

Changes to circuit sizes

Generated at commit: ca4662406e880170c7425422eee08632455324cf, compared to commit: 9c54590f2246554d142b494b8c7a03238096600d

🧾 Summary (100% most significant diffs)

Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_setup +1,616 ❌ +0.73% +1,842 ❌ +0.12%
public_kernel_app_logic +1,749 ❌ +0.70% +777 ❌ +0.05%
public_kernel_teardown -26,945 ✅ -10.75% -128,443 ✅ -7.91%

Full diff report 👇
Program ACIR opcodes (+/-) % Circuit size (+/-) %
public_kernel_setup 223,608 (+1,616) +0.73% 1,494,524 (+1,842) +0.12%
public_kernel_app_logic 252,148 (+1,749) +0.70% 1,623,637 (+777) +0.05%
public_kernel_teardown 223,814 (-26,945) -10.75% 1,494,818 (-128,443) -7.91%

@signorecello signorecello merged commit 7aec973 into master May 23, 2024
79 of 80 checks passed
@signorecello signorecello deleted the zpedro/docs_relative_urls branch May 23, 2024 12:12
Copy link
Contributor Author

Merge activity

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