User Details
- User Since
- Jan 30 2022, 13:06 (197 w, 3 d)
Aug 7 2025
As discussed offline, putting the cache in chronik-client is a better choice. In addition, the initial solution of this diff has some flaws, and the new architecture should not continue here, So let's abandon it.
Aug 5 2025
Aug 3 2025
Aug 1 2025
Jul 31 2025
There are many areas for improvement. For example, comments and the Chinese I added. :-)
Jul 30 2025
Not a very confident suggestion, not sure if we can create a helper function for let params = ChronikIndexerParams here? It seems like it could reduce a bit of code, but it doesn't make much difference.
Jul 25 2025
The mock types are clearer now
Jul 13 2025
Will failover include reconnecting, switching endpoints when onclose timeout and resubscriptions?
cron only checks empty blocks. Perhaps a completion mechanism for "newly added parsed data" can be added, which would make it easier to add new parsed data in the future. Neon responds very quickly when selecting data ranges in sqp, which is better than a self-hosted database. As for the frontend, an auto-resize function or button can be added to the sidebar, as well as adapting it for mobile devices (with smaller font sizes).
Jun 2 2025
May 26 2025
May 23 2025
Cool use case, this way ALP can also carry a shorter message like sending xec, we can emphasize this point in the etoken creation instructions. Not related to this diff.
May 15 2025
I love it, Next.js and Tailwind is my favorite combination. Especially the latest version of Tailwind. If there are any design and dev needs, please ping me.
Keep the previous diff, do not pass the type.
May 14 2025
Pass in the type. Here, unlike elsewhere where used text, I used number by default here. This component is
currently only used in these two places.
May 13 2025
May 12 2025
It is better to remove the color bars on the left side of these small cards, as they may mislead people into thinking they are dismissible notifications, alerts, or clickable items.
May 6 2025
May 5 2025
I tried shortening the timeout to 500ms and performed some tests. I found that the selection strategy doesn't slow down the user's startup experience; instead, it might make it faster. The user's actual complete loading occurs when the "loading" state disappears, which is loadCashtabState in useWallet.ts. Through adding a timer for simple testing, taking my Hong Kong IP as an example, useWallet.ts:969 shows Cashtab startup duration: 2583ms. This is the time actually perceived by users. However, when using the "selection strategy" and changing the timeout from 1000ms to 500ms, the test result is 620ms for Cashtab startup duration. Therefore, finding a faster node within 500ms and establishing a connection is often faster than choosing a default one. Furthermore, this 500ms could potentially be adjusted to 400ms or 300ms, meaning "if we can't find a faster node within 300-400ms, it doesn't matter anymore." WebSocket connection establishment speed is 2-3 times that of ping, and it's easy to prove through testing that lower WebSocket latency means lower query latency.
May 4 2025
My view is that this approach is worthwhile.
May 2 2025
May 1 2025
Apr 28 2025
rebuild again :-) please
Add test for manual close
@bot preview-cashtab
Apr 26 2025
Add README.md and npm version patch
Removed the previous delay handling. Only ensure in this diff that faulty nodes can be switched correctly.
Apr 24 2025
Based on offline discussions,
Joey's view is correct. "A node that can establish a WebSocket connection (_websocketUrlConnects) but immediately throws onerror or onclose after connection" was inferred from a March failure,
“A node that can establish a WebSocket connection (_websocketUrlConnects) but immediately throws onerror or onclose after connecting,” is not an accurate description; it’s more of an extreme example.
Apr 23 2025
Apr 22 2025
This diff will only address the issue of _websocketUrlConnects not closing the WebSocket under timeout conditions.
Apr 18 2025
keep the first modification to close WS
Apr 17 2025
Extra comments and trailing whitespace removed
update README.md
update README.md and npm version minor
Apr 16 2025
Better test url orders
Some minor adjustments regarding the above.
add package-json
rebase and add test
Apr 15 2025
add test, in the test, i don't mock measureWebsocketLatency, but instead use asynchronous actual testing to
keep it simple.
Keep using Infinity, adjust the output to display in ms
Directly return -1 in measureWebsocketLatency for timeout cases
Based on what was mentioned earlier, I first moved appendWsUrls out of the class in D17935 and reused it here.
Additionally, I removed the concurrent and batch settings, and optimized and streamlined the Sort function (the
original sort function considered multiple rounds of testing, making the code more complicated)
Apr 12 2025
Apr 10 2025
// Using the static method with strategy
const chronik = await ChronikClient.useStrategy(
ConnectionStrategy.ClosestFirst, urls, maxConcurrentTests // optional parameter, default is 20
);
Node selection is implemented using static methods in chronikclient while maintaining consistency with existing methods. Removed the original npm list
test. Moved measureWebsocketLatency and sortNodesByLatency to chronikclient.ts
After this modification, it no longer dynamically selects the best node. Instead, it rearranges the
node order only once during initialization. Removed the URL string and kept only the array to maintain consistency with chronikclient.
And use as-order as default
After this modification, it no longer dynamically selects the best node. Instead, it rearranges the node order only once during
initialization. Removed the URL string and kept only the array to maintain consistency with chronikclient.
Apr 9 2025
I have tested the modified chronik-client locally and it switches smoothly. Perhaps I could deploy it on an actual test domain for public testing?
