wen-community / wen-program-library

Apache License 2.0
90 stars 20 forks source link

Save Bumps in Account State #78

Closed kespinola closed 3 months ago

kespinola commented 4 months ago

Issue

Not all accounts save their bump to the account to be used later when computing address from seeds. This causes each instruction to burn compute units finding a match.

Resolution

Save the bump on the account and then reference when validating address from seeds.

Example

https://github.com/wen-community/wen-new-standard/blob/b6454c09447dcabac94ee9ad59b43b1f9bb5aead/programs/wen_new_standard/src/instructions/group/create.rs#L67

kespinola commented 4 months ago

Issue with bumps identified on this PR. https://github.com/wen-community/wen-new-standard/pull/77#pullrequestreview-2037866128

sunguru98 commented 4 months ago

PR #81 and (upcoming PR edited later after #82 created) refers to this issue. @luke-truitt