Skip to content

ci: lower contract WASM size limit to 1235000 - #3905

Merged
pbeza merged 1 commit into
mainfrom
tech-debt/3904-ratchet-contract-size-limit
Jul 22, 2026
Merged

ci: lower contract WASM size limit to 1235000#3905
pbeza merged 1 commit into
mainfrom
tech-debt/3904-ratchet-contract-size-limit

Conversation

@pbeza

@pbeza pbeza commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Current contract size: 1,175,891 bytes (≈1.12 MiB).

Closes #3904

The contract shrank to ~1175891 bytes after dropping dcap-qvl and the
async TEE attestation changes. Set the CI hard limit just above that so
the binary can't silently grow toward NEAR's max_transaction_size, and
remove the stale comment history.

Closes #3904
Copilot AI review requested due to automatic review settings July 22, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens the CI guardrail that enforces the on-chain contract’s deployable WASM size, reducing the hard cap to better prevent gradual size creep toward NEAR’s max_transaction_size limit.

Changes:

  • Lowered the contract WASM HARD_LIMIT from 1520000 to 1235000 bytes (≈5% headroom over the reported reproducible-build size).
  • Replaced stale, PR/issue-specific historical commentary with an evergreen explanation of the limit’s purpose and maintenance intent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pbeza
pbeza requested review from anodar, gilcu3 and kevindeforth July 22, 2026 14:08
@claude

claude Bot commented Jul 22, 2026

Copy link
Copy Markdown

Pull request overview

Ratchets down HARD_LIMIT in scripts/check-contract-wasm-size.sh from 1520000 to 1235000 to keep the CI creep guard meaningful now that the contract shrank to ~1,175,891 bytes (after dropping dcap-qvl and the async TEE attestation changes). The stale, issue-specific comment history is replaced with a self-contained rationale block.

Changes:

Reviewed changes

Per-file summary
File Description
scripts/check-contract-wasm-size.sh Ratchet WASM HARD_LIMIT down to 1,235,000 and clean up the stale comment history.

Findings

Verified against the acceptance criteria in #3904: new limit matches (1,235,000), stale PR/issue-specific comments are removed, and the file-header comment (scripts/check-contract-wasm-size.sh:4-10) already explains the general rationale so the shortened inline comment doesn't lose context. Math checks out: 1,235,000 - 1,175,891 = 59,109 bytes of headroom (~5%), well below NEAR's max_transaction_size of 1,572,864.

No blocking issues.

✅ Approved

@netrome netrome left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice, thanks!

@gilcu3 gilcu3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice!

@pbeza
pbeza added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit f65c154 Jul 22, 2026
27 checks passed
@pbeza
pbeza deleted the tech-debt/3904-ratchet-contract-size-limit branch July 22, 2026 14:25
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.

Ratchet down contract WASM size limit after dcap-qvl removal

4 participants