Repository navigation
Add Bridgeless reporting from a chain scan - #240
Merged
Merged
Conversation
Bridgeless has no reporting API. The plugin scans the chain for the validators' deposit submissions, keeps Edge's referral, and reads each order's bridge record for its status, re-reading unfinished orders on later runs.
Adds bridgeless to the query engine and the demo partner list, drops the v2 config stopgap now that the registry carries it, names TON on the v2 dashboard, and moves Bridgeless out of the blocked-partner doc.
j0ntz
commented
Oct 21, 2026
j0ntz
left a comment
Contributor
Author
There was a problem hiding this comment.
Self-review at 8cda48d (code-review-sonnet, medium): 8 findings, 3 fixed before the PR opened, 5 rejected.
Fixed before review (3)
src/partners/bridgeless.ts:417: one undecodable Submit tx threw out of the window and froze the scan at that height on every run. Fixed in "Add the Bridgeless partner plugin": the tx is logged and skipped.src/partners/bridgeless.ts:260: a token-list outage threw after the scan and discarded its progress and the pending orders. Fixed in "Add the Bridgeless partner plugin": every pending order is kept for the next run.src/partners/bridgeless.ts:77: dating and re-reads had no time limit, and a slow node could push a run past the query engine's 5 minute timeout. Fixed in "Add the Bridgeless partner plugin": after 3.5 minutes the remaining orders wait for the next run.
Rejected in curation (5)
src/partners/bridgeless.ts:597: an unknown token makes an order retry every run and never report. Rejected: the bridge only accepts registered tokens, and the order stays pending with a log line each run until the 90 day cutoff, by design.src/partners/bridgeless.ts:85: the zero-address native check is EVM-only and misses natives on other chains. Rejected: the bridge stores every native coin under the zero address; live records for bitcoin, ton, solana, bitcoincash and ethereum natives all resolved to a null tokenId.src/partners/bridgeless.ts:248: rewindingscannedTore-emits orders already reported. Rejected:insertTransactionsupserts by the${pluginId}:${orderId}doc id: a re-emitted order overwrites itself.src/partners/bridgeless.ts:293: a malformedisoDategives a NaN age and the order is never dropped. Rejected:isoDateonly comes from a Tendermint block header time, which always parses.src/queryEngine.ts:70: the plugin does nothing untilbridgelessis in an app'spartnerIds. Rejected: that is the ops deploy step for every partner, and the PR description lists it.
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.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Description
Asana task
Bridgeless has no partner reporting API. The new
bridgelessplugin reads the Bridgeless chain directly; Edge is referral 2 on the bridge.How a run works:
tx_searchheight windows for/core.bridge.MsgSubmitTransactionsfrom the last saved height (the first run starts at 6,400,000, before Edge's referral existed). The referral id is only in the message body. Each tx's protobuf is decoded locally and orders withreferral_id == 2are kept. Every validator submits the same deposit, and orders are keyedchainId/txHash/txIndex, the orderId edge-exchange-plugins assigns.complete, a signature without one iswithdrawing(approved, not yet claimed), anything else isprocessing. Unfinished orders are kept in the plugin settings and re-read every run. After 90 days without a payout they stop being re-read, with a warning in the log.Amounts are scaled by the bridge's own token list.
usdValueis left at -1 for the rates engine, which prices these orders through rates v3 by pluginId and tokenId.Registration:
bridgelessjoins the query engine and the demo partner registry as a swap provider. The registry now carries it, and theextraProviderTypesstopgap in/v2/configis removed. The v2 dashboard also gains a TON network name, anddocs/blocked-partner-reporting.mddescribes the chain scan instead of listing Bridgeless as blocked.Deploy steps (ops, not in this PR):
bridgelessto each app'spartnerIdsinreports_appswith emptyapiKeys. The plugin needs no key, but the query engine only runs partners listed there.revShareRatecovers Bridgeless.Testing
test/bridgeless.test.tsagainst a real mainnet Submit tx and bridge record (dedupe across validators, status mapping, re-reads, window splitting, held progress, the 90 day cutoff, a bad tx, a token-list outage, the run budget). The full suite passes, and verify-repo passes againstdeploy.BTC@zano>BTC@bitcoin./v2/configreportsbridgeless: swap.Test evidence
8cda48dRegister the Bridgeless partner plugin
2026-10-21
1. v2 bridgeless provider
2. v2 bridgeless networks
3. v2 bridgeless pairs
4. v2 all providers
5. v1 bridgeless chart