Skip to content
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

hotfix(builder): add preset length validation #1705

Merged
merged 4 commits into from
Feb 20, 2025
Merged

Conversation

mjlescano
Copy link
Member

@mjlescano mjlescano commented Feb 20, 2025

Preset length was not being validated, this causes that when generating the variant for publishing to the registry it can end up being more than 32bytes. Luckily, this fix is not going to break any already published package as the current preset max length published is 24bytes.

This is the original error that was being thrown when trying to pin/publish:

cannon pin ipfs://Qm...
Uploading package data for pinning...
Error: SizeOverflowError: Size cannot exceed 32 bytes. Given size: 36 bytes.

Version: [email protected]
    at FallbackRegistry.getUrl (/Users/**/.nvm/versions/node/v20.10.0/lib/node_modules/@usecannon/cli/node_modules/@usecannon/builder/dist/src/registry.js:147:23)
    at async pinIpfs 

And now, with the fix it doesn't even allow you to build the package:
Screenshot 2025-02-19 at 22 50 51

@mjlescano
Copy link
Member Author

An alpha release was published on v2.21.5-alpha.0

@mjlescano mjlescano force-pushed the hotfix-preset-length branch from 4270bd9 to 0c80155 Compare February 20, 2025 20:53
@mjlescano mjlescano enabled auto-merge (squash) February 20, 2025 20:54
@mjlescano mjlescano merged commit f6ffc9c into main Feb 20, 2025
7 checks passed
@mjlescano mjlescano deleted the hotfix-preset-length branch February 20, 2025 21:14
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