mempool policy
In the summer of 2015(?), we went through a “spam” attack, where someone appeared to be generating tons of low feerate transactions on the network, tying up memory and causing some low-memory nodes to crash. We needed a way to limit the memory used by the mempool.... Sounds easy! Just (a) measure the size, and (b) when it gets full, just, um, do what exactly?
Bitcoin Core は、単体の tx では package として txs の fee を評価する、Ancestor fee-rate mining を行う
limit を利用した攻撃ができる
Free relay attack:
Create a low feerate transaction T.
Send zillions of child transactions that are slightly higher feerate than T until mempool is full.
Create one small transaction with feerate just higher than T’s, and watch T and all its children get evicted. Total fees in mempool drops dramatically!
Attacker just relayed (say) 300MB of data across the whole network but only pays small feerate on one small transaction.
package に制限を設ける
Bitcoin Core のデフォルト値
limitancestorcount: 25
limitancestorsize: 101kvbyte
しかしこの制限も悪用される
anyone can spend anchor output を1つだけもつ ln commitment tx の場合
package limit を利用した pinning ができる。limit の例外を設けることで、これを回避したい
実際の ln は anchor が2つあるが、それでも、package size limit 限界の package を使って pinning することが可能??
package size limit は tx レベルの制限。ある output に子孫がいくつ繋がっているかではない。ある tx にいくつ繋がっているのか、というイメージ
攻撃側が24の tx を繋げた時点で, package limit に引っかかる。carve out 例外がない限り、新しい tx を追加することはできない