lightstreams-network / lightchain

Fast proof-of-authority blockchain based on go-ethereum and tendermint
https://lightstreams.network
GNU General Public License v3.0
55 stars 16 forks source link

Run CheckTX before tx is added into the txPool #189

Open ggarri opened 5 years ago

ggarri commented 5 years ago

Txs are sent via Ethereum API, if tx passes successfully the tx_pool.validateTx() it is added into the txPool and broadcasted to the local Tendermint node.

Once the local Tendermint node is notified about a new tx this runs abci.checkTx() over the same tx again, doing a double check before broadcasting the tx to other peers in the network. If the tx does not pass the abci.checkTx(), this tx will never be inserted into ethereum stateDB and it will cause an inconsistency in between stateDB and poolTx.