fix: stabilize MPB bridge transaction history reads#271
Open
edehvictor wants to merge 2 commits into
Open
Conversation
29 tasks
Author
Local validation after latest pushLatest pushed commit: Demo video: https://www.loom.com/share/ca5ef9ad275245fea142ffee278f6f68 What I validated locally:
Implementation notes:
Testing run:
Proof screenshots: |
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.
Closes #270
Addresses #268
Finalizes #269
Changes
provider.getLogscalls using max 500-block chunks.BridgeRequestandExecutedTransferto reduce RPC load.bridgeReadOnlyUrlssupport for MPB history reads, while preserving fallback to the existing app-level read-only provider setup.StaticJsonRpcProviderfor more stable network detection.Implementation Notes
The original issue expected independent per-chain reads. During local testing, public RPCs rate-limited heavily when too many requests were fired quickly, especially Celo public endpoints. The final implementation keeps chains isolated, but runs history RPC requests sequentially with a small delay and only for the active source/target route. This follows the later review guidance about slowing requests down and testing what public RPCs allow.
Each
eth_getLogsrequest remains capped at 500 blocks.Manual Verification
Validated locally in GoodProtocolUI using yalc/manual local package linking.
Environment used:
REACT_APP_NETWORK=production-celohttps://forno.celo.org,https://rpc.ankr.com/celo,https://celo.drpc.orgtatum,onfinality,1rpc,alchemyBridge flow tested:
10 G$from Celo to XDC via LayerZero.0x866075b684c5c9babd57501a99a25d60a36bb3072d054b2b9f53299417c0cc76Bridged via LayerZeroCelo -> XDC+10.00 G$Demo video: TODO - add video link here.
Testing
Passed:
The helper test result was:
Could not complete in this Windows PowerShell environment:
Reason: repo-wide CRLF/prettier warnings across many existing files in this Windows checkout. A targeted lint pass against the changed source files passed with
--quiet.Reason: both package build scripts fail before compiling because
dev:cleancalls Unixrm, which is not available in this PowerShell shell:The TypeScript compile steps from those packages were run directly and passed.
Remaining Risks
rmandyalcare available.Summary by Sourcery
Stabilize MPB bridge transaction history by switching to targeted log-based RPC reads, introducing per-chain error isolation, and wiring configurable read-only endpoints and chain scoping into the GoodDesign bridge UI.
New Features:
Bug Fixes:
Enhancements:
Tests: