reduce barter debounce, remove verbose logging#88
Merged
Conversation
… detection Phase 1 now only polls the two fast sources (commitment status + RPC receipt) that hit FastRPC directly. The slow mctransactions DB call (via StarRocks) runs independently on a 2s interval for failure detection only, never blocking the fast path. Previously Promise.all waited for all three sources including the slow DB query, meaning each poll cycle was bottlenecked by StarRocks latency (~1-2s) even though the RPC returns in ~50-100ms. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tatus Wagmi's useWaitForTransactionReceipt treated FastRPC's simulated preconf receipt as a real on-chain receipt, causing the toast to jump straight to "Tokens Available" (confirmed) and skip the "Preconfirmed" state entirely. Now passes receipt: undefined to useWaitForTxConfirmation so only our custom polling detects status transitions. Also adds console logging for preconf/confirmed/error events for debugging. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shows elapsed seconds from submit and gap between preconf/confirmed.
Example: [SwapToast] PRECONFIRMED | +1.23s from submit
[SwapToast] CONFIRMED | +13.45s from submit | +12.22s from preconf
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Allows comparison with commitment dispatch_timestamp from RPC to measure exact UI detection delay. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…irmed Phase 1 (preconfirmation): fast polling of commitment status + RPC receipt against FastRPC directly, with DB failure detection on independent 2s interval. No Promise.all bottleneck from slow StarRocks queries. Phase 2 (confirmation): wagmi watches for real L1 on-chain receipt. Previously Phase 2 used FastRPC's eth_getTransactionReceipt which returns a simulated receipt for preconfirmed txs, causing premature "confirmed" status. Wagmi correctly distinguishes real L1 receipts from simulated ones. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tion Logs each poll cycle result (commit status + rpc receipt status) for the first 10 polls and every 10th after that. Will show exactly what the frontend sees during the delay window. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously JSON-RPC errors (like "failed to get transaction commitments") were silently swallowed — the catch blocks returned null indistinguishable from "not found yet". Now logs warn-level messages so we can see exactly what FastRPC returns during the polling window. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
No description provided.