@@ -30,6 +30,8 @@ service Msg {
3030 returns (MsgConsumerAdditionResponse );
3131 rpc ConsumerRemoval (MsgConsumerRemoval ) returns (MsgConsumerRemovalResponse );
3232 rpc UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse );
33+ rpc OptIn (MsgOptIn ) returns (MsgOptInResponse );
34+ rpc OptOut (MsgOptOut ) returns (MsgOptOutResponse );
3335 rpc ConsumerModification (MsgConsumerModification )
3436 returns (MsgConsumerModificationResponse );
3537}
@@ -161,8 +163,34 @@ message MsgConsumerAddition {
161163 // chain. it is most relevant for chains performing a sovereign to consumer
162164 // changeover in order to maintan the existing ibc transfer channel
163165 string distribution_transmission_channel = 12 ;
166+ // Corresponds to the percentage of validators that have to validate the chain
167+ // under the Top N case. For example, 53 corresponds to a Top 53% chain,
168+ // meaning that the top 53% provider validators by voting power have to
169+ // validate the proposed consumer chain. top_N can either be 0 or any value in
170+ // [50, 100]. A chain can join with top_N == 0 as an Opt In chain, or with
171+ // top_N ∈ [50, 100] as a Top N chain.
172+ uint32 top_N = 13 ;
173+ // Corresponds to the maximum power (percentage-wise) a validator can have on
174+ // the consumer chain. For instance, if `validators_power_cap` is set to 32,
175+ // it means that no validator can have more than 32% of the voting power on
176+ // the consumer chain. Note that this might not be feasible. For example,
177+ // think of a consumer chain with only 5 validators and with
178+ // `validators_power_cap` set to 10%. In such a scenario, at least one
179+ // validator would need to have more than 20% of the total voting power.
180+ // Therefore, `validators_power_cap` operates on a best-effort basis.
181+ uint32 validators_power_cap = 14 ;
182+ // Corresponds to the maximum number of validators that can validate a
183+ // consumer chain. Only applicable to Opt In chains. Setting
184+ // `validator_set_cap` on a Top N chain is a no-op.
185+ uint32 validator_set_cap = 15 ;
186+ // Corresponds to a list of provider consensus addresses of validators that
187+ // are the ONLY ones that can validate the consumer chain.
188+ repeated string allowlist = 16 ;
189+ // Corresponds to a list of provider consensus addresses of validators that
190+ // CANNOT validate the consumer chain.
191+ repeated string denylist = 17 ;
164192 // signer address
165- string authority = 13 [ (cosmos_proto.scalar ) = "cosmos.AddressString" ];
193+ string authority = 18 [ (cosmos_proto.scalar ) = "cosmos.AddressString" ];
166194}
167195
168196// MsgConsumerAdditionResponse defines response type for MsgConsumerAddition
@@ -213,6 +241,42 @@ message MsgChangeRewardDenoms {
213241// messages
214242message MsgChangeRewardDenomsResponse {}
215243
244+ message MsgOptIn {
245+ option (gogoproto.equal ) = false ;
246+ option (gogoproto.goproto_getters ) = false ;
247+ option (cosmos.msg.v1.signer ) = "signer" ;
248+ // the chain id of the consumer chain to opt in to
249+ string chain_id = 1 ;
250+ // the validator address on the provider
251+ string provider_addr = 2 [ (gogoproto.moretags ) = "yaml:\"address\"" ];
252+ // (optional) The consensus public key to use on the consumer in json string
253+ // format corresponding to proto-any, for example
254+ // `{"@type":"/cosmos.crypto.ed25519.PubKey","key":"Ui5Gf1+mtWUdH8u3xlmzdKID+F3PK0sfXZ73GZ6q6is="}`.
255+ // This field is optional and can remain empty (i.e., `consumer_key = ""`). A
256+ // validator can always change the consumer public key at a later stage by
257+ // issuing a `MsgAssignConsumerKey` message.
258+ string consumer_key = 3 ;
259+ // signer address
260+ string signer = 4 [ (cosmos_proto.scalar ) = "cosmos.AddressString" ];
261+ }
262+
263+ message MsgOptInResponse {}
264+
265+ message MsgOptOut {
266+ option (gogoproto.equal ) = false ;
267+ option (gogoproto.goproto_getters ) = false ;
268+ option (cosmos.msg.v1.signer ) = "signer" ;
269+ // the chain id of the consumer chain to opt out from
270+ string chain_id = 1 ;
271+ // the validator address on the provider
272+ string provider_addr = 2 [ (gogoproto.moretags ) = "yaml:\"address\"" ];
273+ // signer address
274+ string signer = 3 [ (cosmos_proto.scalar ) = "cosmos.AddressString" ];
275+
276+ }
277+
278+ message MsgOptOutResponse {}
279+
216280// MsgConsumerModification message contains a governance proposal on the
217281// provider chain to modify a running consumer chain. If it passes, the consumer
218282// chain's parameters are updated.
@@ -228,8 +292,34 @@ message MsgConsumerModification {
228292 string description = 2 ;
229293 // the chain-id of the consumer chain to be modified
230294 string chain_id = 3 ;
295+ // Corresponds to the percentage of validators that have to validate the chain
296+ // under the Top N case. For example, 53 corresponds to a Top 53% chain,
297+ // meaning that the top 53% provider validators by voting power have to
298+ // validate the proposed consumer chain. top_N can either be 0 or any value in
299+ // [50, 100]. A chain can join with top_N == 0 as an Opt In chain, or with
300+ // top_N ∈ [50, 100] as a Top N chain.
301+ uint32 top_N = 4 ;
302+ // Corresponds to the maximum power (percentage-wise) a validator can have on
303+ // the consumer chain. For instance, if `validators_power_cap` is set to 32,
304+ // it means that no validator can have more than 32% of the voting power on
305+ // the consumer chain. Note that this might not be feasible. For example,
306+ // think of a consumer chain with only 5 validators and with
307+ // `validators_power_cap` set to 10%. In such a scenario, at least one
308+ // validator would need to have more than 20% of the total voting power.
309+ // Therefore, `validators_power_cap` operates on a best-effort basis.
310+ uint32 validators_power_cap = 5 ;
311+ // Corresponds to the maximum number of validators that can validate a
312+ // consumer chain. Only applicable to Opt In chains. Setting
313+ // `validator_set_cap` on a Top N chain is a no-op.
314+ uint32 validator_set_cap = 6 ;
315+ // Corresponds to a list of provider consensus addresses of validators that
316+ // are the ONLY ones that can validate the consumer chain.
317+ repeated string allowlist = 7 ;
318+ // Corresponds to a list of provider consensus addresses of validators that
319+ // CANNOT validate the consumer chain.
320+ repeated string denylist = 8 ;
231321 // signer address
232- string authority = 4 [ (cosmos_proto.scalar ) = "cosmos.AddressString" ];
322+ string authority = 9 [ (cosmos_proto.scalar ) = "cosmos.AddressString" ];
233323}
234324
235325message MsgConsumerModificationResponse {}
0 commit comments