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: add simple bb installer script #6376

Merged
merged 6 commits into from
May 22, 2024
Merged

chore: add simple bb installer script #6376

merged 6 commits into from
May 22, 2024

Conversation

TomAFrench
Copy link
Member

As of #6320, we're now expecting users to maintain an installation of bb and update its version as required.

To help with this, this PR adds an ultra dumb bbup script fashioned from noirup which only allows installing released versions of bb. This means that users can run bbup -v 0.38.0 to install 0.38.0 of bb.

Happy to make any changes as requested.

@TomAFrench
Copy link
Member Author

I think it's worth progressing with this in the short term pending the client/server model switch and have bb.js install the binary. We can delete this after that work is complete.

@AztecBot
Copy link
Collaborator

AztecBot commented May 16, 2024

Benchmark results

No base data found for comparison.

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,769 1,550 712 788 773

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,856 6,880 6,880
l1_rollup_execution_gas 587,396 587,420 587,420
l2_block_processing_time_in_ms 1,360 5,091 10,246
l2_block_building_time_in_ms 32,402 128,025 256,991
l2_block_rollup_simulation_time_in_ms 32,218 127,369 255,716
l2_block_public_tx_process_time_in_ms 16,883 70,144 144,258

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,495 28,761
node_database_size_in_bytes 21,205,072 37,937,232
pxe_database_size_in_bytes 29,868 59,425

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 3,629 21,981 19,911 61,150 86,720 2,643 1,048,576
private-kernel-inner 598 4,806 40,481 87,936 60,971 86,720 2,643 2,097,152
private-kernel-reset-small 579 2,339 23,164 117,961 61,999 86,720 2,643 1,048,576
private-kernel-tail 535 3,773 37,747 86,849 79,454 10,688 267 2,097,152
base-parity 7.40 967 8,528 128 64.0 2,208 2.00 131,072
root-parity 50.1 145 97,990 27,064 64.0 2,720 18.0 2,097,152
base-rollup 722 5,753 91,154 111,154 955 3,120 31.0 2,097,152
root-rollup 90.9 123 11,880 11,507 815 3,440 41.0 524,288
public-kernel-app-logic 242 239 582 96,448 84,613 90,393 3,572 4,096
public-kernel-tail 863 494 666 380,752 7,752 10,144 251 512
public-kernel-setup 185 242 636 112,995 75,762 89,725 3,572 4,096
public-kernel-teardown 187 266 678 121,999 77,762 94,736 3,572 4,096
private-kernel-reset 614 N/A N/A 210,456 41,446 N/A N/A N/A
private-kernel-ordering 344 N/A N/A 61,368 39,490 N/A N/A N/A
merge-rollup 6.49 97.2 2,987 2,760 957 3,120 31.0 65,536
private-kernel-tail-to-public N/A 9,495 72,522 N/A N/A 116,960 3,588 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 48,017 2,097,152 437
Test:emit_nullifier 16,128 2,770 65,536 437
FPC:fee_entrypoint_public 16,128 16,619 524,288 437
FPC:fee_entrypoint_private 16,128 8,874 524,288 437
Token:unshield 16,128 49,550 2,097,152 437
SchnorrAccount:spend_private_authwit 16,128 2,707 131,072 437
Token:transfer 16,128 34,870 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.6 18.7 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.673 0.576 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 53.0 81.3 262 510 991 1,990 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.541 0.501 0.476 0.476 0.470 0.475 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 63.9 121 378 753 1,471 2,968 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.552 0.542 0.512 0.518 0.509 0.516 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 68.8
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.600

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 83,802 765,739

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 21,017 4,268 100,278
Metric 0 public data writes 1 public data writes 2 public data writes 4 public data writes 8 public data writes
tx_sequencer_processing_time_ms 1,035 2,223 1,721 2,708 1,743

Copy link
Contributor

@guipublic guipublic left a comment

Choose a reason for hiding this comment

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

The script seems to rely on some nargo env variables such as $NOIRUP_REPO, $NARGO_BIN_DIR. I wonder if it should check for a nargo installation first?

@TomAFrench
Copy link
Member Author

Actually, that code referencing NOIRUP_ env vars should be removed entirely as it's not relevant. Thanks for pointing that out.

@TomAFrench TomAFrench enabled auto-merge (squash) May 22, 2024 10:24
@TomAFrench TomAFrench merged commit 51bc682 into master May 22, 2024
72 checks passed
@TomAFrench TomAFrench deleted the tf/bbup branch May 22, 2024 11:44
@Savio-Sou
Copy link
Member

For posterity's additional context, bbup is currently recommended in the Noir docs' installation section: https://noir-lang.org/docs/dev/getting_started/barretenberg/

If anyone reading is has an updated recommended way to install bb, please update the Noir docs and give the Noir team a heads up. Thanks!

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.

None yet

4 participants