Repository navigation
fix: unify request queues, harden indexing cancellation, exact stroop conversion, single contract config - #707
Merged
Calebux merged 2 commits intoOct 1, 2026
Conversation
… formatting, single contract config - Extract one RequestQueue used by Horizon and Soroban with shared backoff, concurrency cap and AbortSignal cancellation - Make indexer ConcurrencyManager abort-aware and discard results that resolve after cancellation - Format XLM from bigint so no conversion path goes through a lossy float; add stroop round-trip property tests - Resolve contract address in config/contractAddress.ts, enforce it in validate:env on prebuild, drop redundant scripts, show active contract in footer Closes zintarh#632 Closes zintarh#634 Closes zintarh#636 Closes zintarh#639
|
@jones43r is attempting to deploy a commit to the zintarh Team on Vercel. A member of the Team first needs to authorize it. |
|
@jones43r 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! 🚀 |
…ontract Resolve modify/delete conflict on src/utils/stellarAmounts.ts: main (zintarh#586) merged it into the canonical src/utils/stellarAmount.ts, so keep the deletion, move this branch's helpers (including the exact-bigint formatXlm) into stellarAmount.ts, and point all importers at it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
|
Thanks for the contribution! This PR conflicted with recent changes on
Resolved and merged with PRmaster. Your commits are included in the merge. |
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
horizonRequestQueueandsorobanRequestQueueduplicate the same throttling logic #632: Newsrc/utils/requestQueue.tsis one queue parameterized by endpoint, concurrency, retry policy, and error classifier.HorizonRequestQueueandSorobanRequestQueueare now thin configurations of it, with the same backoff, concurrency cap, andAbortSignalcancellation. Their public APIs are unchanged.useRateLimitis documented as the client-side half that reads the sharedrateLimitStore. Direct tests cover ordering, concurrency, retry, abort, and clear.ConcurrencyManager(now inapp/services/concurrencyManager.ts) is abort-aware. Queued requests are dropped on cancel, and results that resolve after an abort are discarded. The run captures its signal once, becauseabortIndexingRequests()clears the shared controller. A final abort check means a cancelled run never hands back a result to be stored. Adds the regression test from test(indexer): add cancellation regression test #290.formatXlmnow formats from the exact bigint and truncates instead of rounding up, so no conversion path goes through a float. Seeded property tests over the full Int64 range cover lossless round-trip, exactness aboveNumber.MAX_SAFE_INTEGER, and display truncation that never exceeds the real amount.config/contractAddress.tsis the single source of truth for which contract the app uses.validate:envvalidates the resolved addresses and runs asprebuild. The build fails when no address is configured, or when one is malformed or the placeholder.setup-contract-address.sh,check-contract-config.js,check-contract-deployment.mjsandverify-contracts.mts, which duplicated each other.CRON_SECRETin.env.examplesovalidate:envpasses.Closes #632
Closes #634
Closes #636
Closes #639
Validation
requestQueue,indexingCancellationandstellarAmount.propertysuites pass. The existingsorobanRequestQueue,stellarAmount(s),Footer,horizonIndexerandtrustlineServicesuites pass.validate:envexits 1 when addresses are missing or malformed, and 0 with a valid one.main:networkSwitchService,mintWrapArgs,useFreighterWalletandcontractssuites fail (the last two because of the stellar-sdk ESM transform in jest).require()lines invalidate-env.js.