OpenZeppelin / OpenZeppelin/compact-tools

dev: give the deploy tx its own circuit budget

Open
#177 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
4
Forks
5
Avg merge
15h 28m
Merged PRs (30d)
31

Description

One `circuits_per_tx` in `packages/deployer` sizes both the pruned `ContractDeploy` and every `MaintenanceUpdate` insert, but the deploy tx also carries the constructor's public state, so the same count weighs more in fragment 0 than in an insert.

When the pool refuses the deploy, the cap that finally lands it becomes the plan's cap (`#deployFragmentZero`, `planFragments(circuits, attempt.cap)`), so every insert is sized for the heavier deploy tx and lands smaller than it could.

Either accept a separate cap for fragment 0 or plan the inserts from the configured budget rather than the deploy's landed cap. Noted as a follow-up in #174.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/deployer and trace #deployFragmentZero through planFragments(circuits, attempt.cap), comparing how the pruned ContractDeploy and MaintenanceUpdate inserts use circuits_per_tx. Review the follow-up context in #174. Done means fragment 0 can use its own cap, or inserts are planned from the configured budget rather than the deploy's landed cap.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.