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

bugfix: inline cpi variables to fix stack violation warnings #2913

Merged

Conversation

sunguru98
Copy link
Contributor

The token extensions macro is responsible for initializing extensions while creating a mint was having way too many repetitive stack variables that resulted in a "Stack size overset" warning while building programs. It wasn't occurring until there were way too many extensions initialized. Hence this fix inlines the variables directly into arguments to fix the warning that arose while building the WNS program.

Copy link

vercel bot commented Apr 17, 2024

@sunguru98 is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@kespinola kespinola left a comment

Choose a reason for hiding this comment

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

This change reduces the limit enough to be used in WNS but adding more expansion arms or more extensions in an instruction will likely overflow the stack. We will continue to monitor this within WNS and improve as we encounter issues.

@luke-truitt
Copy link

This issue applies generally to other Token Extensions projects as well, this resolves outstanding issues on the RWA Token Extension project as well. would be great to have in the next release.

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

The constraint changes are OK but please don't modify versions of the crates.

@sunguru98
Copy link
Contributor Author

My bad ser. Apologies.

CHANGELOG.md Outdated Show resolved Hide resolved
Cargo.lock Outdated Show resolved Hide resolved
docs/src/pages/release-notes/changelog.md Outdated Show resolved Hide resolved
@sunguru98
Copy link
Contributor Author

Done ser @acheroncrypto

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

I'd like to avoid requesting changes, but this still has small issues.

CHANGELOG.md Show resolved Hide resolved
docs/src/pages/release-notes/0.30.0.md Outdated Show resolved Hide resolved
@sunguru98 sunguru98 force-pushed the bugfix/inline-variables-extensions-cpi branch from cded30d to a85461a Compare April 20, 2024 16:45
@sunguru98
Copy link
Contributor Author

Hope this resolves ser @acheroncrypto

Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants