magicblock-labs / magicblock-labs/Solana.Unity-Core

Garbage-free on-curve check

Open
#61 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.