cometbft / cometbft

CometBFT (fork of Tendermint Core): A distributed, Byzantine fault-tolerant, deterministic state machine replication engine
https://docs.cometbft.com
Apache License 2.0
612 stars 430 forks source link

abci: Add `txNeverValid` field to `ResponseCheckTx` and output error #624

Open jmalicevic opened 1 year ago

jmalicevic commented 1 year ago

Feature Request

Summary

We add an additional field to ResponseCheckTx to allow the application to signal to CometBFT that the transaction could never have been valid. Upon receiving this, CometBFT, outputs an error message that includes the sending peers ID, allowing operators to disconnect from it or filter this peer using its IP.

More details on the implementation proposal and reasoning behind this can be found in RFC 101.

cason commented 1 year ago

that includes the sending peers ID, allowing operators to disconnect from it or filter this peer using its IP.

The idea is to output the ID of the first peer that has sent the node a transaction? Recall that the same transaction can be received from several peers.

jmalicevic commented 1 year ago

It should be output everytime the transaction is received. But you have a good point, in case the transaction is in cache but it was rejected with this code, this should also be remembered, and then we output this message every time we see this.