-
Notifications
You must be signed in to change notification settings - Fork 4
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
Current implementation of last saved height is prone to miss height. #242
Comments
we need to save height only after processing is done for that height |
We use active listener using websocket. We don't save height everytime we process something. So saving height is periodic. Even subscription errors occurs we go back to polling and subscription at the same time programmatically. |
I think this might cause an issue as the framework automatically saves height after x interval. This might work for chains with same implementation i.e. web sockets and fallback to rpc, this might not be true for all cases and might cause issue for other chains and the framework doesn't mandate the chains. |
not having websocket, relying on poll would be matter of great concern in future. This block interval saves does not mandate having websocket. |
falling back to past height such as 5 mins ago would not cause an issue but missing might. |
Suppose a scenario that a block(with height 100) is finalized in Even if we can gurantee that relayer saves all the messages in db successfully in the above Another scenario of subscription error you mentioned we handle that by polling. We might |
i think different people are talking about different things . it would be better if we had an architecture diagram of main loop. then it would be clearer for us all. |
I can answer them in great details but the problem we're facing in the past and then is not missed hight but processing of messages that are detected. We had have never missed a single message until now in the relayer, every messages that are missed delivery are in the relayer but not processed, which we've identified the issue. I understand this might be the matter of concern but not right now. |
@bcsainju @debendraoli @sherpalden is this issue still relevant? |
yes, this is still relevant but it's an edge case that might happen very rarely. |
this is addressed here: #328 |
Here,
lets suppose latest height is 100 and we are processing at 95. Assume the relayer crashed after saving the latest height of 101.
Now, next time we run the relayer, we start polling from 101. But actually we need to do it from 95.
The text was updated successfully, but these errors were encountered: