Costs breakdown
| Request pattern (Ledger v1) | Complexity model |
|---|---|
| Transaction commit | O(N) + W |
| Aggregation • balances | O(Log(N)*M) |
| Point query • accounts | O(1) |
| Range query • accounts | O(Log(N)) |
| Point query • transactions | O(1) |
| Range query • transactions | O(Log(N)) |
The complexity model is based on the in-process cost, and doesn’t take into account the networking cost.
Data volume
In the architecting for scale section, we outline different strategies to handle a growing volume of ledger data, with a focus on efficient usage of multiple ledgers.Large Integer Values
Formance supports storing very large integer values, which is particularly useful when working with cryptocurrencies or other high-precision numerical data.Storage Capacity
The Formance Ledger can store integers up to 131,072 digits in length. This is more than sufficient for handling cryptocurrency amounts like ETH or other use cases requiring high numerical precision.JavaScript Integration Considerations
While the Formance API and database can handle very large integers, you may encounter display or processing limitations when working with these numbers in JavaScript-based applications or tools. This is due to JavaScript’s inherent number precision limitations.API String Representation
To handle large integers in various tools and SDKs, Formance provides an option to receive large integer values as strings instead of numbers. Contact support for the specific header details as this feature is being implemented.The underlying data storage remains the same — this is purely a presentation layer option to ensure compatibility with different tools and frameworks.