bcoin-org / bcash

Implementation of Bitcoin Cash protocol in node.js
Other
102 stars 68 forks source link

Transactions get stuck on sending #140

Open F1NYA opened 5 years ago

F1NYA commented 5 years ago

Some of transactions get stuck on sending(using wallet plugin) wallet.resend() does not work, but on node restart transactions appears in network

[error] (node) Verification failure: txn-already-in-mempool (code=alreadyknown score=0 hash=<tx hash>)
[warning] (node) Verification failed for tx: <tx hash>.
[warning] (node) Attempting to broadcast anyway...
pinheadmz commented 5 years ago

ping @rojii

This might be hard to reproduce for testing. I wonder if it's just a networking issue? We used to have issues finding peers on Bitcoin Cash network. Does it happen regularly?

F1NYA commented 5 years ago

Yes, it happens very often. Uptime 24 hours and 5 out of 5 sent transactions got stuck. After restart all finally broadcasted to the network. Sent test transaction 5 minutes ago and everything is ok, but in logs I can see that another transaction again got stuck. No errors in logs.

[error] (node) Verification failure: txn-already-in-mempool (code=alreadyknown score=0 hash=<tx hash>)
[warning] (node) Verification failed for tx: <tx hash>.
[warning] (node) Attempting to broadcast anyway...

These logs appear on wallet.resend, but transactions do not appear in the network. After restart produced logs are unchanged, but transactions show up in the main network immediately.

We can not reproduce this bug too, on stage-cluster nodes this happens very rarely due to low load, I will try to look debug logs, but it seems like nothing unusual was logged.