cosmos / cosmos-sdk

:chains: A Framework for Building High Value Public Blockchains :sparkles:
https://cosmos.network/
Apache License 2.0
6.31k stars 3.65k forks source link

Rename distribution to "incentivization", slashing to "disincentivization" #3222

Closed cwgoes closed 5 years ago

cwgoes commented 5 years ago

@sunnya97 made the point that much of the code in x/slashing is not - directly - about slashing: liveness tracking logic, MsgUnjail, and the slashing period (although related) are more broadly intended instantiations of disincentives for particular actions which we think the network ought to discourage.

Likewise, although fee distribution does indeed distribute fees, the mechanisms of distribution serve the goal (hopefully) of positively incentivizing validators (with more stake) to participate in consensus, include other validators' votes, etc.

I propose we rename x/distribution to x/incentivization and x/slashing to x/disincentivization accordingly. Slashing could also be split into submodules for evidence handling, unjailing, liveness tracking for clarity.

This isn't that high priority, but it will be somewhat more difficult to rename the modules later.

rigelrozanski commented 5 years ago

slack message

I actually think that we should keep distribution named as is, as there is also a second piece of the carrot - minting. Minting is also a part of incentivization. I reckon only slashing should be renamed to something new, until a future date when it is split up into even more modules

alexanderbez commented 5 years ago

I propose we rename x/distribution to x/incentivization and x/slashing to x/disincentivization accordingly.

I think this might confuse a bunch of users of the SDK tbh. I already find it somewhat..."vague".

Slashing could also be split into submodules for evidence handling, unjailing, liveness tracking for clarity.

I think this is a grand idea and will be helpful for modularity and conciseness.

ValarDragon commented 5 years ago

I think small, well focused modules are the ideal that should be approximated. I'd actually prefer if we further scoped distribution to include the name of the algorithm. Similarly I think slashing can be broken off into one library and one module. The library would be "frequency tracking", and one such use of it would be liveness tracking. The other module would be "jailing". I think we can also have another module for liveness_slashing that uses the frequency tracking metric, and hooks into staking.

fedekunze commented 5 years ago

what about x/incentives and x/punishments ?

cwgoes commented 5 years ago

Great discussion - given the lack of consensus, I think we'll leave the module names as-is for now.