-
Notifications
You must be signed in to change notification settings - Fork 352
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
ChainDriver::transfer_token()
does not perform subsequent IBC transfer when called multiple times
#2012
Comments
A temporary workaround in #2024 is to wait for 1 second before performing another An alternative workaround is to poll the sender wallet balance before and after performing the transaction, and only return after the wallet balance has been reduced. This will require the least amount of work as compared to other kinds of refactoring. |
This PR attempts to rework the core logic of `send_tx` methods in `CosmosSdkChain` into plain functions. This is essential in helping us to solve the root problems in issues such as #2012, #2040, and supporting sending of transactions with fees in ICS29. At this stage, I have managed to refactor `send_tx_with_account_sequence_retry` and its inner calls into plain functions, and simplify the data access a little. Since this is a refactoring PR, no logic should be changed. The integration tests should help to ensure that nothing breaks with the refactoring. --- * Refactoring send_tx * WIP refactoring * More code reorganization * Split out functions from main cosmos.rs * Use refactored code to send_tx * Walk through send_tx_with_account_sequence * Refactor code * Reorder function arguments * Refactor send_tx_with_account_sequence_retry into plain function * Refactor account query functions * Refactor query_tx * Refactor wait_for_block_commits * Turn wait_for_block_commits into simple loop * Refactor send_messages_and_wait_commit * Refactor send_messages_and_wait_check_tx * Refactor sign_message * Refactor gas config * Move out query account module * Reorganize types * Remove pub const * Simplify arguments * Remove redundant account query function * Refactor query status * Introduce TransferTimeout abstraction * Use prost::Message::encoded_len() to compute encoded message length * Address review feedback * Re-add missing comments * Fix clippy error * Remove check for both timeout height offset and duration being zero * Do not set timeout height or time when input is zero
This PR attempts to rework the core logic of `send_tx` methods in `CosmosSdkChain` into plain functions. This is essential in helping us to solve the root problems in issues such as informalsystems#2012, informalsystems#2040, and supporting sending of transactions with fees in ICS29. At this stage, I have managed to refactor `send_tx_with_account_sequence_retry` and its inner calls into plain functions, and simplify the data access a little. Since this is a refactoring PR, no logic should be changed. The integration tests should help to ensure that nothing breaks with the refactoring. --- * Refactoring send_tx * WIP refactoring * More code reorganization * Split out functions from main cosmos.rs * Use refactored code to send_tx * Walk through send_tx_with_account_sequence * Refactor code * Reorder function arguments * Refactor send_tx_with_account_sequence_retry into plain function * Refactor account query functions * Refactor query_tx * Refactor wait_for_block_commits * Turn wait_for_block_commits into simple loop * Refactor send_messages_and_wait_commit * Refactor send_messages_and_wait_check_tx * Refactor sign_message * Refactor gas config * Move out query account module * Reorganize types * Remove pub const * Simplify arguments * Remove redundant account query function * Refactor query status * Introduce TransferTimeout abstraction * Use prost::Message::encoded_len() to compute encoded message length * Address review feedback * Re-add missing comments * Fix clippy error * Remove check for both timeout height offset and duration being zero * Do not set timeout height or time when input is zero
Summary of Bug
Currently the
ChainDriver::transfer_token()
method calls the Gaia commandgaiad tx ibc-transfer transfer
to perform the IBC transfer. However when submitting the IBC transfer one right after another, only the first call of it would pass.This might be a limitation of
gaiad
that we have to investigate. Otherwise, we would have to reimplementChainDriver::transfer_token()
to perform the IBC transfer using theChainHandle
method.Steps to Reproduce
#2011 modifies the IBC transfer test to perform multiple IBC transfers at once. The result is that the test fails unless
TRANSFER_COUNT
is set to1
.Acceptance Criteria
Multiple calls to
ChainDriver::transfer_token()
should succeed in submitting IBC transfer.For Admin Use
The text was updated successfully, but these errors were encountered: