Solana.Unity-Core
Solana.Unity-Core copied to clipboard
:zap: Optimize find program key by adding static buffers and reusing the same SHA256 while finding an off-curve key
| :Ready: | :Refactor: | :yes: | :--: |
Problem
A lot of garbage was being created while trying to find PDAs.
Solution
Merge Create and Find so the Sha256 instance can be reused. This alone reduces garbage created by 75%. Also removed memory stream and push the byte arrays directly into the Sha256 instance.