On July, 10th, 2021, there was network congestion caused many transactions to stuck in the mempool for many hours with a lot of bad side-effects (oracle pools not updating prices, RSV minting stuck etc).
The anatomy of the issue was as follows:
- gate.io exchange started to collect miners dust for many months. Every transaction had 100 inputs. There were hundreds of txs.
- the exchange paid 0.01/kilobyte for collecting transactions
- currently, all the miners rely on the node to assemble block candidates. And block assembler simply sort transactions by fee/kilobyte.
- applications are not flexible. Some time ago fee estimation API got landed into the node (in 4.0.3 release https://github.com/ergoplatform/ergo/pull/1253 ), but it is still not used by any app it seems.
- many blocks were empty at the same time
So many transactions did wait for (inefficient) inclusion of gate.io transactions for long time.
- There will be a fix for block assembly to reduce number of empty blocks. Already done and will be landed in 4.0.13.
- Transactions sort order for inclusion should not be strictly deterministic. As for some time all the miners will use the node only, its block assembler should be randomized to certain degree.
- Verification cost for a transaction should be reflected in fee.
- Ideally, apps should start using fee estimation algos instead of setting flat fee. That would take long time though.