Skip to content

Conversation

@zone117x
Copy link
Contributor

@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/common@7.0.6-pr.1+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.

@vercel
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
Contributor

@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
@codecov
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.

3 participants