polkascan / polkascan-pre-harvester

Polkascan PRE Harvester
GNU General Public License v3.0
26 stars 34 forks source link

how to find slash events after block 796425 in kusama #6

Closed alexxuyang closed 4 years ago

alexxuyang commented 4 years ago

seems there isn't any slash events data after block 796425? what is wrong? https://polkascan.io/pre/kusama/event?module=staking&event=Slash&page=1

arjanz commented 4 years ago

It seems like offences are still registered (https://polkascan.io/pre/kusama/event?module=imonline&event=SomeOffline&page=1) but do not result in Slashes. Or do you have reason to believe slash events still occurred? If so, could you provide an example block number?

alexxuyang commented 4 years ago

You are right. Although there have some offline events, the slash fraction will be set to ZERO if the number of offenders is below 10% of total.

https://github.com/paritytech/substrate/blob/af012ea8b12def734cca7ffd2540c6882ecdcbba/frame/im-online/src/lib.rs#L709

https://github.com/paritytech/substrate/blob/af012ea8b12def734cca7ffd2540c6882ecdcbba/frame/staking/src/slashing.rs#L234

https://github.com/paritytech/substrate/blob/af012ea8b12def734cca7ffd2540c6882ecdcbba/frame/staking/src/lib.rs#L2161

https://github.com/paritytech/substrate/blob/af012ea8b12def734cca7ffd2540c6882ecdcbba/frame/staking/src/slashing.rs#L587