Open lukelee-sl opened 3 months ago
An enum would not work because the throttles are dynamically defined in a config file.
I am also not sure if we really want to provide this data, as it is very useful information for an attacker.
I am also not sure if we really want to provide this data, as it is very useful information for an attacker.
It would be easy for someone today to figure out which transaction type met its throttle by trying to send one of each transaction type and seeing which one returns BUSY
? We do also post the throttle limits for each transaction publicly. It would be nice in general to provide a more precise/informative status message so the developer understands how to react to it. You can search "Busy" in Discord and see that it is not intuitive to new developers what to make of it.
Problem
Currently, when a throttle was been exceeded, the node returns a
BUSY
message. The message can be made more useful if the returned message was more specific on which throttle was breached.Solution
Instead of returning a boolean value that indicates whether a throttle has been exceeded, return an enum to indicate which throttle was breached. This way a more informative status message can be returned to the caller.
Alternatives
No response