Skip to content

Extended ledger#4981

Draft
Exxenoz wants to merge 17 commits intonanocurrency:developfrom
Exxenoz:extended_ledger
Draft

Extended ledger#4981
Exxenoz wants to merge 17 commits intonanocurrency:developfrom
Exxenoz:extended_ledger

Conversation

@Exxenoz
Copy link
Copy Markdown
Contributor

@Exxenoz Exxenoz commented Jan 5, 2026

This pull request introduces an optional extended ledger store with initial index implementations.
This is a work in progress - feedback is very welcome! 😄

ToDo:

  • Show a warning if the extended_ledger option is disabled but the extended ledger has already been initialized.
  • clear_extended_ledger CLI command.
  • Implement initial index tables and use them to optimize relevant RPCs.
  • Add test cases

@gr0vity-dev-bot
Copy link
Copy Markdown

gr0vity-dev-bot commented Jan 5, 2026

Test Results for Commit 77ba2d7

Pull Request 4981: Results
Overall Status:

Test Case Results

  • 5n4pr_conf_10k_bintree: PASS (Duration: 120s)
  • 5n4pr_conf_10k_change: PASS (Duration: 398s)
  • 5n4pr_conf_change_dependant: PASS (Duration: 555s)
  • 5n4pr_conf_change_independant: PASS (Duration: 140s)
  • 5n4pr_conf_send_dependant: PASS (Duration: 134s)
  • 5n4pr_conf_send_independant: PASS (Duration: 122s)
  • 5n4pr_rocks_10k_bintree: PASS (Duration: 115s)
  • 5n4pr_rocks_10k_change: FAIL (Duration: 291s)
  • Log

Last updated: 2026-02-22 05:20:34 UTC

@Exxenoz Exxenoz force-pushed the extended_ledger branch 5 times, most recently from 2dcdb2c to 6d4a2ed Compare January 8, 2026 13:30
@Exxenoz Exxenoz force-pushed the extended_ledger branch 2 times, most recently from 40e2e6f to 28b8749 Compare January 24, 2026 16:42
@Exxenoz Exxenoz force-pushed the extended_ledger branch 4 times, most recently from 22a66c3 to 6bcaea9 Compare January 29, 2026 02:08
…ion access

Removed version_view as it was redundant with meta_view.
Added nano::store::get_version / set_version wrappers delegating to backend version access (via meta_view) and updated all call sites.
Decouple generic meta access from versioning and update ledger store and backend accordingly.
Prepares backend for additional stores with independent versions.
This refactors selected store mutations to go through nano::ledger methods instead of accessing stores directly.
This enables future maintenance of extended index tables behind an extended_ledger flag without spreading index logic across the codebase.
This change introduces an optional ext_ledger_store with its own schema, versioning, and upgrade logic.
…dicated nano::ext_ledger

Keeps data processing and index population out of the store layer.
The ext_ledger_store is now limited to schema management and version/table migrations via perform_upgrades.
This establishes a clearer separation of responsibilities between storage mechanics and ledger-level logic.
The index is automatically backfilled from existing ledger data on initialization and kept consistent via ledger put/delete block hooks.
The index is automatically backfilled from existing ledger data on initialization and kept consistent via ledger update account hooks.
…en available

Use the account_delegators_by_weight extended ledger index to serve delegators and delegators_count RPCs when the extended ledger is available.
The index is automatically backfilled from existing pending entries on initialization and kept consistent via ledger put/delete receivable hooks.
Use the account_receivables_by_amount extended ledger index to serve receivable RPC when the extended ledger is available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants