wormhole-foundation / native-token-transfers

Open, flexible, and composable framework for transferring tokens across blockchains without liquidity pools
Other
22 stars 40 forks source link

solana: Replacing `AccountInfo` with `UncheckedAccount` leads to stack access violation #510

Open nvsriram opened 3 months ago

nvsriram commented 3 months ago

See https://github.com/wormhole-foundation/example-native-token-transfers/pull/507#issuecomment-2327009781

UncheckedAccount and AccountInfo both represent unchecked accounts in Anchor. As per this feature request, AccountInfo may be deprecated in the future and it is recommended to use UncheckedAccount for readability and performance. However, using UncheckedAccount leads to a stack overflow error.

nvsriram commented 3 months ago

Initial debug attempt by Box-ing the rate_limit account in initialize was not enough. See #509