Skip to content

fix: Increase maximum code body length for contract deploys #1793

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

Merged
merged 2 commits into from
Apr 18, 2025

Conversation

zone117x
Copy link
Member

@zone117x zone117x commented Apr 18, 2025

This PR was published to npm with the version 7.0.6-pr.1+4bd8d3e2
e.g. npm install @stacks/[email protected]+4bd8d3e2 --save-exact

Large (more than 100k bytes) tx-deploy txs would deserialization would fail with error:


Error: String length exceeds maximum bytes 100000
    at createLPString (./signer-metrics-api/node_modules/@stacks/transactions/dist/wire/create.js:162:15)
    at deserializeLPString (./signer-metrics-api/node_modules/@stacks/transactions/dist/wire/serialization.js:154:40)
    at deserializePayload (./signer-metrics-api/node_modules/@stacks/transactions/dist/wire/serialization.js:423:30)
    at deserializeTransaction (./signer-metrics-api/node_modules/@stacks/transactions/dist/transaction.js:153:51)

This PR updates the string length constants to match those from stacks-core.

Copy link

vercel bot commented Apr 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stacksjs-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2025 10:16am

@zone117x zone117x requested a review from janniks April 18, 2025 10:05
Copy link
Collaborator

@janniks janniks left a comment

Choose a reason for hiding this comment

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

Looks good, one test is failing — I'll fix that 👍

@janniks janniks changed the title fix: deserialize contract-deploy tx with large payload fix: Increase maximum code body length for contract deploys Apr 18, 2025
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@janniks janniks merged commit 02e05ca into main Apr 18, 2025
9 checks passed
@janniks janniks deleted the fix/deserliaze-large-tx-deploy-payload branch April 18, 2025 10:26
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.

2 participants