-
Notifications
You must be signed in to change notification settings - Fork 0
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
Dispatcher error handler and retrier features #13
Comments
* closes #4 * refs #13 Squashed commit of the following: commit c8d0a97 Author: Mohammed Sohail <[email protected]> Date: Sat Oct 5 11:22:26 2024 +0300 feat: prevent chain related errors from retrying commit c94a15f Author: Mohammed Sohail <[email protected]> Date: Sat Oct 5 11:13:34 2024 +0300 feat: add error handled dispatcher commit 399d7e1 Author: Mohammed Sohail <[email protected]> Date: Wed Oct 2 16:01:06 2024 +0300 wip: dispatcher tests commit b26742d Author: Mohammed Sohail <[email protected]> Date: Wed Oct 2 12:39:12 2024 +0300 feat: dispatcher
A retrier logger and health check has been added to confirm if the dispatch error handler works in the first place before we can proceed to write complex retrying logic. |
When performing an invalidation:
Nonce gaps should be semi-automatic. Meaning that a manual range should be provided by the admin to close any gaps. This prevents accidental overwriting of signed txs. Draw inspiration from Louis's old unlocker tool. |
Gas bump issue is blocked because the cel2 node does not reject gas prices lower than celo floor. We can enforce a gasFloor ourselves in the gas oracle as a workaround for now. But this means that until the Celo team investigates and fixes the issue, we cannot test dispatch issues around low gas prices. |
All the below depend on the correct RPC response. An error handler should be written to correctly propagate the error type from the RPC node. This is a bit difficult for sidechains e.g. Celo which implement custom response error messages.
core
error return typesGas bump
Resign a transaction and bump the gas price by 15%. On the otx table, the old transaction should be invalidated and a new one created in a single tx. Gas limit issues can also be included here but ideally, we set a generous gas limit that on the gas oracle itself.
Low nonce issues
Ideally this kind of error should be near-impossible to get if the signer implementation is correct as we maintain the nonce sequence offline. However, in the rare event that it does occur, a special noop tx which attempt a random low gas sign should be attempted to close the gap.
Out of balance
Ideally, we never face this issue. A lock should be applied on the account to prevent further tx sign requests. There should always be a pre-check on the dispatcher before it is attempted.
The text was updated successfully, but these errors were encountered: