magicblock-labs / magicblock-labs/Solana.Unity-Core
Garbage-free on-curve check
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 53
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
When using BigInteger, internally an array is allocated to hold the data for the BigInteger. This scales dynamically when using the BigInteger. Because they are immutable, every operation with these BigIntegers creates a new BigInteger, allocating more arrays. This generates a lot of garbage, and especially in a performance-critical context like game development it can create issues.
A solution could be an allocation-free BigInteger implementation, or a different way to calculate wether a point is on- or off-curve where we don't need BigInteger.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or entry point is named. Start by locating the on-curve check and its BigInteger operations, then determine whether an allocation-free BigInteger approach or an alternative calculation is feasible; done means reducing garbage while preserving correct on-curve results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- cryptography, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100