Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronization between proxy and node is desired #334

Open
jorgeantonio21 opened this issue Jan 10, 2025 · 0 comments
Open

Synchronization between proxy and node is desired #334

jorgeantonio21 opened this issue Jan 10, 2025 · 0 comments

Comments

@jorgeantonio21
Copy link
Contributor

If the node and the proxy are not synchronized, they need to negotiate what is the right number of compute units already being computed. We can assume that the node is running with a TEE, so claimed compute units can be assumed by the node are correct, unless (most of these cases happen on streaming):

  1. The node goes down (liveness failure). In this case, the node might have updated the number of compute units without sending the request to the proxy.

  2. The proxy should have a callback mechanism that retries calling the node a few times. If the node is live, it should cache its responses, and send them back to the proxy, if a callback is triggered (this is the case, in which the proxy errored, while the node successfully generated the full response. In this case, the node retrieves the cached response and sends it as is to the proxy. The node should keep its cache for a few seconds (say 10/20 seconds) and then delete it.

  3. The node goes down (potential liveness failure). The proxy fails a number of callback retries. In that case, the proxy needs to inform the contract, which will trigger a timeout event. If the node answers back to the contract within that event, it might get back online fast enough, it is supposed to send it back to the proxy and send a hash of the already generated response to the contract (the flow order is important), it then should restart a connection (or just store everything on a dStorage layer). Otherwise, the node is flagged as down and it should get the stack compute units locked, (fully or partially).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants