-
Notifications
You must be signed in to change notification settings - Fork 130
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
Relay transactions mortality works incorrectly #1193
Comments
It happens when there's a chain reorg - we're using best header when tx is submitted. If tx has been submitted when best header was |
Braindump: problem that is fixed by the mortal transactions = if relay is restarting (which may be triggered manually or because of its internal mechanisms), while there are his active transactions in the wild, they (transactions) are invalidated. Ideally - while relay restarts (which is true now for auto-restarts). For fixing the same + auto-restarts we may use submit-and-watch RPC to see what happens with transaction. Then, if transaction is removed from the pool, we may restart relay loop. But there are some caveats:
When using public RPC nodes, (2) and (3) may in theory be used by malicious actors to 'break' relay. So imo stall-timeout and transactions mortality is the way to go now - it covers (more or less) all possible restart/stall cases. At least we have a guarantee that if relayer has not seen state update until some block, then its transaction has been 100% lost and it won't lose its money by resubmitting the same tx (probably with higher tip). === If we accept this ^^^, then the next problem is described in previous comment. If Simply using Using We should select block in the === If we accept this ^^^, then we shall also accept the fact that there's no perfect solution for that. And it seems to me that the best solution here is the simplest - instead of using |
Some message relay transactions are removed from the pool (just after being accepted) with the
BadProof
error. E.g.:The text was updated successfully, but these errors were encountered: