You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, broadcast_tx is auto-fetching the tx receipt after some configurable sleep time and this seems to raise some issues:
the sleep time can't be 0 or anything below the avg block time or tx will just be reported as failed
the sleep time value is dependent on the network activity. On a quiet day, tx will land on the first block and 10 seconds will do, on a busier day it might take a couple of blocks before being included
Might improve things to have either:
a poll & timeout strategy here similar to cosmjs so that it retries to pull the receipt every 3 seconds or so, and timeout if it didn't succeed after 60 seconds. This might also be some settings great to have exposed on higher-level API / client parameters as defaults are quite a network dependant?
let broadcast_tx return the tx hash and have another endpoint to poll for receipt (I'm thinking of uses cases where we don't really care about the receipt and just need to fire txs fast)
Also worth noting that the tx receipt might also include another error code field, which might be non-zero if the tx failed (even if broadcast reported a code = 0 earlier), maybe we'll want to test this out as well and raise on error, rather than leaving it to the user?
The text was updated successfully, but these errors were encountered:
Currently,
broadcast_tx
is auto-fetching the tx receipt after some configurablesleep
time and this seems to raise some issues:Might improve things to have either:
Also worth noting that the tx receipt might also include another error
code
field, which might be non-zero if the tx failed (even if broadcast reported acode = 0
earlier), maybe we'll want to test this out as well and raise on error, rather than leaving it to the user?The text was updated successfully, but these errors were encountered: