fix(txm): not process the same block multiple times#577
Merged
GabrielMartinezRodriguez merged 1 commit intomasterfrom Apr 13, 2025
Merged
fix(txm): not process the same block multiple times#577GabrielMartinezRodriguez merged 1 commit intomasterfrom
GabrielMartinezRodriguez merged 1 commit intomasterfrom
Conversation
This was referenced Apr 1, 2025
Merged
Merged
Merged
Merged
Merged
Contributor
Author
11 tasks
aodhgan
reviewed
Apr 1, 2025
0cfc909 to
357ffc8
Compare
295778e to
2493832
Compare
357ffc8 to
7776719
Compare
2493832 to
1b2d737
Compare
7776719 to
e914fb7
Compare
1b2d737 to
38e19fa
Compare
11 tasks
aodhgan
approved these changes
Apr 3, 2025
cd47176 to
0f7df60
Compare
3077915 to
b2d994a
Compare
0f7df60 to
dfdc6c0
Compare
b2d994a to
c2be507
Compare
dfdc6c0 to
0f799ad
Compare
c2be507 to
2e048f8
Compare
0f799ad to
f362034
Compare
2e048f8 to
f814d5b
Compare
f362034 to
d817440
Compare
f814d5b to
b114aa3
Compare
d817440 to
b121ba5
Compare
b114aa3 to
4f0700c
Compare
11 tasks
b121ba5 to
650af43
Compare
4f0700c to
73c7bf7
Compare
650af43 to
641e505
Compare
73c7bf7 to
859e0a0
Compare
641e505 to
b61eeba
Compare
859e0a0 to
d06f52c
Compare
b61eeba to
db10c52
Compare
d06f52c to
63f5395
Compare
63f5395 to
f46fab6
Compare
This was referenced Apr 21, 2025
Merged
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.

Description
While monitoring the service, I noticed that when we experience network issues, the viem
onErrorcallback is triggered multiple times per block, not just once per network error. This was causing theresetBlockSubscriptionfunction to be called multiple times, leading to race conditions such as processing the same block more than onceI removed the
onErrorcallback to address this since it's unreliable. Additionally, I implemented a mechanism to ensure that already processed blocks are never processed again.Toggle Checklist
Checklist
Basics
norswap/build-system-caching).Reminder: PR review guidelines
Correctness
testnet, mainnet, standalone wallet, ...).
< INDICATE BROWSER, DEMO APP & OTHER ENV DETAILS USED FOR TESTING HERE >
< INDICATE TESTED SCENARIOS (USER INTERFACE INTERACTION, CODE FLOWS) HERE >
and have updated the code & comments accordingly.
Architecture & Documentation
(2) commenting these boundaries correctly, (3) adding inline comments for context when needed.
comments.
in a Markdown document.
packages/coreandpackages/react), see here for more info.