Health Check: Algorithm, General Description #17
Replies: 5 comments
-
|
Hi! That’s an impressive level of detail — thanks for putting together such a structured health-check specification. From my perspective, two things stand out:
Some additional considerations worth discussing: Mobile data conditions. Health checks on flaky connections might trigger unnecessary fallbacks to This kind of reliability work is exactly what makes ADAMANT stand out from “yet another crypto wallet.” Reliability isn’t flashy, but it’s the foundation users feel every time they open the app. |
Beta Was this translation helpful? Give feedback.
-
|
See |
Beta Was this translation helpful? Give feedback.
-
|
Amazing |
Beta Was this translation helpful? Give feedback.
-
|
Hey, Thanks for the comprehensive reference. |
Beta Was this translation helpful? Give feedback.
-
|
Lgtm, nothing to add. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The goal is to make ADAMANT the most reliable crypto wallet.
See also:
Health Check Algorithm
Scope
info-serviceandIPFSConsiderations
/api/node/statusfor ADM)Node Statuses
alt_ipalt_ipagain (to avoid extra requests). Logic:alt_ipavailable → usealt_ip.Available / In-Sync Detection
Rules:
HEIGHT_EPSILON→ ActiveThresholds:
1025335See
adamant-wallets.Examples:
815,000and815,001→ both active815,000and815,002→ second active, first in-sync815,000,815,001,815,002→ last two active, first in-sync815,000,815,001,815,010→ first two active, third in-sync (cheater)815,000,815,005,815,010→ last one active, first two in-syncIssues and Solutions
Issue 1 — Initial Health Check
At the very first health check (or after a connection drop):
Solution:
Issue 2 — Subsequent Health Checks
In later checks:
Solution:
Updating (Meta-status)
To avoid confusing users, show some nodes as Updating… (visual status only).
Ping and Fastest Node
Health Check Intervals
Param
normalUpdateIntervalis defined inadamant-wallets:Connectivity
Node Availability State
Update
hasEnabledNodesandhasAvailableNodes(including Available/In-sync/Cheater) when:Important for startup UX: avoids 10-sec freeze while waiting for timeouts.
Avoid Overlapping Checks
setInterval()used instead ofsetTimeout()When to Run a Health Check
normalUpdateIntervalnormalUpdateIntervalnormalUpdateIntervalnormalUpdateIntervalnormalUpdateIntervalnormalUpdateIntervalnormalUpdateInterval / 3normalUpdateInterval / 3normalUpdateInterval / 3onScreenUpdateIntervalonScreenUpdateIntervalonScreenUpdateIntervalcrucialUpdateInterval, specific group)crucialUpdateIntervalcrucialUpdateIntervalcrucialUpdateIntervalNote: It’s important to update all nodes in a group simultaneously, not one at a time. Updating a single node separately may cause it to reach the highest height while leaving the others outdated.
Wallets
No Responses Case
…All Coin Nodes are Disabled by user
No active nodesNo active {COIN} nodes. Review the Coin node list.Send coins Flow
No active {COIN} nodes. Review the Coin node list.How to Send HTTP Requests to Nodes/Services
Request Algorithm
Do not start a new request if connection statuses are:
No active/available nodesNo enabled nodesIgnore
No internet connectionstatushealthCheck.hasInternet(),healthCheck.hasEnabledNodes('eth-indexer'),healthCheck.hasAvailableNodes('eth-indexer')Do not wait for full health check to perform a request
hasEnabledNodesandhasAvailableNodes(includingAvailable/In-sync/Cheater) are updated:Choosing a node to request:
healthCheck.getNode('eth-indexer')If the request fails:
Unavailable(except when status isNo internet connection)healthCheck.getAnotherNode('eth-indexer', failedNode)Repeat until the active node list is exhausted.
If all requests fail:
No internet connection.Notes
Beta Was this translation helpful? Give feedback.
All reactions