Conversation
pompon0
commented
Apr 21, 2026
- made handlePeerUpdates in mempool reactor run even if Broadcast = false, so that CheckTx failures are accounted properly.
- make autobahn producer wait on a AtomicRecv instead of TxsAvailable channel so that block production is not blocked by execution.
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3281 +/- ##
==========================================
+ Coverage 58.31% 59.37% +1.06%
==========================================
Files 2085 2072 -13
Lines 209061 170097 -38964
==========================================
- Hits 121913 100996 -20917
+ Misses 78355 60333 -18022
+ Partials 8793 8768 -25
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| if errors.Is(err, mempool.ErrTxInCache) { | ||
| // If the tx is in the cache, then we've been gossiped a tx | ||
| // that we've already got. Gossip should be smarter, but it's | ||
| // not a problem. |
There was a problem hiding this comment.
nit: do we need to add any counter at least? Just in case some validator goes Haywire and send us the same transaction tons of times and waste all bandwidth for nothing.
There was a problem hiding this comment.
There are more serious holes in the tendermint p2p protocol than that. I don't thing we should spend much time on fixing them. If you feel the need to add more metrics for better visibility feel free to do so.
| // The expire tx handler unreserves the pending nonce | ||
| removeHandler := func(removeFromCache bool) { | ||
| if removeFromCache { | ||
| txmp.cache.Remove(txHash) |
There was a problem hiding this comment.
So what happens if some spammer keeps sending us an invalid tx which will fail at app CheckTx? (let's say a bad signature.)
The tx will be added to the cache, fail CheckTx, and then removed from the cache here? Should we also add a separate counter for certain app-level failures which should not happen to prevent against spamming?
There was a problem hiding this comment.
I would really love to avoid dealing with this code and just jump to rewriting it for autobahn. Your concern is valid though, of course.