cennznet / plug-blockchain

PL^G: a framework for building customised blockchains
GNU General Public License v3.0
11 stars 3 forks source link

Ignore priority in tx pool replacement checks #71

Closed jordy25519 closed 4 years ago

jordy25519 commented 4 years ago

Rimu testnet is frequently seeing transactions "stuck" in the tx pool This causes the sending account to become locked. Increasing the nonce will add a tx to the pool but it won't be processed until it's predecessors are. https://github.com/cennznet/plug-blockchain/blob/47f8ec6c7484b72105141fdc1f3d8b372ef83ef2/srml/executive/src/lib.rs#L340

Transaction priority given two with the same nonce and sender is determined by the transactions encoded length, this makes flushing a stuck transaction very unfriendly. https://github.com/cennznet/plug-blockchain/blob/47f8ec6c7484b72105141fdc1f3d8b372ef83ef2/srml/executive/src/lib.rs#L346

Transactions also can't expire which means they're never pruned from the pool. Changing this would be another alternative for this fix. https://github.com/cennznet/plug-blockchain/blob/47f8ec6c7484b72105141fdc1f3d8b372ef83ef2/srml/executive/src/lib.rs#L349