Skip to content

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

Merged
acheroncrypto merged 7 commits into
otter-sec:masterfrom
abklabs:bugfix/inline-variables-extensions-cpi
Apr 22, 2024
Merged

bugfix: inline cpi variables to fix stack violation warnings#2913
acheroncrypto merged 7 commits into
otter-sec:masterfrom
abklabs:bugfix/inline-variables-extensions-cpi

Conversation

@sunguru98

Copy link
Copy Markdown
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.

@vercel

vercel Bot commented Apr 17, 2024

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

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

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
Copy Markdown

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.

@acheroncrypto acheroncrypto left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Contributor Author

My bad ser. Apologies.

@sunguru98 sunguru98 requested a review from acheroncrypto April 18, 2024 21:20
Comment thread CHANGELOG.md Outdated
Comment thread Cargo.lock
Comment thread docs/src/pages/release-notes/changelog.md
@sunguru98 sunguru98 requested a review from acheroncrypto April 19, 2024 10:38
@sunguru98

Copy link
Copy Markdown
Contributor Author

Done ser @acheroncrypto

@acheroncrypto acheroncrypto left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread CHANGELOG.md
Comment thread docs/src/pages/release-notes/0.30.0.md Outdated
@sunguru98 sunguru98 force-pushed the bugfix/inline-variables-extensions-cpi branch from cded30d to a85461a Compare April 20, 2024 16:45
@sunguru98 sunguru98 requested a review from acheroncrypto April 20, 2024 16:48
@sunguru98

Copy link
Copy Markdown
Contributor Author

Hope this resolves ser @acheroncrypto

Comment thread CHANGELOG.md

@acheroncrypto acheroncrypto left a comment

Copy link
Copy Markdown
Collaborator

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