Skip to content

fix: split entry size into different Data and Wasm limits#2163

Merged
marcelosalloum merged 2 commits into
mainfrom
fix/network-limits-contract-data-entry-size
Jul 24, 2026
Merged

fix: split entry size into different Data and Wasm limits#2163
marcelosalloum merged 2 commits into
mainfrom
fix/network-limits-contract-data-entry-size

Conversation

@marcelosalloum

@marcelosalloum marcelosalloum commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

What

  • Split the Network Limits row "entry size" into two rows:
    • "Individual ledger entry size (contract data entry)" (64 KiB)
    • "Contract code (Wasm) size (contract code entry)" (128 KiB)
Screenshot 2026-07-24 at 10 26 16 AM

Why

  • The page displayed contract_max_size_bytes (128 KiB) labeled as the size limit for all ledger entries, but that setting only caps ContractCode (Wasm) entries. ContractData entries are capped by contract_data_entry_size_bytes at 64 KiB, which the page didn't show at all

Verify

Compare the page against the live mainnet config:

stellar network settings --network mainnet

Also, had AI working on test contracts that validated these are indeed the limits on the chain.

@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Jul 22, 2026
@marcelosalloum marcelosalloum self-assigned this Jul 22, 2026
@marcelosalloum
marcelosalloum marked this pull request as ready for review July 22, 2026 17:48

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

Splits ContractData and Wasm entry limits and corrects transaction resource calculations.

Changes:

  • Adds and fetches the 64 KiB ContractData entry limit.
  • Displays separate ContractData and Wasm limits.
  • Updates resource calculations and end-to-end coverage.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
scripts/fetch-network-limits.mjs Fetches and generates the ContractData limit.
src/constants/networkLimits.ts Adds generated limits for all networks.
src/app/(sidebar)/network-limits/page.tsx Splits the entry-size display rows.
src/helpers/getTxResourceBreakdown.ts Uses the ContractData limit.
tests/e2e/networkLimitsPage.test.ts Verifies both displayed limits.

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

Comment thread src/helpers/getTxResourceBreakdown.ts
@stellar-jenkins-ci

Copy link
Copy Markdown

@jeesunikim

Copy link
Copy Markdown
Contributor

I will move the fetch limits logic into backend once stellar/laboratory-backend#83 is merged!

@marcelosalloum marcelosalloum changed the title fix: split entry size into data and Wasm limits fix: split entry size into different Data and Wasm limits Jul 24, 2026
The JSDoc still cited the old combined 128 KiB entry-size limit; the code
now uses contract_data_entry_size_bytes (65,536 bytes).
@stellar-jenkins-ci

Copy link
Copy Markdown

@marcelosalloum
marcelosalloum merged commit 62e959e into main Jul 24, 2026
7 checks passed
@marcelosalloum
marcelosalloum deleted the fix/network-limits-contract-data-entry-size branch July 24, 2026 17:46
@github-project-automation github-project-automation Bot moved this from Backlog (Not Ready) to Done in DevX Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants