Skip to content

Fix/1175 1176 1177 1178 issues - #1231

Merged
Maki-Zeninn merged 4 commits into
Maki-Zeninn:mainfrom
kossyomma-beep:fix/1175-1176-1177-1178-issues
Aug 30, 2026
Merged

Fix/1175 1176 1177 1178 issues#1231
Maki-Zeninn merged 4 commits into
Maki-Zeninn:mainfrom
kossyomma-beep:fix/1175-1176-1177-1178-issues

Conversation

@kossyomma-beep

Copy link
Copy Markdown
Contributor

Summary

This PR implements four improvements across the stellar-router codebase, addressing documentation gaps, performance optimizations, and CI/CD
enhancements. All changes follow the established conventions and improve code quality and developer experience.

Changes Implemented

📚 Issue #1176: Add Missing alias_resolved Event Documentation

File: contracts/router-core/src/lib.rs

Added the missing alias_resolved event to the module-level Events documentation list. The event is emitted whenever a route alias is resolved during
the resolve() function call. This ensures developers and auditors have a complete reference of all emitted events.

Event Details:

  • Name: alias_resolved
  • Payload: (alias_name, resolved_name)
  • Location: Lines 15-34 (Events list)

Impact: Improves documentation completeness for integrators building off-chain indexers and auditors reviewing contract behavior.


⚡ Issue #1177: Optimize validate_registration() Performance

File: contracts/router-registry/src/lib.rs

Refactored the validate_registration() function to check only the last version in the versions list instead of scanning through all versions. Since
versions are always maintained in ascending order by design, checking the last element is sufficient to validate that a new version is greater than all
previous versions.

Optimization:

  • Before: O(n) loop through all versions
  • After: O(1) single comparison against last element
  • Code Change: Replaced loop with if let Some(last) = versions.last() pattern

Impact: Significant performance improvement for contracts with many registered versions, especially beneficial during batch registration operations.


🔧 Issue #1178: Add Path Filters to Metrics Workflow

File: .github/workflows/metrics-integration-tests.yml

Added path filters to the metrics-integration-tests.yml workflow to prevent unnecessary CI execution on unrelated changes. This aligns with the
existing pattern used in metrics-exporter.yml.

Changes:

  • Added paths filter for push events on main branch
  • Added paths filter for pull_request events
  • Monitored paths: metrics/** and .github/workflows/metrics-integration-tests.yml

Impact: Eliminates wasteful CI runs triggered by changes to unrelated parts of the repository, reducing resource consumption and improving feedback
time for non-metrics changes.


📖 Issue #1175: Complete execute_batch() Error Documentation

File: contracts/router-multicall/src/lib.rs

Added two missing error variants to the execute_batch() function's error documentation. These errors were already being returned by the implementation
but were omitted from the doc comment, creating a discrepancy between documentation and actual behavior.

Added Error Variants:

  1. Reentrancy — Returned when execute_batch() is called from within an executing batch (detected via reentrancy guard)
  2. ArgsTooLarge — Returned when any call's args vector exceeds MAX_ARGS_PER_CALL limit

Impact: Enables developers to write exhaustive error handling and better understand contract behavior. Improves downstream documentation accuracy
for API users.


Testing

  • ✅ All changes preserve existing functionality
  • ✅ Documentation updates are accurate and complete
  • ✅ Performance optimization maintains correctness with simplified logic
  • ✅ CI workflow changes align with existing patterns

Checklist

  • Code follows project conventions
  • Documentation is accurate and complete
  • Changes are well-organized and sequential
  • Commits are atomic and descriptive
  • No breaking changes introduced

Related Issues

Closes #1176
Closes #1177
Closes #1178
Closes #1175

@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@kossyomma-beep 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

@Maki-Zeninn
Maki-Zeninn merged commit ea43d1b into Maki-Zeninn:main Aug 30, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment