Skip to content

chore: calculate compute budget for commit transactions #51

Closed
@thlorenz

Description

@thlorenz

Problem

At this point we hardcoded the CU budget that we provide with every commit/finalize transaction.
We quadrupled it today since the 20K microlamports we had hardcoded before wasn't enough and made our commits fail.

However this has two problems:

  • we now pay too much for small account sizes
  • very large commits may still fail

Solution

We should determine a formular or table of account-size vs. CUs necessary and then use it to calculate the optimal CU budget for each commit transaction.

Urgency

If we go to mainnet we could be loosing a bunch of SOL especially if some users spam us with trigger commits.

Metadata

Metadata

Assignees

Labels

P1High priority

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions