Support custom timeouts for txn confirmation#3
Draft
dizpers wants to merge 5 commits intodecibeltrade:mainfrom
Draft
Support custom timeouts for txn confirmation#3dizpers wants to merge 5 commits intodecibeltrade:mainfrom
dizpers wants to merge 5 commits intodecibeltrade:mainfrom
Conversation
4de3842 to
6f016b9
Compare
6f016b9 to
02cf0b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR is based on the changes made in #2. The whole idea is to add configurable timeout for both transaction submission and confirmation.
Changes
Context
Some of the operations (e.g. orders cancellation) is taking more than default 30 seconds to confirm the transaction. So the custom software (e.g. Hummingbot connector) needs a way to explicitly set the timeout for those operations, set a bigger value.
E.g. order cancellation on testnet is taking up to 90 seconds, while default timeout was just 30 seconds. So it's possible that we (1) send a txn and it succeeds in 90 seconds (2) but timeout is 30 seconds (3) a trading bot see timeout error and retry cancellation for an order which is already cancelled.
Custom exceptions are needed for the client software can understand if a txn was submitted or not. To perform re-try logic.
Usage Example
Testing
Tested on testnet and mainnet