Page MenuHomePhabricator

alitayin (alitayin)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 30 2022, 13:06 (197 w, 3 d)

Recent Activity

Aug 7 2025

alitayin abandoned D18437: [chronik-cache] Init chronik-cache in monorepo.

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 7 2025, 21:47

Aug 5 2025

alitayin added a comment to D18450: [e.cash] Add epos.cash to use-ecash page.

I'm seeing a SSL error on that site. We probably shouldn't link to this until that is resolved
Otherwise looks good though

Screenshot 2025-08-05 at 3.16.17 PM.png (472×865 px, 26 KB)

Aug 5 2025, 21:23
alitayin accepted D18450: [e.cash] Add epos.cash to use-ecash page.
Aug 5 2025, 21:23
alitayin added a comment to D18437: [chronik-cache] Init chronik-cache in monorepo.

So let me sum up to check I understand: you have persistent storage on front-end and both memory and persistent on backend. So the persistent storage on backend is only useful if the chronik instance is a remote to save the network io?

You're right, I was explaining the original design approach above. It does have some issues, which is why it hasn't been integrated yet.

The original solution didn't have decoupling problems, but it was more oriented towards:

How to fetch all data in one go
How to cache this data, then write a complex mechanism to ensure data consistency between levelDB and chronik
The cache is only considered "complete" and usable after all transactions for an address or token are fully retrieved
Designed specifically for a few tokens/addresses with large transaction volumes
Assumed most users are chronik API users who wouldn't deploy chronik themselves
Assumed that when a user accesses address A, all records for address A would be asynchronously fetched to form a robust, complete dataset, which inherently consumes extra resources and only generates "benefits" when address A is requested frequently
These design tendencies made it a "prewarming" tool with limited use cases.

So the new approach is:

Everything is processed in memory with no DB. Browser-side data storage uses localStorage
For small amounts of data, there's no need for persistence
For large amounts of data, users should deploy chronik rather than creating duplicate mirrors through persistence
No extra or duplicate data requests, zero redundancy, fetch on-demand, lightweight state, maintaining transparent proxy behavior - for users, it's simply a faster chronik client.
The original design is indeed very useful for "specific scenarios", and I might rename that original design, but chronik-cache needs to switch to the new approach.

I will design a new solution and then present it to you offline.

Aug 5 2025, 04:18

Aug 3 2025

alitayin added a comment to D18437: [chronik-cache] Init chronik-cache in monorepo.

So let me sum up to check I understand: you have persistent storage on front-end and both memory and persistent on backend. So the persistent storage on backend is only useful if the chronik instance is a remote to save the network io?

Aug 3 2025, 19:17
alitayin added a comment to D18437: [chronik-cache] Init chronik-cache in monorepo.

So let me sum up to check I understand: you have persistent storage on front-end and both memory and persistent on backend. So the persistent storage on backend is only useful if the chronik instance is a remote to save the network io?

Aug 3 2025, 13:24
alitayin added a comment to D18437: [chronik-cache] Init chronik-cache in monorepo.

So let me sum up to check I understand: you have persistent storage on front-end and both memory and persistent on backend. So the persistent storage on backend is only useful if the chronik instance is a remote to save the network io?

Aug 3 2025, 11:00

Aug 1 2025

alitayin added a comment to D18437: [chronik-cache] Init chronik-cache in monorepo.

The title has a funny typo.

What is the purpose of the persistent cache ? How is it different from the base chronik storage ?

There will be a pure in-memory mode. However, between fully storage like chronik and pure in-memory, there should also be an "on-demand persistence" option. Both in the browser and in Node.js environments, this kind of flexible persistence is often needed.

"Because it's often needed" doesn't answer the question though. Why is it often needed ?

Many use cases require repeated access to specific data. For example, the address used by paybutton, or the token used by agora. Storing all of these in memory is not a good option. Selective persistence can better complement memory usage.

Storing all of these in memory is not a good option

Why ? Isn't it exactly the point of a cache ?
The goal of a cache is to avoid a costly IO operation by replacing it with a less expensive one, typically store in memory to avoid a disk lookup which is orders of magnitude slower. Another example, browser cache is about replacing networking IO with a local disk lookup.
What is your persistent cache doing ? What is the rationale behind it ?

Aug 1 2025, 15:36
alitayin added a comment to D18437: [chronik-cache] Init chronik-cache in monorepo.

The title has a funny typo.

What is the purpose of the persistent cache ? How is it different from the base chronik storage ?

There will be a pure in-memory mode. However, between fully storage like chronik and pure in-memory, there should also be an "on-demand persistence" option. Both in the browser and in Node.js environments, this kind of flexible persistence is often needed.

"Because it's often needed" doesn't answer the question though. Why is it often needed ?

Aug 1 2025, 07:33
alitayin added a comment to D18437: [chronik-cache] Init chronik-cache in monorepo.

The title has a funny typo.

What is the purpose of the persistent cache ? How is it different from the base chronik storage ?

Aug 1 2025, 04:44
alitayin retitled D18437: [chronik-cache] Init chronik-cache in monorepo from [chronik-cache] Init chronik-ecash in monorepo to [chronik-cache] Init chronik-cache in monorepo.
Aug 1 2025, 04:43

Jul 31 2025

alitayin updated the summary of D18437: [chronik-cache] Init chronik-cache in monorepo.
Jul 31 2025, 10:10
alitayin planned changes to D18437: [chronik-cache] Init chronik-cache in monorepo.

There are many areas for improvement. For example, comments and the Chinese I added. :-)

Jul 31 2025, 10:05
alitayin requested review of D18437: [chronik-cache] Init chronik-cache in monorepo.
Jul 31 2025, 10:03

Jul 30 2025

alitayin accepted D18431: [cashtab-faucet] Tighten IP rules.
Jul 30 2025, 13:30
alitayin accepted D18429: [chronik] Let the indexer access the node bridge.
Jul 30 2025, 13:30
alitayin added a comment to D18428: [chronik] Split indexer setup into prepare_paths and prepare_db.

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 30 2025, 13:25

Jul 25 2025

alitayin accepted D18417: [Cashtab] Convert mocks to ts.

The mock types are clearer now

Jul 25 2025, 16:54

Jul 13 2025

alitayin added a comment to D18318: [Chronik] Implement FailoverProxy structure when interacting with Chronik in rust.

Will failover include reconnecting, switching endpoints when onclose timeout and resubscriptions?

Jul 13 2025, 00:43
alitayin added a comment to D18307: [metachronik, charts.e.cash] A new analytics-focused indexer and a charting front end for visualizing its data.

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).

Jul 13 2025, 00:28

Jun 2 2025

alitayin accepted D18179: [ecash-herald, explorer] Parse new miner 90 01 Pte Ltd.
Jun 2 2025, 05:22

May 26 2025

alitayin accepted D18144: [chronik-doc] Fix JSON serialization of BigInt.
May 26 2025, 08:30
alitayin accepted D18143: [chronik-doc] Update to latest client version and make sure it remains up-to-date.
May 26 2025, 07:48

May 23 2025

alitayin added a comment to D18086: [Cashtab] Suppport a custom bip21 implementation in Cashtab to enable FIRMA-USDT redemptions.

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 23 2025, 02:48

May 15 2025

alitayin added a comment to D18091: [e.cash] init v2 build.

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.

May 15 2025, 14:59
alitayin committed rABC9353aaf09f8a: [cashtab] Prevent wheel event for agora price setting input. (authored by alitayin).
[cashtab] Prevent wheel event for agora price setting input.
May 15 2025, 14:38
alitayin closed D18085: [cashtab] Prevent wheel event for agora price setting input..
May 15 2025, 14:38
alitayin updated the diff for D18085: [cashtab] Prevent wheel event for agora price setting input..

Keep the previous diff, do not pass the type.

May 15 2025, 06:03

May 14 2025

alitayin updated the diff for D18085: [cashtab] Prevent wheel event for agora price setting input..

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 14 2025, 02:21

May 13 2025

alitayin requested review of D18085: [cashtab] Prevent wheel event for agora price setting input..
May 13 2025, 06:46

May 12 2025

alitayin added a comment to D18066: [cashtab] Header UI overhaul.

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 12 2025, 12:04

May 6 2025

alitayin closed D18041: [Cashtab] Set ConnectionStrategy.ClosestFirst for initialization.
May 6 2025, 02:08
alitayin committed rABC973fbe8030ca: [Cashtab] Set ConnectionStrategy.ClosestFirst for initialization (authored by alitayin).
[Cashtab] Set ConnectionStrategy.ClosestFirst for initialization
May 6 2025, 02:08

May 5 2025

alitayin requested review of D18041: [Cashtab] Set ConnectionStrategy.ClosestFirst for initialization.

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 5 2025, 04:37

May 4 2025

alitayin added a comment to D18041: [Cashtab] Set ConnectionStrategy.ClosestFirst for initialization.

My view is that this approach is worthwhile.

May 4 2025, 02:16

May 2 2025

alitayin added inline comments to D18041: [Cashtab] Set ConnectionStrategy.ClosestFirst for initialization.
May 2 2025, 00:28

May 1 2025

teamcity awarded D18041: [Cashtab] Set ConnectionStrategy.ClosestFirst for initialization a Haypence token.
May 1 2025, 20:08
alitayin requested review of D18041: [Cashtab] Set ConnectionStrategy.ClosestFirst for initialization.
May 1 2025, 20:02

Apr 28 2025

alitayin closed D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.
Apr 28 2025, 14:00
alitayin committed rABCca9b14c07a55: [chronik-client] Fix WebSocket retry loop issues during disconnection (authored by alitayin).
[chronik-client] Fix WebSocket retry loop issues during disconnection
Apr 28 2025, 14:00
alitayin updated the diff for D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.

rebuild again :-) please

Apr 28 2025, 10:06
alitayin updated the diff for D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.

Add test for manual close

Apr 28 2025, 09:46
alitayin added a comment to D18001: [cashtab] Mobile style fixes.

@bot preview-cashtab

Apr 28 2025, 06:43

Apr 26 2025

alitayin updated the diff for D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.

Add README.md and npm version patch

Apr 26 2025, 18:35
alitayin updated the summary of D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.
Apr 26 2025, 18:24
alitayin updated the diff for D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.

Removed the previous delay handling. Only ensure in this diff that faulty nodes can be switched correctly.

Apr 26 2025, 18:17

Apr 24 2025

alitayin added a comment to D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.

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,

Apr 24 2025, 17:37
alitayin updated the summary of D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.
Apr 24 2025, 04:50
alitayin requested review of D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.

“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 24 2025, 04:46

Apr 23 2025

alitayin added inline comments to D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.
Apr 23 2025, 09:58
alitayin added inline comments to D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.
Apr 23 2025, 09:50
alitayin updated the summary of D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.
Apr 23 2025, 07:40
alitayin updated the test plan for D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.
Apr 23 2025, 06:58
alitayin requested review of D17974: [chronik-client] Fix WebSocket retry loop issues during disconnection.
Apr 23 2025, 06:44

Apr 22 2025

alitayin closed D17949: [chronik-client] Add handling for WebSocket closure .
Apr 22 2025, 20:26
alitayin committed rABCd27e5156c299: [chronik-client] Add handling for WebSocket closure (authored by alitayin).
[chronik-client] Add handling for WebSocket closure
Apr 22 2025, 20:26
alitayin added a comment to D17949: [chronik-client] Add handling for WebSocket closure .

This diff will only address the issue of _websocketUrlConnects not closing the WebSocket under timeout conditions.

Apr 22 2025, 20:15
alitayin updated the summary of D17949: [chronik-client] Add handling for WebSocket closure .
Apr 22 2025, 20:13

Apr 18 2025

alitayin added inline comments to D17949: [chronik-client] Add handling for WebSocket closure .
Apr 18 2025, 17:27
alitayin retitled D17949: [chronik-client] Add handling for WebSocket closure from [chronik-client] Add handling for WebSocket closure and add delay for reconnection to [chronik-client] Add handling for WebSocket closure .
Apr 18 2025, 17:12
alitayin updated the summary of D17949: [chronik-client] Add handling for WebSocket closure .
Apr 18 2025, 17:12
alitayin updated the diff for D17949: [chronik-client] Add handling for WebSocket closure .

keep the first modification to close WS

Apr 18 2025, 17:10
alitayin requested review of D17949: [chronik-client] Add handling for WebSocket closure .
Apr 18 2025, 03:27

Apr 17 2025

alitayin closed D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..
Apr 17 2025, 23:33
alitayin committed rABC0eaa9c9c1589: [chronik-client] Added a mechanism for automatically selecting the fastest… (authored by alitayin).
[chronik-client] Added a mechanism for automatically selecting the fastest…
Apr 17 2025, 23:33
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

Extra comments and trailing whitespace removed

Apr 17 2025, 15:15
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

update README.md

Apr 17 2025, 11:57
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

update README.md and npm version minor

Apr 17 2025, 02:36

Apr 16 2025

alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

Better test url orders

Apr 16 2025, 13:44
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

Some minor adjustments regarding the above.

Apr 16 2025, 12:41
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

add package-json

Apr 16 2025, 10:02
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

rebase and add test

Apr 16 2025, 09:53

Apr 15 2025

alitayin updated the summary of D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..
Apr 15 2025, 18:19
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

add test, in the test, i don't mock measureWebsocketLatency, but instead use asynchronous actual testing to
keep it simple.

Apr 15 2025, 18:09
alitayin added inline comments to D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..
Apr 15 2025, 14:45
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

Keep using Infinity, adjust the output to display in ms

Apr 15 2025, 14:44
alitayin added inline comments to D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..
Apr 15 2025, 14:27
alitayin added inline comments to D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..
Apr 15 2025, 14:20
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

Directly return -1 in measureWebsocketLatency for timeout cases

Apr 15 2025, 13:36
alitayin added inline comments to D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..
Apr 15 2025, 13:22
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

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 15 2025, 13:20
alitayin closed D17935: [chronik-client] Move appendWsUrls out of the class as a public function.
Apr 15 2025, 10:35
alitayin committed rABCcfd0d9a04c28: [chronik-client] Move appendWsUrls out of the class as a public function (authored by alitayin).
[chronik-client] Move appendWsUrls out of the class as a public function
Apr 15 2025, 10:35
alitayin requested review of D17935: [chronik-client] Move appendWsUrls out of the class as a public function.
Apr 15 2025, 10:08
alitayin updated the summary of D17935: [chronik-client] Move appendWsUrls out of the class as a public function.
Apr 15 2025, 10:08
alitayin retitled D17935: [chronik-client] Move appendWsUrls out of the class as a public function from [chronik.e.cash] Move appendWsUrls out of the class as a public function to [chronik-client] Move appendWsUrls out of the class as a public function.
Apr 15 2025, 09:22
alitayin requested review of D17935: [chronik-client] Move appendWsUrls out of the class as a public function.
Apr 15 2025, 09:07

Apr 12 2025

alitayin added inline comments to D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..
Apr 12 2025, 09:45

Apr 10 2025

alitayin added a comment to D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

// Using the static method with strategy
const chronik = await ChronikClient.useStrategy(

ConnectionStrategy.ClosestFirst, 
urls,
maxConcurrentTests // optional parameter, default is 20

);

Apr 10 2025, 23:34
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

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

Apr 10 2025, 23:28
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

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

Apr 10 2025, 10:01
alitayin updated the diff for D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

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 10 2025, 09:10

Apr 9 2025

alitayin requested review of D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..
Apr 9 2025, 08:25
alitayin added a comment to D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..

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?

Apr 9 2025, 08:24

Apr 8 2025

alitayin requested review of D17913: [chronik-client] Added a mechanism for automatically selecting the fastest responding node, supporting two strategies: AsOrdered and ClosestFirst..
Apr 8 2025, 19:32

Apr 6 2025

alitayin closed D17903: [Cashtab] Add 2 chronik nodes.
Apr 6 2025, 05:50
alitayin committed rABC9827da089165: [Cashtab] Add 2 chronik nodes (authored by alitayin).
[Cashtab] Add 2 chronik nodes
Apr 6 2025, 05:50

Apr 5 2025

alitayin requested review of D17903: [Cashtab] Add 2 chronik nodes.
Apr 5 2025, 20:35

Apr 3 2025

alitayin closed D17884: [chronik.e.cash] enable trailing slashes for consistent URL structure.
Apr 3 2025, 07:38
alitayin committed rABC431239ff5459: [chronik.e.cash] enable trailing slashes for consistent URL structure (authored by alitayin).
[chronik.e.cash] enable trailing slashes for consistent URL structure
Apr 3 2025, 07:38