создай тему на редите, там девы ошиваются
Создал пока в англоязычной ветке:
https://bitcointalk.org/index.php?topic=1851018.0Не знаю, бывают ли там девы, но кое-что обсудить удалось. В частности achow101 и Quickseller предложили некоторые варианты атаки на мемпул:
How do you prevent someone from making a ton of super low fee transactions just to spam up mempools and take up more memory, at some point causing nodes to crash? If you require every single transaction to be kept, then you open up an entirely new attack vector.
First of all, nodes aren't required to keep full transactions (TxID will be enough). Also we don't need to keep them forever. I propose that nodes can forget about transactions received over an hour ago. Miners should be careful to include these transactions in block.
Then you run into other issues like people paying too low of a transaction fee and thus getting their transaction evicted after the hour is up.
It's not a problem. Miners could keep and rebroadcast these transactions shortly before including them into the block.
What if I just restarted my node (so it's mempool is now empty) and then I receive a block? Do I reject it?
The chain becomes valid anyway, when it receives two or three valid blocks. Also we can simply bypass this rule for some time after the launch. Also we can add a new type of message for the purpose of mempool synchronization between the nodes.
Another problem is that if someone broadcasts a transaction that gets to miner "A" located in China, and a conflicting transaction that gets to miner "B" located in New York, US, then exactly one of those transactions will get rejected by nodes
I propose to reject all transactions that conflicting any other transaction in node's mempool. But we have to keep original transaction and reset time when it was received. So it cannot be included into the block another 15 seconds. In addition we need to keep the transaction's size and update it every time when we are rejecting a conflicting transaction that larger then all previous such transactions.
For example. If node receives a transaction "A" which size is 400 bytes, it should keep this transaction and two additional values: { tx_A, 400, time }. If then after 10 seconds it receives a conflicting transaction "B" which size is 500 bytes, it should update these values as follows: { tx_A, 500, time+10 }. If it receives another conflicting transaction "C" after another 5 seconds which size is 550 bytes, it should update the values: { tx_A, 550, time+15 }.
When node is validating the block and found some transaction that conflicts with a transaction in it's mempool, it should check that size of this transaction is not more then stored size. If it is so, the transaction shouldn't be considered as spam. Thus miners cannot include their own transactions into the block for free and cannot spam nodes' mempools with conflicting transactions.
Думаю, последний ответ нужно немного скорректировать. Нам необходимо сохранять время оригинальной транзакции, то есть {original_tx, max_size, original_time, delta_time}. И если delta_time превышает 20 секунд, то можно просто отбрасывать эти конфликтующие транзакции.
В общем, похоже, все проблемы решаемые. От оппонентов больше аргументов не последовало.
Насчет реддита. Честно говоря, мне сложно это излагать на английском. Если есть желающие переводить, или участвовать в обсуждении, то можно форсировать процесс.