Repository navigation
feat(ledger): add shared-checkpoint effective balance grid reads - #913
Draft
nicolasburtey wants to merge 3 commits into
Draft
nicolasburtey wants to merge 3 commits into
nicolasburtey wants to merge 3 commits into
Conversation
Read a bounded account/currency/date grid in one indexed statement. Keep\nrange construction and all-time version semantics inside the ledger.\nExpose executor-bound entry and ancestry reads for consistent projections.
Contributor
📊 Performance ReportCommit: 972c5df Cala Performance Benchmark Results (non-representative)Criterion Benchmark Results (single-threaded)
Load Testing Results (parallel-execution)
Note: Performance results may vary based on system resources and database state. Last updated by commit 972c5df |
Verify checkpoint sharing at 1, 4, 12 and 24 buckets. Exercise batch ancestry and entry hydration alongside range parity on current main.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cross-repository financial report experiment
Paired Lana draft: https://github.com/GaloyMoney/lana-bank/pull/9972
Adds a bounded account/currency/range grid read in one indexed SQL statement, with shared cumulative checkpoints and CALA-owned
BalanceRangeconstruction. Opening dates remain exclusive, closing dates inclusive, and range versions useall_time_version, not per-date snapshot versions.Also exposes executor-bound entry hydration and a read-only batch ancestor-ID lookup so Lana can project identified closing transfers on the same database snapshot. The API does not wait for EC rollups or claim a posting-time frontier.
Compatibility / current integration state
This PR targets current CALA main (0.33). The identical additive APIs were initially cherry-picked onto
feat/effective-balance-grid-0.32; the tested Lana draft pins immutable revisioncd602a309a42d8e64e9d79fc72162f1382e52096, without local paths or Cargo registry patches.During implementation Lana main merged #9879, upgrading to CALA 0.33/es-entity 0.20. The Lana rebase hit manifest/lockfile conflicts and was aborted per repository policy. Next step is to integrate the Lana draft onto that migration and consume this current-main PR revision, not downgrade main or merge the compatibility pin as-is. Both PRs remain draft for architecture review.
Local validation
cargo check -p cala-ledger --test effective_balance_grid: passed.IntoOneTimeExecutorand makes one statement. Twelve adjacent months share thirteen checkpoints. Result/probe volume remains proportional to accounts × currencies × boundaries.CI status
Security audit and typos passed. Nix-based jobs fail before running code because the Nix installer/Magic Nix Cache actions time out on network requests; one retry reproduced the infrastructure failure. No CI-green or release readiness claim is made.
Draft for architecture review, not a release/merge request.