thetatoken/theta-protocol-ledger

BroadcastRawTransaction timeout on mainnet

Opened this issue · 1 comments

Experiencing the same problem as #99 on mainnet.

There's one more issue about the same problem but on testnet #167

Most broadcasts take somewhere between 20 ~ 60s & about 50% of them timeout with the following error printed by the theta node

[2021-12-02 13:00:11] ERROR [rpc] HTTP request timed out: requestBody={"
{\\"jsonrpc\\":\\"2.0\\",\\"id\\":1,\\"method\\":\\"theta.BroadcastRawTransaction\\",\\"params\\":
[{\\"tx_bytes\\":\\"SOME_TX_BYTES\\"}]}"}

This happens on both v3.1.1 & v3.2.0

It could be because the node is sometimes out of sync with the network. Another option is to call theta.BroadcastRawTransactionAsync instead, and check if the tx is confirmed later:

https://docs.thetatoken.org/docs/rpc-api-reference#broadcastrawtransactionasync