Implemented block inactivity timeout#441
Merged
GabrielMartinezRodriguez merged 3 commits intomasterfrom Feb 25, 2025
Merged
Conversation
Deploying happychain with
|
| Latest commit: |
b6c5dd3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://91f22b7b.happychain.pages.dev |
| Branch Preview URL: | https://gabriel-retry-rpc-conexion.happychain.pages.dev |
This was referenced Feb 14, 2025
Merged
Merged
Merged
Merged
Contributor
Author
norswap
reviewed
Feb 15, 2025
packages/txm/lib/BlockMonitor.ts
Outdated
|
|
||
| private scheduleTimeout() { | ||
| this.blockTimeout = setTimeout(() => { | ||
| console.log("Timeout reached. Resetting watch.") |
Collaborator
There was a problem hiding this comment.
Suggested change
| console.log("Timeout reached. Resetting watch.") | |
| console.log("Timeout reached. Resetting block subscription.") |
norswap
reviewed
Feb 15, 2025
packages/txm/lib/BlockMonitor.ts
Outdated
| }, this.txmgr.blockInactivityTimeout) | ||
| } | ||
|
|
||
| private resetWatch() { |
Collaborator
There was a problem hiding this comment.
Suggested change
| private resetWatch() { | |
| private resetBlockSubscription() { |
norswap
reviewed
Feb 15, 2025
Collaborator
There was a problem hiding this comment.
Let's use the new logger.
norswap
approved these changes
Feb 15, 2025
52b0968 to
23723dd
Compare
53e6363 to
45ac09c
Compare
4f3b431 to
dabb31d
Compare
ac06da7 to
b9d5ea6
Compare
b9d5ea6 to
aceb0e0
Compare
0af1a20 to
b6c5dd3
Compare
11 tasks
11 tasks
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
This PR aims to solve a problem we encountered in production, where after a few hours of operation, the randomness stops working because the RPC stops sending blocks without throwing an error.
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.
pacakges/coreandpackages/react), see here for more info.