@@ -4,6 +4,7 @@ package gitopia.gitopia.storage;
44import "gogoproto/gogo.proto" ;
55import "cosmos/base/v1beta1/coin.proto" ;
66import "google/protobuf/duration.proto" ;
7+ import "amino/amino.proto" ;
78
89option go_package = "github.com/gitopia/gitopia/v6/x/storage/types" ;
910
@@ -13,18 +14,48 @@ message Params {
1314
1415 uint64 min_stake_amount = 1 [(gogoproto.moretags ) = "yaml:\"min_stake_amount\"" ];
1516 uint64 challenge_interval_blocks = 2 [(gogoproto.moretags ) = "yaml:\"challenge_interval_blocks\"" ];
16- google.protobuf.Duration challenge_period = 3 [(gogoproto.stdduration ) = true , (gogoproto.moretags ) = "yaml:\"challenge_period\"" ];
17+ google.protobuf.Duration challenge_period = 3 [(gogoproto.nullable ) = false , (gogoproto . stdduration ) = true , (gogoproto.moretags ) = "yaml:\"challenge_period\"" ];
1718 cosmos.base.v1beta1.Coin reward_per_day = 4 [(gogoproto.nullable ) = false , (gogoproto.moretags ) = "yaml:\"reward_per_day\"" ];
18- cosmos.base.v1beta1.Coin challenge_slash_amount = 5 [(gogoproto.nullable ) = false , (gogoproto.moretags ) = "yaml:\"challenge_slash_amount\"" ];
19- uint64 consecutive_fails_threshold = 6 [(gogoproto.moretags ) = "yaml:\"consecutive_fails_threshold\"" ];
20- uint64 consecutive_fails_slash_percentage = 7 [(gogoproto.moretags ) = "yaml:\"consecutive_fails_slash_percentage\"" ];
21- uint64 unstake_cooldown_blocks = 8 [(gogoproto.moretags ) = "yaml:\"unstake_cooldown_blocks\"" ];
19+ uint64 unstake_cooldown_blocks = 5 [(gogoproto.moretags ) = "yaml:\"unstake_cooldown_blocks\"" ];
2220
23- // cost per MB of storage
24- cosmos.base.v1beta1.Coin storage_price_per_mb = 9 [(gogoproto.nullable ) = false ];
21+ // cost per GB of storage
22+ cosmos.base.v1beta1.Coin storage_price_per_gb = 6 [(gogoproto.nullable ) = false ];
2523 // free storage in MB
26- uint64 free_storage_mb = 10 [(gogoproto.moretags ) = "yaml:\"free_storage_mb\"" ];
24+ uint64 free_storage_mb = 7 [(gogoproto.moretags ) = "yaml:\"free_storage_mb\"" ];
2725
2826 // max providers
29- uint64 max_providers = 11 [(gogoproto.moretags ) = "yaml:\"max_providers\"" ];
27+ uint64 max_providers = 8 [(gogoproto.moretags ) = "yaml:\"max_providers\"" ];
28+
29+ // Liveness tracking parameters
30+ // Number of challenges to track for liveness calculation (sliding window)
31+ uint64 liveness_window_challenges = 9 [(gogoproto.moretags ) = "yaml:\"liveness_window_challenges\"" ];
32+ // Minimum liveness ratio required (e.g., 67 = 67%)
33+ bytes min_liveness_per_window = 10 [
34+ (gogoproto.customtype ) = "github.com/cosmos/cosmos-sdk/types.Dec" ,
35+ (gogoproto.nullable ) = false ,
36+ (amino.dont_omitempty ) = true
37+ ];
38+
39+ // Liveness fault slashing parameters (less severe)
40+ cosmos.base.v1beta1.Coin liveness_slash_amount = 11 [(gogoproto.nullable ) = false , (gogoproto.moretags ) = "yaml:\"liveness_slash_amount\"" ];
41+ bytes liveness_slash_fraction = 12 [
42+ (gogoproto.customtype ) = "github.com/cosmos/cosmos-sdk/types.Dec" ,
43+ (gogoproto.nullable ) = false ,
44+ (amino.dont_omitempty ) = true ,
45+ (gogoproto.moretags ) = "yaml:\"liveness_slash_fraction\""
46+ ];
47+ google.protobuf.Duration liveness_jail_time = 13 [(gogoproto.nullable ) = false , (gogoproto.stdduration ) = true , (gogoproto.moretags ) = "yaml:\"liveness_jail_time\"" ];
48+
49+ // Proof fault slashing parameters (more severe for assigned provider)
50+ cosmos.base.v1beta1.Coin proof_fault_slash_amount = 14 [(gogoproto.nullable ) = false , (gogoproto.moretags ) = "yaml:\"proof_fault_slash_amount\"" ];
51+ bytes proof_fault_slash_fraction = 15 [
52+ (gogoproto.customtype ) = "github.com/cosmos/cosmos-sdk/types.Dec" ,
53+ (gogoproto.nullable ) = false ,
54+ (amino.dont_omitempty ) = true ,
55+ (gogoproto.moretags ) = "yaml:\"proof_fault_slash_fraction\""
56+ ];
57+ google.protobuf.Duration proof_fault_jail_time = 16 [(gogoproto.nullable ) = false , (gogoproto.stdduration ) = true , (gogoproto.moretags ) = "yaml:\"proof_fault_jail_time\"" ];
58+
59+ // Maximum number of consecutive proof faults before suspension
60+ uint64 max_proof_faults = 17 [(gogoproto.moretags ) = "yaml:\"max_proof_faults\"" ];
3061}
0 commit comments