Skip to content

feat(analyzer): implement Soroban ledger access pattern analyzer (#900) - #936

Merged
mijinummi merged 2 commits into
MDTechLabs:mainfrom
bamiebot-maker:feat/900-soroban-ledger-access-analyzer
Aug 30, 2026
Merged

feat(analyzer): implement Soroban ledger access pattern analyzer (#900)#936
mijinummi merged 2 commits into
MDTechLabs:mainfrom
bamiebot-maker:feat/900-soroban-ledger-access-analyzer

Conversation

@bamiebot-maker

Copy link
Copy Markdown
Contributor

Summary

Closes #900

Implements the Soroban Ledger Access Pattern Analyzer in \packages/analyzers/soroban/ledger/\ and corresponding diagnostic lint rules in \packages/rules/soroban/ledger/.

Features

  • Ledger Access Tracking & Classification: Detects and classifies \persistent, \instance, and \ emporary\ storage reads (\get, \has), writes (\set, \put, \update), and deletions (
    emove).
  • Repeated Access Detection: Identifies redundant read operations and multiple writes on the same key within single execution flows.
  • Loop Access Detection: Flags costly ledger operations inside \ or, \while, and \loop\ blocks.
  • Metrics Generation: Computes total reads/writes, storage tier breakdown, unique keys accessed, repeated operations count, and estimated footprint.
  • Rules & Diagnostics: Emits actionable optimization recommendations with estimated CPU and ledger fee savings.

Test Coverage

  • \packages/analyzers/soroban/ledger/tests/ledger-access-analyzer.spec.ts\ (4/4 tests passing)
  • \packages/rules/soroban/tests/ledger-access-rule.spec.ts\ (2/2 tests passing)

@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@bamiebot-maker Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mijinummi

Copy link
Copy Markdown
Collaborator

Kindly fix conflict @bamiebot-maker

@bamiebot-maker

Copy link
Copy Markdown
Contributor Author

@mijinummi The merge conflicts with upstream main have been resolved, and all unit test suites are passing cleanly! Ready for review.

@mijinummi
mijinummi merged commit e2214bc into MDTechLabs:main Aug 30, 2026
5 of 7 checks passed
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.

Implement Soroban Ledger Access Pattern Analyzer

2 participants