Skip to content

chore(deps): drop unused packages, reclassify dev-only deps - #28

Open
alejoamiras wants to merge 1 commit into
mainfrom
chore/less-dependencies
Open

chore(deps): drop unused packages, reclassify dev-only deps#28
alejoamiras wants to merge 1 commit into
mainfrom
chore/less-dependencies

Conversation

@alejoamiras

Copy link
Copy Markdown
Collaborator

What

Manifest-only dependency trim — zero code changes. Resolved packages in yarn.lock drop from 743 to 668.

Removed (3 direct deps)

  • @aztec/protocol-contracts — zero imports anywhere in the repo (src, scripts, benchmarks, tests, workflows, generated artifacts). Remains available transitively via aztec.js/pxe/wallets.
  • @commitlint/cli + @commitlint/config-conventional — never invoked: no commitlint config file exists, no commit-msg hook (.husky/ contains only pre-commit), no CI reference.

Reclassified runtime → dev

scripts/build-package.sh publishes only dist/artifacts, target, README and LICENSE — the only package imported by shipped code is @aztec/aztec.js (via the generated artifact bindings). Everything else is exercised solely by unpublished scripts/, benchmarks/, and src/ts/test/, so it moves to devDependencies: @aztec/accounts, @aztec/noir-contracts.js, @aztec/pxe, @aztec/stdlib, @aztec/wallet-sdk, @aztec/wallets, @aztec-foundation/aztec-benchmark, commander, dotenv.

No install-behavior change: every consumer (CI included) runs a full yarn install --frozen-lockfile; nothing installs production-only.

Validation

  • yarn install regenerates the lockfile cleanly; yarn install --frozen-lockfile passes (CI parity)
  • Grep-audited every removed/moved package for imports (incl. subpaths, require, dynamic import()) across src, scripts, benchmarks, tests, workflows, and generated artifacts

Notes for reviewers

  • The Dependabot count will barely move: the flagged packages (undici, axios, vite, ws, esbuild, protobufjs) are ~96% transitives of the @aztec/* SDK and vitestvite, not direct choices here.
  • Out of scope, observed while auditing: build-package.sh strips .dependencies from the published package.json, so consumers never get @aztec/aztec.js declared even though shipped dist/artifacts/*.js imports it — works today only because consumers already install the Aztec SDK. Worth a follow-up.

🤖 Generated with Claude Code

Remove @aztec/protocol-contracts (zero imports anywhere; still present
transitively via aztec.js/pxe/wallets) and @commitlint/cli +
@commitlint/config-conventional (no config file, no commit-msg hook, no
CI usage - never invoked).

Move every package used only by unpublished code (scripts/, benchmarks/,
src/ts/test/) to devDependencies. Only @aztec/aztec.js remains a runtime
dependency: it is the sole package imported by the published artifact
bindings. No code changes; resolved packages drop from 743 to 668.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Benchmark Comparison

CPU Cores RAM Arch
AMD EPYC 7763 64-Core Processor 4 16 GiB x64

Contract: escrow

🚦 Function Gates DA Gas L2 Gas Proving Time (ms)
Base PR Diff Base PR Diff Base PR Diff Base PR Diff
(partial) withdraw 485,780 485,780 3,744 3,744 587,800 587,800 13,838 13,939 +101 (+0.7%)
withdraw 330,054 330,054 832 832 499,700 499,700 11,178 11,357 +179 (+1.6%)
withdraw_nft 378,231 378,231 1,440 1,440 527,400 527,400 12,313 12,433 +120 (+1.0%)

Contract: logic

🚦 Function Gates DA Gas L2 Gas Proving Time (ms)
Base PR Diff Base PR Diff Base PR Diff Base PR Diff
get_escrow 390,336 390,336 192 192 456,000 456,000 12,439 12,570 +131 (+1.1%)
secret_key_to_public_keys 387,695 387,695 192 192 456,000 456,000 12,459 12,461 +2 (+0.0%)
share_escrow 304,211 304,211 1,952 1,952 520,700 520,700 10,952 11,060 +108 (+1.0%)

Contract: multitoken

🚦 Function Gates DA Gas L2 Gas Proving Time (ms)
Base PR Diff Base PR Diff Base PR Diff Base PR Diff
burn_private 260,232 260,232 832 832 499,700 499,700 10,162 10,066 -96 (-0.9%)
burn_public 223,800 223,800 416 416 638,292 638,292 9,758 9,691 -67 (-0.7%)
initialize_transfer_commitment 225,054 225,054 768 768 474,500 474,500 9,690 9,706 +16 (+0.2%)
mint_to_private 297,795 297,795 1,408 1,408 511,400 511,400 10,932 10,944 +12 (+0.1%)
mint_to_public 223,800 223,800 416 416 637,800 637,800 9,657 9,748 +91 (+0.9%)
transfer_private_to_commitment 263,571 263,571 1,024 1,024 511,400 511,400 10,233 10,101 -132 (-1.3%)
transfer_private_to_private 336,124 336,124 2,048 2,048 555,100 555,100 11,350 11,422 +72 (+0.6%)
transfer_private_to_public 306,785 306,785 1,056 1,056 714,677 714,677 10,953 11,033 +80 (+0.7%)
transfer_public_to_commitment 223,800 223,800 640 640 663,516 663,516 9,772 9,665 -107 (-1.1%)
transfer_public_to_private 298,556 298,556 1,024 1,024 683,958 683,958 10,807 10,824 +17 (+0.2%)
transfer_public_to_public 223,800 223,800 480 480 673,505 673,505 9,690 9,692 +2 (+0.0%)

Contract: nft

🚦 Function Gates DA Gas L2 Gas Proving Time (ms)
Base PR Diff Base PR Diff Base PR Diff Base PR Diff
burn_private 275,232 275,232 416 416 661,052 661,052 10,545 10,529 -16 (-0.2%)
burn_public 223,800 223,800 448 448 670,034 670,034 9,681 9,835 +154 (+1.6%)
mint_to_private 341,272 341,272 1,600 1,600 735,342 735,342 11,468 11,396 -72 (-0.6%)
mint_to_public 223,800 223,800 448 448 670,718 670,718 9,684 9,638 -46 (-0.5%)
transfer_private_to_private 249,433 249,433 832 832 499,700 499,700 9,934 10,104 +170 (+1.7%)
transfer_private_to_public 275,261 275,261 416 416 659,258 659,258 10,665 10,617 -48 (-0.5%)
transfer_public_to_private 292,557 292,557 992 992 683,268 683,268 10,774 10,902 +128 (+1.2%)
transfer_public_to_public 223,800 223,800 384 384 633,285 633,285 9,661 9,775 +114 (+1.2%)

Contract: token

🚦 Function Gates DA Gas L2 Gas Proving Time (ms)
Base PR Diff Base PR Diff Base PR Diff Base PR Diff
burn_private 303,054 303,054 1,024 1,024 713,957 713,957 10,915 10,827 -88 (-0.8%)
burn_public 223,800 223,800 448 448 672,632 672,632 9,641 9,654 +13 (+0.1%)
initialize_transfer_commitment 225,054 225,054 768 768 474,500 474,500 9,656 9,523 -133 (-1.4%)
mint_to_private 355,507 355,507 2,144 2,144 738,070 738,070 11,648 11,816 +168 (+1.4%)
mint_to_public 223,800 223,800 448 448 672,227 672,227 9,639 9,763 +124 (+1.3%)
transfer_private_to_commitment 259,896 259,896 992 992 511,400 511,400 10,090 10,192 +102 (+1.0%)
transfer_private_to_private 343,699 343,699 2,592 2,592 557,600 557,600 11,476 11,431 -45 (-0.4%)
transfer_private_to_public 303,110 303,110 1,024 1,024 714,023 714,023 10,803 10,938 +135 (+1.2%)
transfer_private_to_public_with_commitment 307,280 307,280 1,600 1,600 747,323 747,323 10,961 11,133 +172 (+1.6%)
transfer_public_to_commitment 223,800 223,800 576 576 662,529 662,529 9,696 9,596 -100 (-1.0%)
transfer_public_to_private 296,520 296,520 992 992 683,304 683,304 10,819 10,824 +5 (+0.0%)
transfer_public_to_public 223,800 223,800 448 448 672,548 672,548 9,621 9,661 +40 (+0.4%)

Contract: vault

🚦 Function Gates DA Gas L2 Gas Proving Time (ms)
Base PR Diff Base PR Diff Base PR Diff Base PR Diff
deposit_private_to_private 507,983 507,983 1,312 1,312 878,248 878,248 14,177 14,300 +123 (+0.9%)
deposit_private_to_private_exact 611,708 611,708 1,888 1,888 915,316 915,316 16,094 16,186 +92 (+0.6%)
deposit_private_to_public 435,487 435,487 768 768 862,273 862,273 13,152 13,167 +15 (+0.1%)
deposit_public_to_private 424,931 424,931 1,984 1,984 965,045 965,045 13,015 13,027 +12 (+0.1%)
deposit_public_to_private_exact 424,942 424,942 1,952 1,952 949,469 949,469 12,965 13,023 +58 (+0.4%)
deposit_public_to_public 223,800 223,800 832 832 897,563 897,563 9,783 9,652 -131 (-1.3%)
issue_private_to_private_exact 611,708 611,708 1,888 1,888 915,976 915,976 16,048 16,235 +187 (+1.2%)
issue_private_to_public_exact 484,222 484,222 1,344 1,344 899,998 899,998 13,959 13,982 +23 (+0.2%)
issue_public_to_private 346,383 346,383 1,376 1,376 921,661 921,661 11,569 11,675 +106 (+0.9%)
issue_public_to_public 223,800 223,800 832 832 898,253 898,253 9,819 9,846 +27 (+0.3%)
redeem_private_to_private_exact 614,712 614,712 1,888 1,888 915,823 915,823 16,111 16,192 +81 (+0.5%)
redeem_private_to_public 435,430 435,430 768 768 862,717 862,717 13,154 13,104 -50 (-0.4%)
redeem_public_to_private_exact 428,003 428,003 1,952 1,952 949,790 949,790 13,037 13,111 +74 (+0.6%)
redeem_public_to_public 223,800 223,800 832 832 898,085 898,085 9,707 9,758 +51 (+0.5%)
withdraw_private_to_private 510,987 510,987 1,312 1,312 878,458 878,458 14,232 14,198 -34 (-0.2%)
withdraw_private_to_private_exact 614,712 614,712 1,888 1,888 915,769 915,769 16,122 16,243 +121 (+0.8%)
withdraw_private_to_public_exact 484,165 484,165 1,344 1,344 900,232 900,232 13,983 13,951 -32 (-0.2%)
withdraw_public_to_private 441,260 441,260 2,528 2,528 967,356 967,356 13,216 13,305 +89 (+0.7%)
withdraw_public_to_public 223,800 223,800 832 832 898,388 898,388 9,743 9,682 -61 (-0.6%)

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.

1 participant