Skip to content

Feature/indexer fixes - #166

Merged
valoryyaa-byte merged 4 commits into
RWA-ToolKit:mainfrom
Almikefred:feature/indexer-fixes
Jul 28, 2026
Merged

Feature/indexer fixes#166
valoryyaa-byte merged 4 commits into
RWA-ToolKit:mainfrom
Almikefred:feature/indexer-fixes

Conversation

@Almikefred

Copy link
Copy Markdown
Contributor

Summary

This PR addresses four issues in the indexer's RPC handling: explicit detection of archived contract state, making the poll interval
env-configurable, validating JSON-RPC id correlation, and adding test coverage for the env_or helper.

Changes

#106 — Detect and handle Soroban state archival errors

  • Added new IndexError::Archived variant to distinctly signal when contract state is archived
  • Archival errors now trigger retries (treated as transient) rather than failing opaquely
  • Added helper function to detect archival-related error messages

#107 — Make poll interval env-configurable

  • Converted POLL_INTERVAL constant to poll_interval() function
  • Reads RWA_POLL_INTERVAL env var (seconds), defaults to 10s
  • Operators can now tune refresh cadence without recompiling

#105 — Validate JSON-RPC id in responses

  • Added id field to RpcEnvelope struct
  • Validates response id matches request id (1)
  • Returns clear error on mismatch rather than silently ignoring

#108 — Add env_or helper unit tests

  • Test coverage for env var set vs. unset behavior
  • Ensures the config fallback helper works correctly

Notes

  • Code-only delivery: no install/build/test/scripts run during implementation.
  • Committer: Almikefred.

Closes #106, Closes #107, Closes #105, Closes #108

@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@Almikefred 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

@valoryyaa-byte
valoryyaa-byte merged commit ef6a8a7 into RWA-ToolKit:main Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants