Faucet redesign #815
Replies: 4 comments 2 replies
-
|
Likely not desyncing from the chain because there are transactions going through and updating the faucet account (block committed ~1 minute ago). Notes seem to be created as well (example). |
Beta Was this translation helpful? Give feedback.
-
Its because we're force restarting the faucet every 5 minutes :D Without this it just stalls forever. The execution and proving is also done locally afaik :/ And network is limited to 8 txs per block so txs/s are max 1.3s. Lots of potential issues. |
Beta Was this translation helpful? Give feedback.
-
|
I see. I was thinking since the sync only happens at startup and transactions are going through, it must've not desynced and so the bottleneck would just be the local proving aspect. |
Beta Was this translation helpful? Give feedback.
-
|
I think a redesign is required to fully fix this. There are several options, e.g. using network transactions etc. A fundamental problem currently is that the account state update is performed as part of the request handler. So if the handler fails, the account may or may not be in sync with the onchain state. Similarly, its possible for a tx to expire and be reverted which would also cause the local and onchain state to differ. All of this is difficult to handle because its occurring with the request handler. I propose handling this in a more central fashion with a separate thread/task dedicated to running the account. Requests will communicate with it using channels. The account task would effectively have a queue of requests, and would process these one-by-one. This can then be trivially upgraded to aggregating multiple requests into one transaction once we have this capability. Similarly, any transaction failure due to account state desync can be detected and a fresh resync can be done before continuing with request processing. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The public faucet appears to become unresponsive to mint requests.
Symptoms
While under load, the faucet
Logs indicate that proving commences, but no note is ever produced. Its unclear what is going wrong as there are no error logs being produced.
Some potential candidates
One potential desync way is that the tx reaches the node, but is dropped, or the faucet request is canceled before the faucet state is updated.
We can't really tell without improved logs ala #811.
A potential quickfix is to avoid local state entirely. However this restricts the throughput dramatically.
Logs
Beta Was this translation helpful? Give feedback.
All reactions