Cosmos mempools and blocks
Recently with the Celestia airdrop, Cosmos was jammed. IBC transfers were taking ages if getting executed at all and this is the optimistic scenerio where something valuable was filling up the blockspace but there have been instances where the mempool was flooded with malicious transactions and validators struggled to handle load. To understand the nitty gritty lets first dive into how transactions work on cosmos.
Pipeline
From the very basic, a user signs a transaction which is simulated to verify hashes and format by the rpc, which then is picked up by the relayer and sent to one of the nodes on the network.
Screenshot 2023-11-21 at 1.12.42 AM
The transactions are are shared over the gossip network between all the nodes, while the scheduled proposer builds a block after calling the checkTx function to verify it once again and then proposer creates a proposal which is voted upon and where the bft consensus comes into play and after the block is finalised the transactions. every block contains