feat(soroban): add event emissions, auth cost, resource budget & priority engine (#779-782) - #783
Open
NteinPrecious wants to merge 1 commit into
Open
Conversation
… and priority engine Closes MDTechLabs#779 — Detect Redundant Soroban Event Emissions Closes MDTechLabs#780 — Implement Soroban Authorization Cost Analyzer Closes MDTechLabs#781 — Implement Soroban Resource Budget Estimator Closes MDTechLabs#782 — Implement Soroban Optimization Priority Engine Added TypeScript analyzers under packages/rules/soroban/src/: - events/redundant-event-emissions.ts (MDTechLabs#779) - authorization/authorization-analyzer.ts (MDTechLabs#780) - budget/resource-budget-estimator.ts (MDTechLabs#781) - prioritization/optimization-priority-engine.ts (MDTechLabs#782) Added corresponding Rust rules in packages/rules/src/soroban/rule_engine.rs and registered them in add_default_rules.
|
@NteinPrecious 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! 🚀 |
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.
Summary
Implements four Soroban static analysis features requested in the Stellar Wave milestone.
Issue #779 — Detect Redundant Soroban Event Emissions
packages/rules/soroban/src/events/redundant-event-emissions.tsenv.events().publish()calls by topic + payload.RedundantEventEmissionsRuleinrule_engine.rs.Issue #780 — Soroban Authorization Cost Analyzer
packages/rules/soroban/src/authorization/authorization-analyzer.tsAuthorizationCostRule— flags >2 auth calls per function and auth-in-loop.Issue #781 — Soroban Resource Budget Estimator
packages/rules/soroban/src/budget/resource-budget-estimator.tsAnalysisFindingobjects and produces aResourceBudgetReportwith per-category scores (CPU, memory, ledger, fees) on a 0–100 scale.ResourceBudgetEstimatorRule— counts storage/loop/event/auth ops per function.Issue #782 — Soroban Optimization Priority Engine
packages/rules/soroban/src/prioritization/optimization-priority-engine.tsrank()andtopN()APIs for sorted output.OptimizationPriorityRule— surfaces the highest-density function per impl block.Files Changed
packages/rules/soroban/src/events/redundant-event-emissions.tspackages/rules/soroban/src/authorization/authorization-analyzer.tspackages/rules/soroban/src/budget/resource-budget-estimator.tspackages/rules/soroban/src/prioritization/optimization-priority-engine.tspackages/rules/soroban/src/index.tspackages/rules/src/soroban/rule_engine.rsCloses #779
Closes #780
Closes #781
Closes #782