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: initial Earthly CI #5069

Merged
merged 202 commits into from
Mar 15, 2024
Merged

feat: initial Earthly CI #5069

merged 202 commits into from
Mar 15, 2024

Conversation

ludamad
Copy link
Collaborator

@ludamad ludamad commented Mar 8, 2024

Introduces earthly as an alternative CI that hopes to eventually replace our current build-system.

https://docs.earthly.dev/ is a build system that combines Makefiles and Dockerfiles. This is basically exactly what our system needed, IMO, and has some nice things figured out. Hope is to reduce complexity of working with the build system by a good chunk.

Core changes:

  • we have a github actions CI that runs a single end to end test inside earthly for arm64 and x86_64
  • new Earthfile's now mirror the Dockerfile's, notable differences:
    • we build our own foundry package for ARM support
    • we build our own wasi-sdk package for ARM support
    • grumpkin SRS is no longer generated on the spot, but downloaded like bn254 SRS
    • we don't inject any commit hashes for Noir as this would cause spurious rebuilds as any difference stops caching, instead we inject a content hash (to be revisited)

Side changes:

  • since we build our own wasi-sdk 21 package, and it is clang18, some compilation workarounds
  • allow specifying a different nargo and acvm binary in build
  • small output tweaks

@AztecBot
Copy link
Collaborator

AztecBot commented Mar 8, 2024

Benchmark results

Metrics with a significant change:

  • note_successful_decrypting_time_in_ms (8): 193 (+30%)
  • note_trial_decrypting_time_in_ms (8): 96.1 (+80%)
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 8ae0c13c 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 5,668 18,820 36,356
l1_rollup_calldata_gas 66,424 238,972 468,800
l1_rollup_execution_gas 659,747 941,556 1,317,207
l2_block_processing_time_in_ms 1,270 (-3%) 4,891 (+1%) 9,308 (+4%)
note_successful_decrypting_time_in_ms ⚠️ 193 (+30%) 532 (+8%) 965 (+1%)
note_trial_decrypting_time_in_ms ⚠️ 96.1 (+80%) 47.9 (-56%) 100 (+9%)
l2_block_building_time_in_ms 18,089 (-1%) 68,200 (-2%) 135,047 (-2%)
l2_block_rollup_simulation_time_in_ms 8,170 28,785 (-2%) 56,492
l2_block_public_tx_process_time_in_ms 9,897 (-2%) 39,354 (-2%) 78,455 (-3%)

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,306 27,955 (+1%)
note_history_successful_decrypting_time_in_ms 1,243 (-8%) 2,448 (-6%)
note_history_trial_decrypting_time_in_ms 73.0 (-36%) 163 (+29%)
node_database_size_in_bytes 19,054,672 35,643,472
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 279 (-2%) 44,366 28,244
private-kernel-ordering 214 (-3%) 52,868 14,326
base-parity 1,815 (-4%) 128 311
base-rollup 724 165,787 925
root-parity 1,624 (+3%) 1,244 311
root-rollup 68.8 (-1%) 4,487 789
private-kernel-inner 640 (-2%) 73,771 28,244
public-kernel-app-logic 442 (-2%) 35,260 28,215
public-kernel-tail 172 (-1%) 40,926 28,215
merge-rollup 8.27 (-1%) 2,696 925

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 9.97 (-1%) 16.0 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.581 0.495 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.9 (+2%) 72.0 230 445 872 (-1%) 1,724 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.481 (+2%) 0.444 0.418 0.416 0.414 (-1%) 0.413 N/A
batch_insert_into_indexed_tree_20_depth_ms N/A N/A 54.1 106 (-1%) 333 663 1,306 2,619 (+1%) N/A
batch_insert_into_indexed_tree_20_depth_hash_count N/A N/A 104 207 691 1,363 2,707 5,395 N/A
batch_insert_into_indexed_tree_20_depth_hash_ms N/A N/A 0.481 0.479 (-1%) 0.454 0.456 0.452 0.453 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.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 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 (-1%)

Miscellaneous

Transaction sizes based on how many contract classes are registered in the tx.

Metric 0 registered classes
tx_size_in_bytes 22,012

Transaction processing duration by data writes.

Metric 0 new note hashes 1 new note hashes
tx_pxe_processing_time_ms 3,228 (-2%) 1,745 (-2%)
Metric 0 public data writes 1 public data writes
tx_sequencer_processing_time_ms 11.6 (+6%) 1,235 (-2%)

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.

4 participants