hyperledger / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
433 stars 277 forks source link

Investigate how Iroha operates under load under Ubuntu/Debian #4830

Closed dima74 closed 1 month ago

dima74 commented 1 month ago

It was reported that:

Need to investigate it


Notes about kura.lock:

dima74 commented 1 month ago

kura.lock problem should be fixed by https://github.com/soramitsu/iroha-deploy/pull/166

Update: it fixes only problem with genesis peer restart, but still have problem that if iroha is shutdown non-gracefully (e.g. because of OOM), then after restart iroha fails to start

dima74 commented 1 month ago

Reproduced the problem, here are some results

mversic commented 1 month ago

Iroha can be easily DDOSed by requesting only first batch of heavy query. This might be a security problem

this is not acceptable. We should at least have some limit to the number of live queries to prevent OOM

mversic commented 1 month ago

Queue already has some form of DDOS implemented. There is global limit and per user limit on the number of transactions that can be in the queue. We should at least do something like that

DCNick3 commented 1 month ago

Pruning can also lead to DDoS, because non-malicious actors wouldn't be able to complete their queries as the store is being constantly thrashed. Maybe use the fact that queries are signed and add a per-AccountId limit?

UPD: I see that you are proposing a per-used limit too. Sorry, didn't notice that; a global + a per-used limit would be good