Skip to content

feat: cache wallet and dust state; improve ledger state deserialization performance#820

Closed
mpskowron wants to merge 13 commits into
mainfrom
skowron/toolkit_perf
Closed

feat: cache wallet and dust state; improve ledger state deserialization performance#820
mpskowron wants to merge 13 commits into
mainfrom
skowron/toolkit_perf

Conversation

@mpskowron

Copy link
Copy Markdown
Contributor

Overview

EARLY DRAFT

🗹 TODO before merging

  • Ready

📌 Submission Checklist

  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason:
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • Updated AGENTS.md if build commands, architecture, or workflows changed
  • No new todos introduced

🧪 Testing Evidence

Please describe any additional testing aside from CI:

  • Additional tests are provided (if possible)

🔱 Fork Strategy

  • Node Runtime Update
  • Node Client Update
  • Other:
  • N/A

Links

@mpskowron mpskowron force-pushed the skowron/toolkit_perf branch from 0ad87ab to b0f000b Compare March 2, 2026 21:11
@github-actions

github-actions Bot commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

kics-logo

KICS version: v2.1.19

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 44
LOW LOW 3
INFO INFO 59
TRACE TRACE 0
TOTAL TOTAL 106
Metric Values
Files scanned placeholder 26
Files parsed placeholder 26
Files failed to scan placeholder 0
Total executed queries placeholder 73
Queries failed to execute placeholder 0
Execution time placeholder 12

@mpskowron mpskowron force-pushed the skowron/toolkit_perf branch 2 times, most recently from bdaa58d to 531b9a1 Compare March 4, 2026 17:28
@mpskowron mpskowron force-pushed the skowron/toolkit_perf branch from a00eb47 to 65f7244 Compare March 6, 2026 17:21
@ozgb ozgb mentioned this pull request Mar 13, 2026
14 tasks
github-merge-queue Bot pushed a commit that referenced this pull request Mar 18, 2026
* feat: cache wallet and dust state; improve ledger state deserialization performance

* feat: separate ledger and wallet caches

* feat: use file based cache for wallets and ledger state

* fix: greatly improve performance of ledger state gc

* feat: improve performance and toolkit new command

* perf: event batching when replaying blocks

* refactor: remove some unnecessary code

* fix: fail gracefully if not enough DUST

* feat: better conccurrency for tx generation

* feat: add cmd line param to control ryon concurrency

* fix: bson encoding

* docs: add change files

* test: verify trusted deserialization matches upstream

Adds a round-trip test that deserializes a LedgerState via both the
standard (two-pass verified) and trusted (single-pass) paths, then
asserts they produce identical serialized output. Catches silent
divergence if upstream changes its hash function or format.

* feat: return built txs from batch_single_tx instead of writing to files

Use ordered `buffered` stream, collect results into SerializedTxBatches,
support inline --transfers JSON arg alongside --transfers-file, and
extract transfer spec parsing into BatchSingleTxArgs::get_transfer_specs.

This brings `batch_single_tx` in-line with the other toolkit builders

* fix: tweak cache dir creation for better UX

* docs: update PR links in change files

* docs: tweak comment

* chore: demote [perf] timing logs from info to debug

* feat: use postcard instead of bson

* fix: fix toolkit tests (compile errors + logs)

* refactor: split build_fork_aware_context_cached into separate functions

* feat: add --seeds flag to `fetch` subcommand

* build: fix error in toolkit dockerfile

* docs: add change file documenting default cache change

* build: fix npm audit error

* refactor: vec to array and method extraction

* fix: apply events between ledger7 and 8 correctly

* fix: some of file_backend data races

* refactor: remove dead code and improve some comments

* test: fix compile errors in local-env tests

* fix: lint warning

* refactor: small tests simplification

* refactor: reuse single_tx command in batch_single_tx; make cached_context tests faster and more useful

* fix: file_backend now uses unique temp files to avoid data races on write; correct changefiles content

* refactor: small comments revert and refine

* tweak: check states do not diverge

Signed-off-by: Giles Cope <gilescope@gmail.com>

* docs: improve comments for wallet_state_cache

---------

Signed-off-by: Giles Cope <gilescope@gmail.com>
Co-authored-by: Michał Skowron <michal.skowron@iohk.io>
Co-authored-by: Giles Cope <gilescope@gmail.com>
@gilescope gilescope added this to the node-1.0.0 milestone Apr 10, 2026
@mpskowron

Copy link
Copy Markdown
Contributor Author

This one was merged within #939

@mpskowron mpskowron closed this Apr 10, 2026
@mpskowron mpskowron deleted the skowron/toolkit_perf branch April 10, 2026 16:07
m2ux added a commit that referenced this pull request Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
m2ux added a commit that referenced this pull request Apr 23, 2026
Signed-off-by: Mike Clay <mike.clay@shielded.io>
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