AleoNet / snarkOS

A Decentralized Operating System for ZK Applications
http://snarkos.org
Apache License 2.0
4.07k stars 2.57k forks source link

Do not log for actions against validators or delegators that are not active. #3317

Open kyle-u410 opened 3 weeks ago

kyle-u410 commented 3 weeks ago

🐛 Bug Report

Currently any validator that is not active will have errors logged by all clients in the network for any delegation against that validator. This should not even be a DEBUG log I suspect. Maybe TRACE level.

Example log:

ERROR snarkvm_synthesizer::vm::helpers::rewards: Validator aleo1ca09uscr33gahs7r265lfcnqrr7hcwm0r5d5w98r4xjqr8m3avpqgyg3xh is not in the committee - skipping aleo1q9hx0rrry50060uzqw6g26rrnuv3g9h28ru5xe8hey9vv5z4p5zsf7ls2d

Steps to Reproduce

Delegate to unbonded validator.

Expected Behavior

No logs.

Your Environment

zosorock commented 3 weeks ago

Thank you, @kyle-u410. I have concerns that, even without logging, this is an attack vector, because it will cause load in all clients and validators.

kyle-u410 commented 3 weeks ago

That concern is mitigated somewhat by the minimum delegation amount. We should make sure there is minimal time spent on this case, in the same way the positive rewards adjustment case is made fast.