Skip to content

Commit

Permalink
Replace hardcoded constants with params (cosmos#393)
Browse files Browse the repository at this point in the history
* changes

* edits

* Update params_test.go

* small

* Update genesis_test.go

* remove "num" from historical entries param

* comment

* use params p1

* use params p2

* use params p3

* p4

* change default transfer timeout period

* Update proposal_test.go

* default historical entries

* is negative

* add test case

* forgot one

* comment
  • Loading branch information
shaspitz authored Oct 20, 2022
1 parent a8d1ee8 commit d7bfd3a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 15 additions & 1 deletion proto/interchain_security/ccv/consumer/v1/consumer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,23 @@ message Params {
// provider handshake procedure.
string distribution_transmission_channel = 3;
string provider_fee_pool_addr_str = 4;
// Sent IBC packets will timeout after this duration
// Sent CCV related IBC packets will timeout after this duration
google.protobuf.Duration ccv_timeout_period = 5
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];

// Sent transfer related IBC packets will timeout after this duration
google.protobuf.Duration transfer_timeout_period = 6
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];

// The fraction of tokens allocated to the consumer redistribution address
// during distribution events. The fraction is a string representing a
// decimal number. For example "0.75" would represent 75%.
string consumer_redistribution_fraction = 7;

// The number of historical info entries to persist in store.
// This param is a part of the cosmos sdk staking module. In the case of
// a ccv enabled consumer chain, the ccv module acts as the staking module.
int64 historical_entries = 8;
}

// LastTransmissionBlockHeight is the last time validator holding
Expand Down
2 changes: 2 additions & 0 deletions proto/interchain_security/ccv/provider/v1/provider.proto
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ message Params {
// Sent IBC packets will timeout after this duration
google.protobuf.Duration ccv_timeout_period = 2
[(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
// TrustingPeriodFraction is used to compute the consumer and provider IBC client's TrustingPeriod
int64 trusting_period_fraction = 3;
}

message HandshakeMetadata {
Expand Down

0 comments on commit d7bfd3a

Please sign in to comment.