From 1a5c57b13d6db9c8c3d6ea8fe3ca435dab95a491 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 12 Sep 2025 20:21:36 +0200 Subject: [PATCH] refactor(simulation): adjust unjail operation weight and clarify skip reason (#25294) Co-authored-by: Alex | Interchain Labs --- x/slashing/simulation/operations.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/x/slashing/simulation/operations.go b/x/slashing/simulation/operations.go index e2d6383cec..defcdf6245 100644 --- a/x/slashing/simulation/operations.go +++ b/x/slashing/simulation/operations.go @@ -22,7 +22,7 @@ import ( const ( OpWeightMsgUnjail = "op_weight_msg_unjail" - DefaultWeightMsgUnjail = 100 + DefaultWeightMsgUnjail = 5 // Reduced from 100 since validators are rarely jailed in simulations ) // WeightedOperations returns all the operations from the module with their respective weights @@ -87,7 +87,8 @@ func SimulateMsgUnjail( } if !validator.IsJailed() { - // TODO: due to this condition this message is almost, if not always, skipped ! + // This operation is often skipped because validators are rarely jailed in simulations. + // The weight has been reduced to 5 to reflect this reality. return simtypes.NoOpMsg(types.ModuleName, msgType, "validator is not jailed"), nil, nil }