diff --git a/api/opinit/ophost/v1/tx.pulsar.go b/api/opinit/ophost/v1/tx.pulsar.go index a218e5f1..722fcc97 100644 --- a/api/opinit/ophost/v1/tx.pulsar.go +++ b/api/opinit/ophost/v1/tx.pulsar.go @@ -7184,11 +7184,57 @@ func (x *fastReflection_MsgUpdateProposerResponse) ProtoMethods() *protoiface.Me } } +var _ protoreflect.List = (*_MsgUpdateChallenger_3_list)(nil) + +type _MsgUpdateChallenger_3_list struct { + list *[]string +} + +func (x *_MsgUpdateChallenger_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgUpdateChallenger_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_MsgUpdateChallenger_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgUpdateChallenger_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgUpdateChallenger_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgUpdateChallenger at list field NewChallengers as it is not of Message kind")) +} + +func (x *_MsgUpdateChallenger_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgUpdateChallenger_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgUpdateChallenger_3_list) IsValid() bool { + return x.list != nil +} + var ( - md_MsgUpdateChallenger protoreflect.MessageDescriptor - fd_MsgUpdateChallenger_authority protoreflect.FieldDescriptor - fd_MsgUpdateChallenger_bridge_id protoreflect.FieldDescriptor - fd_MsgUpdateChallenger_new_challenger protoreflect.FieldDescriptor + md_MsgUpdateChallenger protoreflect.MessageDescriptor + fd_MsgUpdateChallenger_authority protoreflect.FieldDescriptor + fd_MsgUpdateChallenger_bridge_id protoreflect.FieldDescriptor + fd_MsgUpdateChallenger_new_challengers protoreflect.FieldDescriptor ) func init() { @@ -7196,7 +7242,7 @@ func init() { md_MsgUpdateChallenger = File_opinit_ophost_v1_tx_proto.Messages().ByName("MsgUpdateChallenger") fd_MsgUpdateChallenger_authority = md_MsgUpdateChallenger.Fields().ByName("authority") fd_MsgUpdateChallenger_bridge_id = md_MsgUpdateChallenger.Fields().ByName("bridge_id") - fd_MsgUpdateChallenger_new_challenger = md_MsgUpdateChallenger.Fields().ByName("new_challenger") + fd_MsgUpdateChallenger_new_challengers = md_MsgUpdateChallenger.Fields().ByName("new_challengers") } var _ protoreflect.Message = (*fastReflection_MsgUpdateChallenger)(nil) @@ -7276,9 +7322,9 @@ func (x *fastReflection_MsgUpdateChallenger) Range(f func(protoreflect.FieldDesc return } } - if x.NewChallenger != "" { - value := protoreflect.ValueOfString(x.NewChallenger) - if !f(fd_MsgUpdateChallenger_new_challenger, value) { + if len(x.NewChallengers) != 0 { + value := protoreflect.ValueOfList(&_MsgUpdateChallenger_3_list{list: &x.NewChallengers}) + if !f(fd_MsgUpdateChallenger_new_challengers, value) { return } } @@ -7301,8 +7347,8 @@ func (x *fastReflection_MsgUpdateChallenger) Has(fd protoreflect.FieldDescriptor return x.Authority != "" case "opinit.ophost.v1.MsgUpdateChallenger.bridge_id": return x.BridgeId != uint64(0) - case "opinit.ophost.v1.MsgUpdateChallenger.new_challenger": - return x.NewChallenger != "" + case "opinit.ophost.v1.MsgUpdateChallenger.new_challengers": + return len(x.NewChallengers) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.ophost.v1.MsgUpdateChallenger")) @@ -7323,8 +7369,8 @@ func (x *fastReflection_MsgUpdateChallenger) Clear(fd protoreflect.FieldDescript x.Authority = "" case "opinit.ophost.v1.MsgUpdateChallenger.bridge_id": x.BridgeId = uint64(0) - case "opinit.ophost.v1.MsgUpdateChallenger.new_challenger": - x.NewChallenger = "" + case "opinit.ophost.v1.MsgUpdateChallenger.new_challengers": + x.NewChallengers = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.ophost.v1.MsgUpdateChallenger")) @@ -7347,9 +7393,12 @@ func (x *fastReflection_MsgUpdateChallenger) Get(descriptor protoreflect.FieldDe case "opinit.ophost.v1.MsgUpdateChallenger.bridge_id": value := x.BridgeId return protoreflect.ValueOfUint64(value) - case "opinit.ophost.v1.MsgUpdateChallenger.new_challenger": - value := x.NewChallenger - return protoreflect.ValueOfString(value) + case "opinit.ophost.v1.MsgUpdateChallenger.new_challengers": + if len(x.NewChallengers) == 0 { + return protoreflect.ValueOfList(&_MsgUpdateChallenger_3_list{}) + } + listValue := &_MsgUpdateChallenger_3_list{list: &x.NewChallengers} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.ophost.v1.MsgUpdateChallenger")) @@ -7374,8 +7423,10 @@ func (x *fastReflection_MsgUpdateChallenger) Set(fd protoreflect.FieldDescriptor x.Authority = value.Interface().(string) case "opinit.ophost.v1.MsgUpdateChallenger.bridge_id": x.BridgeId = value.Uint() - case "opinit.ophost.v1.MsgUpdateChallenger.new_challenger": - x.NewChallenger = value.Interface().(string) + case "opinit.ophost.v1.MsgUpdateChallenger.new_challengers": + lv := value.List() + clv := lv.(*_MsgUpdateChallenger_3_list) + x.NewChallengers = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.ophost.v1.MsgUpdateChallenger")) @@ -7396,12 +7447,16 @@ func (x *fastReflection_MsgUpdateChallenger) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgUpdateChallenger) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "opinit.ophost.v1.MsgUpdateChallenger.new_challengers": + if x.NewChallengers == nil { + x.NewChallengers = []string{} + } + value := &_MsgUpdateChallenger_3_list{list: &x.NewChallengers} + return protoreflect.ValueOfList(value) case "opinit.ophost.v1.MsgUpdateChallenger.authority": panic(fmt.Errorf("field authority of message opinit.ophost.v1.MsgUpdateChallenger is not mutable")) case "opinit.ophost.v1.MsgUpdateChallenger.bridge_id": panic(fmt.Errorf("field bridge_id of message opinit.ophost.v1.MsgUpdateChallenger is not mutable")) - case "opinit.ophost.v1.MsgUpdateChallenger.new_challenger": - panic(fmt.Errorf("field new_challenger of message opinit.ophost.v1.MsgUpdateChallenger is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.ophost.v1.MsgUpdateChallenger")) @@ -7419,8 +7474,9 @@ func (x *fastReflection_MsgUpdateChallenger) NewField(fd protoreflect.FieldDescr return protoreflect.ValueOfString("") case "opinit.ophost.v1.MsgUpdateChallenger.bridge_id": return protoreflect.ValueOfUint64(uint64(0)) - case "opinit.ophost.v1.MsgUpdateChallenger.new_challenger": - return protoreflect.ValueOfString("") + case "opinit.ophost.v1.MsgUpdateChallenger.new_challengers": + list := []string{} + return protoreflect.ValueOfList(&_MsgUpdateChallenger_3_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: opinit.ophost.v1.MsgUpdateChallenger")) @@ -7497,9 +7553,11 @@ func (x *fastReflection_MsgUpdateChallenger) ProtoMethods() *protoiface.Methods if x.BridgeId != 0 { n += 1 + runtime.Sov(uint64(x.BridgeId)) } - l = len(x.NewChallenger) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.NewChallengers) > 0 { + for _, s := range x.NewChallengers { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -7530,12 +7588,14 @@ func (x *fastReflection_MsgUpdateChallenger) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.NewChallenger) > 0 { - i -= len(x.NewChallenger) - copy(dAtA[i:], x.NewChallenger) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewChallenger))) - i-- - dAtA[i] = 0x1a + if len(x.NewChallengers) > 0 { + for iNdEx := len(x.NewChallengers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.NewChallengers[iNdEx]) + copy(dAtA[i:], x.NewChallengers[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NewChallengers[iNdEx]))) + i-- + dAtA[i] = 0x1a + } } if x.BridgeId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.BridgeId)) @@ -7651,7 +7711,7 @@ func (x *fastReflection_MsgUpdateChallenger) ProtoMethods() *protoiface.Methods } case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewChallenger", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NewChallengers", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -7679,7 +7739,7 @@ func (x *fastReflection_MsgUpdateChallenger) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.NewChallenger = string(dAtA[iNdEx:postIndex]) + x.NewChallengers = append(x.NewChallengers, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -11713,10 +11773,11 @@ type MsgUpdateChallenger struct { unknownFields protoimpl.UnknownFields // authority is the address that controls the module (defaults to x/gov unless overwritten) - // or the current challenger address. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - BridgeId uint64 `protobuf:"varint,2,opt,name=bridge_id,json=bridgeId,proto3" json:"bridge_id,omitempty"` - NewChallenger string `protobuf:"bytes,3,opt,name=new_challenger,json=newChallenger,proto3" json:"new_challenger,omitempty"` + // or the current challenger address.(supports a single challenger that can replace the existing challenger, + // excluding their own address) + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + BridgeId uint64 `protobuf:"varint,2,opt,name=bridge_id,json=bridgeId,proto3" json:"bridge_id,omitempty"` + NewChallengers []string `protobuf:"bytes,3,rep,name=new_challengers,json=newChallengers,proto3" json:"new_challengers,omitempty"` } func (x *MsgUpdateChallenger) Reset() { @@ -11753,11 +11814,11 @@ func (x *MsgUpdateChallenger) GetBridgeId() uint64 { return 0 } -func (x *MsgUpdateChallenger) GetNewChallenger() string { +func (x *MsgUpdateChallenger) GetNewChallengers() []string { if x != nil { - return x.NewChallenger + return x.NewChallengers } - return "" + return nil } // MsgUpdateChallengerResponse returns a message handle result. @@ -11913,7 +11974,8 @@ type MsgUpdateMetadata struct { unknownFields protoimpl.UnknownFields // authority is the address that controls the module (defaults to x/gov unless overwritten) - // or the current challenger address. + // or the current challenger address.(supports a single challenger that can replace the existing challenger, + // excluding their own address)) Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` BridgeId uint64 `protobuf:"varint,2,opt,name=bridge_id,json=bridgeId,proto3" json:"bridge_id,omitempty"` Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` @@ -12198,7 +12260,7 @@ var file_opinit_ophost_v1_tx_proto_rawDesc = []byte{ 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x73, 0x65, 0x71, 0x75, - 0x65, 0x6e, 0x63, 0x65, 0x22, 0xec, 0x05, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, + 0x65, 0x6e, 0x63, 0x65, 0x22, 0xee, 0x05, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x31, 0x0a, 0x09, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, @@ -12242,206 +12304,206 @@ var file_opinit_ophost_v1_tx_proto_rawDesc = []byte{ 0x0c, 0x42, 0x1c, 0xf2, 0xde, 0x1f, 0x18, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x22, 0x52, 0x0f, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, - 0x3a, 0x31, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, - 0x2a, 0x21, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, + 0x3a, 0x33, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x8a, + 0xe7, 0xb0, 0x2a, 0x21, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x46, 0x69, + 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x61, 0x6c, 0x22, 0x24, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x61, 0x6c, 0x22, 0x24, 0x0a, 0x22, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, - 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x93, 0x02, 0x0a, 0x11, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, - 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x09, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, - 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x5f, 0x69, 0x64, 0x22, 0x52, 0x08, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, 0x52, - 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, - 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x22, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x3a, 0x2b, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x22, - 0x66, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, - 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x9d, 0x02, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x12, - 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x09, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, - 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, - 0x5f, 0x69, 0x64, 0x22, 0x52, 0x08, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, 0x58, - 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, - 0x3a, 0x22, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, - 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x6e, 0x65, 0x77, 0x43, 0x68, - 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x3a, 0x2d, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x6f, 0x70, 0x68, - 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, - 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x22, 0x68, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6f, 0x75, - 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x22, 0xa8, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, - 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x09, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, - 0x6c, 0x3a, 0x22, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x52, 0x08, 0x62, - 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, 0x65, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x62, - 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x22, 0xc8, 0xde, - 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x77, 0x5f, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x3a, 0x2c, - 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, - 0xb0, 0x2a, 0x19, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x67, 0x0a, 0x1a, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, + 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x93, 0x02, 0x0a, 0x11, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, + 0x09, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x52, 0x08, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, + 0x12, 0x52, 0x0a, 0x0c, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, + 0x3a, 0x22, 0x6e, 0x65, 0x77, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x22, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x70, + 0x6f, 0x73, 0x65, 0x72, 0x3a, 0x2b, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x22, 0x66, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xa0, 0x02, 0x0a, 0x13, 0x4d, 0x73, + 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, + 0x72, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, + 0x09, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x72, 0x69, 0x64, + 0x67, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x52, 0x08, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, + 0x12, 0x5b, 0x0a, 0x0f, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, + 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x32, 0xf2, 0xde, 0x1f, 0x16, 0x79, + 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x77, 0x5f, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, + 0x67, 0x65, 0x72, 0x73, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x6e, + 0x65, 0x77, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x3a, 0x2d, 0x82, + 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, + 0x2a, 0x1a, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x22, 0x68, 0x0a, 0x1b, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, + 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, + 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xa8, 0x02, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4a, 0x0a, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x09, 0x62, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xf2, 0xde, + 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, + 0x64, 0x22, 0x52, 0x08, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, 0x65, 0x0a, 0x0e, + 0x6e, 0x65, 0x77, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, + 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, + 0x6f, 0x42, 0x22, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x15, 0x79, 0x61, 0x6d, 0x6c, 0x3a, + 0x22, 0x6e, 0x65, 0x77, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x22, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, + 0x6e, 0x66, 0x6f, 0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x67, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf0, 0x01, 0x0a, 0x11, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x09, + 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, + 0x14, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x72, 0x69, 0x64, 0x67, + 0x65, 0x5f, 0x69, 0x64, 0x22, 0x52, 0x08, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, + 0x2f, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x42, 0x13, 0xf2, 0xde, 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x3a, 0x2b, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x66, 0x0a, + 0x19, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xf0, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4a, 0x0a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, - 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x31, 0x0a, 0x09, 0x62, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xf2, 0xde, 0x1f, 0x10, - 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x22, - 0x52, 0x08, 0x62, 0x72, 0x69, 0x64, 0x67, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x13, 0xf2, 0xde, - 0x1f, 0x0f, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x22, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x2b, 0x82, 0xe7, 0xb0, - 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, - 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x66, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, - 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x6c, 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x22, 0xcd, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, 0x1f, 0x10, 0x79, 0x61, 0x6d, - 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x11, 0xf2, 0xde, 0x1f, 0x0d, - 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, - 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf0, 0x08, 0x0a, 0x03, - 0x4d, 0x73, 0x67, 0x12, 0x59, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, - 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x1a, 0x28, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, - 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, - 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x12, 0x21, - 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x69, 0x64, 0x67, - 0x65, 0x1a, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x0d, - 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x22, 0x2e, - 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, - 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x21, 0x2e, - 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x1a, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x74, 0x0a, 0x14, 0x49, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0xcd, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4a, 0x0a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0xf2, 0xde, + 0x1f, 0x10, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x22, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, + 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x11, 0xf2, 0xde, 0x1f, 0x0d, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x22, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, + 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x6f, + 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0xf0, 0x08, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x59, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, + 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x63, 0x6f, 0x72, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x1a, 0x28, 0x2e, 0x6f, 0x70, 0x69, 0x6e, + 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x72, 0x69, + 0x64, 0x67, 0x65, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, + 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x1a, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x42, 0x72, 0x69, 0x64, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5f, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, + 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, + 0x70, 0x6f, 0x73, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, + 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x1a, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, + 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x74, 0x0a, 0x14, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, + 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x12, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, + 0x73, 0x69, 0x74, 0x1a, 0x31, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, 0x31, - 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x7d, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x12, 0x2c, 0x2e, 0x6f, - 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x1a, 0x34, 0x2e, 0x6f, 0x70, 0x69, - 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x62, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, - 0x65, 0x72, 0x12, 0x23, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, - 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x1a, 0x2b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, - 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x12, 0x25, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, - 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x1a, - 0x2d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, - 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, - 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x24, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x2c, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, + 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7d, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, + 0x6c, 0x12, 0x2c, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x1a, + 0x34, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x46, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x23, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x2b, 0x2e, 0x6f, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x1a, 0x2b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0c, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x6f, 0x70, 0x69, 0x6e, - 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x29, 0x2e, 0x6f, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x68, 0x0a, 0x10, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x12, 0x25, 0x2e, + 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, + 0x6e, 0x67, 0x65, 0x72, 0x1a, 0x2d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, + 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x2c, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xc2, - 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, - 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, - 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, - 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x68, 0x6f, 0x73, - 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x4f, 0x70, 0x69, 0x6e, - 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, - 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x1c, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x12, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x0e, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x2e, 0x6f, + 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x1a, 0x2b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, + 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x1a, 0x29, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, + 0xb0, 0x2a, 0x01, 0x42, 0xc2, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, + 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, + 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, + 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, + 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, + 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, + 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, + 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, + 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/opinit/ophost/v1/types.pulsar.go b/api/opinit/ophost/v1/types.pulsar.go index ccb3e7cf..ad3227e3 100644 --- a/api/opinit/ophost/v1/types.pulsar.go +++ b/api/opinit/ophost/v1/types.pulsar.go @@ -512,9 +512,55 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_BridgeConfig_1_list)(nil) + +type _BridgeConfig_1_list struct { + list *[]string +} + +func (x *_BridgeConfig_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_BridgeConfig_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_BridgeConfig_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_BridgeConfig_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_BridgeConfig_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message BridgeConfig at list field Challengers as it is not of Message kind")) +} + +func (x *_BridgeConfig_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_BridgeConfig_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_BridgeConfig_1_list) IsValid() bool { + return x.list != nil +} + var ( md_BridgeConfig protoreflect.MessageDescriptor - fd_BridgeConfig_challenger protoreflect.FieldDescriptor + fd_BridgeConfig_challengers protoreflect.FieldDescriptor fd_BridgeConfig_proposer protoreflect.FieldDescriptor fd_BridgeConfig_batch_info protoreflect.FieldDescriptor fd_BridgeConfig_submission_interval protoreflect.FieldDescriptor @@ -526,7 +572,7 @@ var ( func init() { file_opinit_ophost_v1_types_proto_init() md_BridgeConfig = File_opinit_ophost_v1_types_proto.Messages().ByName("BridgeConfig") - fd_BridgeConfig_challenger = md_BridgeConfig.Fields().ByName("challenger") + fd_BridgeConfig_challengers = md_BridgeConfig.Fields().ByName("challengers") fd_BridgeConfig_proposer = md_BridgeConfig.Fields().ByName("proposer") fd_BridgeConfig_batch_info = md_BridgeConfig.Fields().ByName("batch_info") fd_BridgeConfig_submission_interval = md_BridgeConfig.Fields().ByName("submission_interval") @@ -600,9 +646,9 @@ func (x *fastReflection_BridgeConfig) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_BridgeConfig) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Challenger != "" { - value := protoreflect.ValueOfString(x.Challenger) - if !f(fd_BridgeConfig_challenger, value) { + if len(x.Challengers) != 0 { + value := protoreflect.ValueOfList(&_BridgeConfig_1_list{list: &x.Challengers}) + if !f(fd_BridgeConfig_challengers, value) { return } } @@ -657,8 +703,8 @@ func (x *fastReflection_BridgeConfig) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_BridgeConfig) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "opinit.ophost.v1.BridgeConfig.challenger": - return x.Challenger != "" + case "opinit.ophost.v1.BridgeConfig.challengers": + return len(x.Challengers) != 0 case "opinit.ophost.v1.BridgeConfig.proposer": return x.Proposer != "" case "opinit.ophost.v1.BridgeConfig.batch_info": @@ -687,8 +733,8 @@ func (x *fastReflection_BridgeConfig) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_BridgeConfig) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "opinit.ophost.v1.BridgeConfig.challenger": - x.Challenger = "" + case "opinit.ophost.v1.BridgeConfig.challengers": + x.Challengers = nil case "opinit.ophost.v1.BridgeConfig.proposer": x.Proposer = "" case "opinit.ophost.v1.BridgeConfig.batch_info": @@ -717,9 +763,12 @@ func (x *fastReflection_BridgeConfig) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_BridgeConfig) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "opinit.ophost.v1.BridgeConfig.challenger": - value := x.Challenger - return protoreflect.ValueOfString(value) + case "opinit.ophost.v1.BridgeConfig.challengers": + if len(x.Challengers) == 0 { + return protoreflect.ValueOfList(&_BridgeConfig_1_list{}) + } + listValue := &_BridgeConfig_1_list{list: &x.Challengers} + return protoreflect.ValueOfList(listValue) case "opinit.ophost.v1.BridgeConfig.proposer": value := x.Proposer return protoreflect.ValueOfString(value) @@ -758,8 +807,10 @@ func (x *fastReflection_BridgeConfig) Get(descriptor protoreflect.FieldDescripto // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_BridgeConfig) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "opinit.ophost.v1.BridgeConfig.challenger": - x.Challenger = value.Interface().(string) + case "opinit.ophost.v1.BridgeConfig.challengers": + lv := value.List() + clv := lv.(*_BridgeConfig_1_list) + x.Challengers = *clv.list case "opinit.ophost.v1.BridgeConfig.proposer": x.Proposer = value.Interface().(string) case "opinit.ophost.v1.BridgeConfig.batch_info": @@ -792,6 +843,12 @@ func (x *fastReflection_BridgeConfig) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_BridgeConfig) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "opinit.ophost.v1.BridgeConfig.challengers": + if x.Challengers == nil { + x.Challengers = []string{} + } + value := &_BridgeConfig_1_list{list: &x.Challengers} + return protoreflect.ValueOfList(value) case "opinit.ophost.v1.BridgeConfig.batch_info": if x.BatchInfo == nil { x.BatchInfo = new(BatchInfo) @@ -812,8 +869,6 @@ func (x *fastReflection_BridgeConfig) Mutable(fd protoreflect.FieldDescriptor) p x.SubmissionStartTime = new(timestamppb.Timestamp) } return protoreflect.ValueOfMessage(x.SubmissionStartTime.ProtoReflect()) - case "opinit.ophost.v1.BridgeConfig.challenger": - panic(fmt.Errorf("field challenger of message opinit.ophost.v1.BridgeConfig is not mutable")) case "opinit.ophost.v1.BridgeConfig.proposer": panic(fmt.Errorf("field proposer of message opinit.ophost.v1.BridgeConfig is not mutable")) case "opinit.ophost.v1.BridgeConfig.metadata": @@ -831,8 +886,9 @@ func (x *fastReflection_BridgeConfig) Mutable(fd protoreflect.FieldDescriptor) p // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_BridgeConfig) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "opinit.ophost.v1.BridgeConfig.challenger": - return protoreflect.ValueOfString("") + case "opinit.ophost.v1.BridgeConfig.challengers": + list := []string{} + return protoreflect.ValueOfList(&_BridgeConfig_1_list{list: &list}) case "opinit.ophost.v1.BridgeConfig.proposer": return protoreflect.ValueOfString("") case "opinit.ophost.v1.BridgeConfig.batch_info": @@ -918,9 +974,11 @@ func (x *fastReflection_BridgeConfig) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Challenger) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Challengers) > 0 { + for _, s := range x.Challengers { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } } l = len(x.Proposer) if l > 0 { @@ -1045,12 +1103,14 @@ func (x *fastReflection_BridgeConfig) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x12 } - if len(x.Challenger) > 0 { - i -= len(x.Challenger) - copy(dAtA[i:], x.Challenger) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Challenger))) - i-- - dAtA[i] = 0xa + if len(x.Challengers) > 0 { + for iNdEx := len(x.Challengers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Challengers[iNdEx]) + copy(dAtA[i:], x.Challengers[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Challengers[iNdEx]))) + i-- + dAtA[i] = 0xa + } } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -1103,7 +1163,7 @@ func (x *fastReflection_BridgeConfig) ProtoMethods() *protoiface.Methods { switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Challenger", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Challengers", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1131,7 +1191,7 @@ func (x *fastReflection_BridgeConfig) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Challenger = string(dAtA[iNdEx:postIndex]) + x.Challengers = append(x.Challengers, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 { @@ -3466,7 +3526,7 @@ type BridgeConfig struct { unknownFields protoimpl.UnknownFields // The address of the challenger. - Challenger string `protobuf:"bytes,1,opt,name=challenger,proto3" json:"challenger,omitempty"` + Challengers []string `protobuf:"bytes,1,rep,name=challengers,proto3" json:"challengers,omitempty"` // The address of the proposer. Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` // The information about batch submission. @@ -3503,11 +3563,11 @@ func (*BridgeConfig) Descriptor() ([]byte, []int) { return file_opinit_ophost_v1_types_proto_rawDescGZIP(), []int{1} } -func (x *BridgeConfig) GetChallenger() string { +func (x *BridgeConfig) GetChallengers() []string { if x != nil { - return x.Challenger + return x.Challengers } - return "" + return nil } func (x *BridgeConfig) GetProposer() string { @@ -3767,84 +3827,84 @@ var file_opinit_ophost_v1_types_proto_rawDesc = []byte{ 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x65, 0x65, 0x3a, 0x1a, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0d, 0x6f, 0x70, 0x68, 0x6f, - 0x73, 0x74, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xb8, 0x04, 0x0a, 0x0c, 0x42, 0x72, - 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x68, - 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, - 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x6c, 0x6c, 0x65, - 0x6e, 0x67, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0a, 0x62, 0x61, - 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, - 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, - 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x7a, 0x0a, 0x13, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xea, - 0xde, 0x1f, 0x1d, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, - 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x73, 0x75, 0x62, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x7a, 0x0a, - 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, - 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x1d, 0x66, - 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, - 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x5d, 0x0a, 0x15, 0x73, 0x75, 0x62, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, - 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x22, 0x3f, 0x0a, 0x09, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x12, - 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x41, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x61, - 0x69, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x31, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x31, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x19, 0x0a, - 0x08, 0x6c, 0x32, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6c, 0x32, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0xa0, 0x01, 0x0a, 0x06, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x72, 0x6f, - 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, - 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x4d, 0x0a, 0x0d, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, - 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6c, 0x32, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x98, 0x01, 0x0a, 0x13, - 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, - 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, - 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x06, 0x6f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, 0x69, 0x6e, - 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, - 0x70, 0x75, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0xc9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0xa8, 0xe2, 0x1e, - 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, - 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x4f, 0x50, - 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2f, - 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, - 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x4f, 0x70, 0x69, 0x6e, 0x69, - 0x74, 0x2e, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x70, - 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x1c, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, - 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x74, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xba, 0x04, 0x0a, 0x0c, 0x42, 0x72, + 0x69, 0x64, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3a, 0x0a, 0x0b, 0x63, 0x68, + 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x6c, 0x6c, + 0x65, 0x6e, 0x67, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0a, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, + 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x7a, 0x0a, 0x13, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0xc8, 0xde, 0x1f, + 0x00, 0xea, 0xde, 0x1f, 0x1d, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x73, 0x75, 0x62, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, + 0x7a, 0x0a, 0x13, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x2e, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, + 0x1d, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, + 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x12, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x5d, 0x0a, 0x15, 0x73, + 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3f, 0x0a, 0x09, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x74, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x41, 0x0a, 0x09, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x50, 0x61, 0x69, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x31, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x31, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, + 0x19, 0x0a, 0x08, 0x6c, 0x32, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6c, 0x32, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x22, 0xa0, 0x01, 0x0a, 0x06, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, + 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x4d, 0x0a, 0x0d, 0x6c, 0x31, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, + 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x6c, 0x31, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6c, 0x32, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, + 0x6c, 0x32, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x98, 0x01, + 0x0a, 0x13, 0x42, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x44, 0x0a, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, + 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, + 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3b, 0x0a, 0x06, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6f, 0x70, + 0x69, 0x6e, 0x69, 0x74, 0x2e, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, + 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0xc9, 0x01, 0xc8, 0xe1, 0x1e, 0x00, 0xa8, + 0xe2, 0x1e, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x2e, + 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, + 0x4f, 0x50, 0x69, 0x6e, 0x69, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x70, 0x69, 0x6e, 0x69, + 0x74, 0x2f, 0x6f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x68, 0x6f, + 0x73, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x4f, 0x70, 0x69, + 0x6e, 0x69, 0x74, 0x2e, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, + 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x1c, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x5c, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x12, 0x4f, 0x70, 0x69, 0x6e, 0x69, 0x74, 0x3a, 0x3a, 0x4f, 0x70, 0x68, 0x6f, 0x73, 0x74, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/contrib/launchtools/steps/genesis.go b/contrib/launchtools/steps/genesis.go index 897fb862..52167935 100644 --- a/contrib/launchtools/steps/genesis.go +++ b/contrib/launchtools/steps/genesis.go @@ -68,7 +68,7 @@ func InitializeGenesisWithPostSetup( // store genesis if err := genutil.ExportGenesisFile(appGenesis, ctx.ServerContext().Config.GenesisFile()); err != nil { - return errors.Wrap(err, "failed to export genesis file") + return errors.New("failed to export genesis file") } return nil @@ -114,7 +114,7 @@ func initializeGenesis( // prepare genesis genFilePath := cometConfig.GenesisFile() if cometos.FileExists(genFilePath) { - return nil, errors.Wrap(err, "genesis file already exists") + return nil, errors.New("genesis file already exists") } // prepare default genesis diff --git a/contrib/launchtools/steps/opbridge.go b/contrib/launchtools/steps/opbridge.go index 0597f23f..cf3caccc 100644 --- a/contrib/launchtools/steps/opbridge.go +++ b/contrib/launchtools/steps/opbridge.go @@ -134,8 +134,8 @@ func createOpBridge( return ophosttypes.NewMsgCreateBridge( executorAddress, ophosttypes.BridgeConfig{ - Challenger: challengerAddress, - Proposer: outputAddress, + Challengers: []string{challengerAddress}, + Proposer: outputAddress, BatchInfo: ophosttypes.BatchInfo{ Submitter: submitterAddress, Chain: submitTarget, diff --git a/contrib/launchtools/types.go b/contrib/launchtools/types.go index 76022e43..0f8f8473 100644 --- a/contrib/launchtools/types.go +++ b/contrib/launchtools/types.go @@ -145,6 +145,7 @@ func NewLauncher( defaultGenesis map[string]json.RawMessage, artifactsDir string, ) *LauncherContext { + kr, err := keyring.New("minitia", keyring.BackendTest, clientCtx.HomeDir, nil, clientCtx.Codec) if err != nil { panic("failed to create keyring") diff --git a/proto/opinit/opchild/v1/tx.proto b/proto/opinit/opchild/v1/tx.proto index d1288b1b..31791840 100644 --- a/proto/opinit/opchild/v1/tx.proto +++ b/proto/opinit/opchild/v1/tx.proto @@ -229,7 +229,7 @@ message MsgSpendFeePool { // MsgSpendFeePoolResponse returns deposit result data message MsgSpendFeePoolResponse {} -// MsgUpdateOracle is a message to update oracle prices which contains L1 extended commits for oracle. +// MsgUpdateOracle is a message to update oracle prices which contains L1 extended commits for oracle. message MsgUpdateOracle { option (cosmos.msg.v1.signer) = "sender"; option (amino.name) = "opchild/MsgUpdateOracle"; diff --git a/proto/opinit/ophost/v1/tx.proto b/proto/opinit/ophost/v1/tx.proto index a32461a9..22eba8fd 100644 --- a/proto/opinit/ophost/v1/tx.proto +++ b/proto/opinit/ophost/v1/tx.proto @@ -54,8 +54,8 @@ service Msg { // UpdateProposer defines a rpc handler method for MsgUpdateProposer. rpc UpdateProposer(MsgUpdateProposer) returns (MsgUpdateProposerResponse); - // UpdateChallenger defines a rpc handler method for MsgUpdateChallenger. - rpc UpdateChallenger(MsgUpdateChallenger) returns (MsgUpdateChallengerResponse); + // UpdateChallengers defines a rpc handler method for MsgUpdateChallengers. + rpc UpdateChallengers(MsgUpdateChallengers) returns (MsgUpdateChallengersResponse); // UpdateBatchInfo defines a rpc handler method for MsgUpdateBatchInfo. rpc UpdateBatchInfo(MsgUpdateBatchInfo) returns (MsgUpdateBatchInfoResponse); @@ -220,20 +220,22 @@ message MsgUpdateProposerResponse { } // MsgUpdateChallenger is a message to change a challenger -message MsgUpdateChallenger { +message MsgUpdateChallengers { option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "ophost/MsgUpdateChallenger"; + option (amino.name) = "ophost/MsgUpdateChallengers"; // authority is the address that controls the module (defaults to x/gov unless overwritten) // or the current challenger address. + // + // If the given authority is a challenger address, it has the ability to replace itself with another address. string authority = 1 [(gogoproto.moretags) = "yaml:\"authority\"", (cosmos_proto.scalar) = "cosmos.AddressString"]; uint64 bridge_id = 2 [(gogoproto.moretags) = "yaml:\"bridge_id\""]; - string new_challenger = 3 - [(gogoproto.moretags) = "yaml:\"new_challenger\"", (cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated string new_challengers = 3 + [(gogoproto.moretags) = "yaml:\"new_challengers\"", (cosmos_proto.scalar) = "cosmos.AddressString"]; } -// MsgUpdateChallengerResponse returns a message handle result. -message MsgUpdateChallengerResponse { +// MsgUpdateChallengersResponse returns a message handle result. +message MsgUpdateChallengersResponse { // last finalized output index uint64 output_index = 1; // last finalized l2 block number @@ -268,6 +270,9 @@ message MsgUpdateMetadata { // authority is the address that controls the module (defaults to x/gov unless overwritten) // or the current challenger address. + // + // If the given authority is a challenger address, it has the ability to replace oneself to another address or remove + // oneself. string authority = 1 [(gogoproto.moretags) = "yaml:\"authority\"", (cosmos_proto.scalar) = "cosmos.AddressString"]; uint64 bridge_id = 2 [(gogoproto.moretags) = "yaml:\"bridge_id\""]; bytes metadata = 3 [(gogoproto.moretags) = "yaml:\"metadata\""]; diff --git a/proto/opinit/ophost/v1/types.proto b/proto/opinit/ophost/v1/types.proto index dd506c1a..a99edd63 100644 --- a/proto/opinit/ophost/v1/types.proto +++ b/proto/opinit/ophost/v1/types.proto @@ -29,7 +29,7 @@ message Params { // BridgeConfig defines the set of bridge config. message BridgeConfig { // The address of the challenger. - string challenger = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + repeated string challengers = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The address of the proposer. string proposer = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The information about batch submission. @@ -84,6 +84,6 @@ message Output { // BatchInfoWithOutput defines the batch information with output. message BatchInfoWithOutput { - BatchInfo batchInfo = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - Output output = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + BatchInfo batch_info = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + Output output = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } \ No newline at end of file diff --git a/x/opchild/client/cli/genesis.go b/x/opchild/client/cli/genesis.go index 365867bf..1c7964dc 100644 --- a/x/opchild/client/cli/genesis.go +++ b/x/opchild/client/cli/genesis.go @@ -119,7 +119,7 @@ $ %s add-genesis-validator my-key-name --home=/path/to/home/dir --keyring-backen genDoc.AppState = appStateJSON if err = genutil.ExportGenesisFile(genDoc, config.GenesisFile()); err != nil { - return errors.Wrap(err, "Failed to export genesis file") + return errors.New("Failed to export genesis file") } return nil @@ -203,7 +203,7 @@ the address will be looked up in the local Keybase. genDoc.AppState = appStateJSON if err = genutil.ExportGenesisFile(genDoc, config.GenesisFile()); err != nil { - return errors.Wrap(err, "Failed to export genesis file") + return errors.New("Failed to export genesis file") } return nil diff --git a/x/opchild/client/cli/tx.go b/x/opchild/client/cli/tx.go index 651949f7..723e02b0 100644 --- a/x/opchild/client/cli/tx.go +++ b/x/opchild/client/cli/tx.go @@ -261,7 +261,7 @@ func NewSetBridgeInfoCmd(ac address.Codec) *cobra.Command { fmt.Sprintf( `send a tx to set a bridge info with a config file as a json. Example: - $ %s tx ophost set-bridge-info 1 init10d07y265gmmuvt4z0w9aw880jnsr700j55nka3 mahalo-2 07-tendermint-0 path/to/bridge-config.json + $ %s tx opchild set-bridge-info 1 init10d07y265gmmuvt4z0w9aw880jnsr700j55nka3 mahalo-2 07-tendermint-0 path/to/bridge-config.json Where bridge-config.json contains: { @@ -296,7 +296,7 @@ func NewSetBridgeInfoCmd(ac address.Codec) *cobra.Command { return err } - origConfig := ophostcli.BridgeConfig{} + origConfig := ophostcli.BridgeCliConfig{} err = json.Unmarshal(configBytes, &origConfig) if err != nil { return err @@ -318,14 +318,15 @@ func NewSetBridgeInfoCmd(ac address.Codec) *cobra.Command { } bridgeConfig := ophosttypes.BridgeConfig{ - Challenger: origConfig.Challenger, + Challengers: origConfig.Challengers, Proposer: origConfig.Proposer, SubmissionInterval: submissionInterval, FinalizationPeriod: finalizationPeriod, SubmissionStartTime: submissionStartTime, - BatchInfo: origConfig.BatchInfo, + BatchInfo: ophosttypes.BatchInfo(origConfig.BatchInfo), Metadata: []byte(origConfig.Metadata), } + if err = bridgeConfig.ValidateWithNoAddrValidation(); err != nil { return err } diff --git a/x/opchild/client/cli/tx_test.go b/x/opchild/client/cli/tx_test.go index 94ebb511..15e56afb 100644 --- a/x/opchild/client/cli/tx_test.go +++ b/x/opchild/client/cli/tx_test.go @@ -421,7 +421,7 @@ func (s *CLITestSuite) TestNewSetBridgeInfo() { invalidConfig.WriteString(`{}`) validConfig.WriteString(`{ - "challenger": "init1q6jhwnarkw2j5qqgx3qlu20k8nrdglft5ksr0g", + "challengers": ["init1q6jhwnarkw2j5qqgx3qlu20k8nrdglft5ksr0g"], "proposer": "init1k2svyvm60r8rhnzr9vemk5f6fksvm6tyeujp3c", "submission_interval": "100s", "finalization_period": "1000s", diff --git a/x/opchild/keeper/genesis_test.go b/x/opchild/keeper/genesis_test.go index 7e24f757..2f6c0641 100644 --- a/x/opchild/keeper/genesis_test.go +++ b/x/opchild/keeper/genesis_test.go @@ -34,8 +34,8 @@ func Test_GenesisImportExport(t *testing.T) { BridgeId: 1, BridgeAddr: addrsStr[1], BridgeConfig: ophosttypes.BridgeConfig{ - Challenger: addrsStr[2], - Proposer: addrsStr[3], + Challengers: []string{addrsStr[2]}, + Proposer: addrsStr[3], BatchInfo: ophosttypes.BatchInfo{ Submitter: addrsStr[4], Chain: "l1", diff --git a/x/opchild/keeper/msg_server_test.go b/x/opchild/keeper/msg_server_test.go index 9166a024..d880ee2d 100644 --- a/x/opchild/keeper/msg_server_test.go +++ b/x/opchild/keeper/msg_server_test.go @@ -280,8 +280,8 @@ func Test_MsgServer_Withdraw(t *testing.T) { L1ChainId: "test-chain-id", L1ClientId: "test-client-id", BridgeConfig: ophosttypes.BridgeConfig{ - Challenger: addrsStr[2], - Proposer: addrsStr[3], + Challengers: []string{addrsStr[2]}, + Proposer: addrsStr[3], BatchInfo: ophosttypes.BatchInfo{ Submitter: addrsStr[4], Chain: "l1", @@ -332,8 +332,8 @@ func Test_MsgServer_SetBridgeInfo(t *testing.T) { L1ChainId: "test-chain-id", L1ClientId: "test-client-id", BridgeConfig: ophosttypes.BridgeConfig{ - Challenger: addrsStr[2], - Proposer: addrsStr[3], + Challengers: []string{addrsStr[2]}, + Proposer: addrsStr[3], BatchInfo: ophosttypes.BatchInfo{ Submitter: addrsStr[4], Chain: "l1", diff --git a/x/opchild/keeper/querier_test.go b/x/opchild/keeper/querier_test.go index 2b071be9..5c4ac4b1 100644 --- a/x/opchild/keeper/querier_test.go +++ b/x/opchild/keeper/querier_test.go @@ -54,8 +54,8 @@ func Test_QuerySetBridgeInfo(t *testing.T) { BridgeId: 1, BridgeAddr: addrsStr[1], BridgeConfig: ophosttypes.BridgeConfig{ - Challenger: addrsStr[2], - Proposer: addrsStr[3], + Challengers: []string{addrsStr[2]}, + Proposer: addrsStr[3], BatchInfo: ophosttypes.BatchInfo{ Submitter: addrsStr[4], Chain: "l1", diff --git a/x/ophost/client/cli/tx.go b/x/ophost/client/cli/tx.go index 2bb12193..9020ccad 100644 --- a/x/ophost/client/cli/tx.go +++ b/x/ophost/client/cli/tx.go @@ -97,7 +97,7 @@ func NewCreateBridge(ac address.Codec) *cobra.Command { Where bridge-config.json contains: { - "challenger": "bech32-address", + "challengers": ["bech32-address"], "proposer": "bech32-addresss", "submission_interval": "duration", "finalization_period": "duration", @@ -119,9 +119,10 @@ func NewCreateBridge(ac address.Codec) *cobra.Command { return err } - origConfig := BridgeConfig{} + origConfig := BridgeCliConfig{} err = json.Unmarshal(configBytes, &origConfig) if err != nil { + return err } @@ -141,25 +142,29 @@ func NewCreateBridge(ac address.Codec) *cobra.Command { } config := types.BridgeConfig{ - Challenger: origConfig.Challenger, + Challengers: origConfig.Challengers, // Ensure Challenger is properly assigned Proposer: origConfig.Proposer, SubmissionInterval: submissionInterval, FinalizationPeriod: finalizationPeriod, SubmissionStartTime: submissionStartTime, Metadata: []byte(origConfig.Metadata), - BatchInfo: origConfig.BatchInfo, + BatchInfo: types.BatchInfo(origConfig.BatchInfo), } + if err = config.Validate(ac); err != nil { + return err } fromAddr, err := ac.BytesToString(clientCtx.GetFromAddress()) if err != nil { + return err } msg := types.NewMsgCreateBridge(fromAddr, config) if err = msg.Validate(ac); err != nil { + return err } diff --git a/x/ophost/client/cli/tx_test.go b/x/ophost/client/cli/tx_test.go index 4bedc4bd..992b210d 100644 --- a/x/ophost/client/cli/tx_test.go +++ b/x/ophost/client/cli/tx_test.go @@ -164,7 +164,7 @@ func (s *CLITestSuite) TestNewCreateBridge() { invalidConfig.WriteString(`{}`) validConfig.WriteString(`{ - "challenger": "init1q6jhwnarkw2j5qqgx3qlu20k8nrdglft5ksr0g", + "challengers": ["init1q6jhwnarkw2j5qqgx3qlu20k8nrdglft5ksr0g"], "proposer": "init1k2svyvm60r8rhnzr9vemk5f6fksvm6tyeujp3c", "submission_interval": "100s", "finalization_period": "1000s", diff --git a/x/ophost/client/cli/types.go b/x/ophost/client/cli/types.go index 07fcc525..b6168f16 100644 --- a/x/ophost/client/cli/types.go +++ b/x/ophost/client/cli/types.go @@ -1,27 +1,20 @@ package cli -import "github.com/initia-labs/OPinit/x/ophost/types" - // BridgeConfig defines the set of bridge config. -// -// NOTE: it is a modified BridgeConfig from x/ophost/types/types.pb.go to make unmarshal easier -type BridgeConfig struct { - // The address of the challenger. - Challenger string `protobuf:"bytes,1,opt,name=challenger,proto3" json:"challenger,omitempty"` - // The address of the proposer. - Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` - // The time interval at which checkpoints must be submitted. - // NOTE: this param is currently not used, but will be used for challenge in future. - SubmissionInterval string `protobuf:"bytes,3,opt,name=submission_interval,json=submissionInterval,proto3,stdduration" json:"submission_interval,omitempty"` - // The minium time duration that must elapse before a withdrawal can be finalized. - FinalizationPeriod string `protobuf:"bytes,4,opt,name=finalization_period,json=finalizationPeriod,proto3,stdduration" json:"finalization_period,omitempty"` - // The time of the first l2 block recorded. - // NOTE: this param is currently not used, but will be used for challenge in future. - SubmissionStartTime string `protobuf:"bytes,5,opt,name=submission_start_time,json=submissionStartTime,proto3,stdtime" json:"submission_start_time"` - // Normally it is IBC channelID for permissioned IBC relayer. - Metadata string `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` - // BatchInfo is the batch information for the bridge. - BatchInfo types.BatchInfo `json:"batch_info"` +// NOTE: it is a modified BridgeConfig from x/ophost/types/types.go to make unmarshal easier +type BridgeCliConfig struct { + Challengers []string `json:"challengers"` + Proposer string `json:"proposer"` + SubmissionInterval string `json:"submission_interval"` + FinalizationPeriod string `json:"finalization_period"` + SubmissionStartTime string `json:"submission_start_time"` + Metadata string `json:"metadata"` + BatchInfo BatchCliInfo `json:"batch_info"` +} + +type BatchCliInfo struct { + Submitter string `json:"submitter"` + Chain string `json:"chain"` } // MsgFinalizeTokenWithdrawal is a message to remove a validator from designated list diff --git a/x/ophost/keeper/bridge_test.go b/x/ophost/keeper/bridge_test.go index 8f01f245..fc72aa0d 100644 --- a/x/ophost/keeper/bridge_test.go +++ b/x/ophost/keeper/bridge_test.go @@ -11,7 +11,7 @@ import ( func Test_BridgeConfig(t *testing.T) { ctx, input := createDefaultTestInput(t) config := types.BridgeConfig{ - Challenger: addrs[0].String(), + Challengers: []string{addrs[0].String()}, Proposer: addrs[1].String(), SubmissionInterval: time.Second * 100, FinalizationPeriod: time.Second * 10, @@ -28,7 +28,7 @@ func Test_BridgeConfig(t *testing.T) { func Test_IterateBridgeConfig(t *testing.T) { ctx, input := createDefaultTestInput(t) config1 := types.BridgeConfig{ - Challenger: addrs[0].String(), + Challengers: []string{addrs[0].String()}, Proposer: addrs[1].String(), SubmissionInterval: time.Second * 100, FinalizationPeriod: time.Second * 10, @@ -37,7 +37,7 @@ func Test_IterateBridgeConfig(t *testing.T) { BatchInfo: types.BatchInfo{Submitter: addrsStr[0], Chain: "l1"}, } config2 := types.BridgeConfig{ - Challenger: addrs[2].String(), + Challengers: []string{addrs[2].String()}, Proposer: addrs[3].String(), SubmissionInterval: time.Second * 100, FinalizationPeriod: time.Second * 10, diff --git a/x/ophost/keeper/common_test.go b/x/ophost/keeper/common_test.go index e8396606..e375436e 100644 --- a/x/ophost/keeper/common_test.go +++ b/x/ophost/keeper/common_test.go @@ -318,11 +318,11 @@ func _createTestInput( } type bridgeHook struct { - proposer string - challenger string - batchInfo ophosttypes.BatchInfo - metadata []byte - err error + proposer string + challengers []string + batchInfo ophosttypes.BatchInfo + metadata []byte + err error } func (h *bridgeHook) BridgeCreated( @@ -336,11 +336,11 @@ func (h *bridgeHook) BridgeCreated( h.metadata = bridgeConfig.Metadata h.proposer = bridgeConfig.Proposer - h.challenger = bridgeConfig.Challenger + h.challengers = bridgeConfig.Challengers return nil } -func (h *bridgeHook) BridgeChallengerUpdated( +func (h *bridgeHook) BridgeChallengersUpdated( ctx context.Context, bridgeId uint64, bridgeConfig ophosttypes.BridgeConfig, @@ -349,7 +349,7 @@ func (h *bridgeHook) BridgeChallengerUpdated( return h.err } - h.challenger = bridgeConfig.Challenger + h.challengers = bridgeConfig.Challengers return nil } diff --git a/x/ophost/keeper/genesis_test.go b/x/ophost/keeper/genesis_test.go index 0371d81e..4048b652 100644 --- a/x/ophost/keeper/genesis_test.go +++ b/x/ophost/keeper/genesis_test.go @@ -13,7 +13,7 @@ func Test_GenesisExport(t *testing.T) { params := input.OPHostKeeper.GetParams(ctx) config1 := types.BridgeConfig{ - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, Proposer: addrsStr[0], SubmissionInterval: 100, FinalizationPeriod: 100, @@ -22,7 +22,7 @@ func Test_GenesisExport(t *testing.T) { BatchInfo: types.BatchInfo{Submitter: addrsStr[0], Chain: "l1"}, } config2 := types.BridgeConfig{ - Challenger: addrsStr[2], + Challengers: []string{addrsStr[2]}, Proposer: addrsStr[3], SubmissionInterval: 200, FinalizationPeriod: 200, @@ -108,7 +108,7 @@ func Test_GenesisImportExport(t *testing.T) { ctx, input := createDefaultTestInput(t) params := input.OPHostKeeper.GetParams(ctx) config1 := types.BridgeConfig{ - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, Proposer: addrsStr[0], SubmissionInterval: 100, FinalizationPeriod: 100, diff --git a/x/ophost/keeper/msg_server.go b/x/ophost/keeper/msg_server.go index b69b4aa8..e6a98c91 100644 --- a/x/ophost/keeper/msg_server.go +++ b/x/ophost/keeper/msg_server.go @@ -5,7 +5,9 @@ import ( "context" "encoding/binary" "encoding/hex" + "slices" "strconv" + "strings" "golang.org/x/crypto/sha3" @@ -92,7 +94,7 @@ func (ms MsgServer) CreateBridge(ctx context.Context, req *types.MsgCreateBridge types.EventTypeCreateBridge, sdk.NewAttribute(types.AttributeKeyCreator, req.Creator), sdk.NewAttribute(types.AttributeKeyProposer, req.Config.Proposer), - sdk.NewAttribute(types.AttributeKeyChallenger, req.Config.Challenger), + sdk.NewAttribute(types.AttributeKeyChallenger, strings.Join(req.Config.Challengers, ",")), sdk.NewAttribute(types.AttributeKeyBatchChain, req.Config.BatchInfo.Chain), sdk.NewAttribute(types.AttributeKeyBatchSubmitter, req.Config.BatchInfo.Submitter), sdk.NewAttribute(types.AttributeKeyBridgeId, strconv.FormatUint(bridgeId, 10)), @@ -184,7 +186,7 @@ func (ms MsgServer) DeleteOutput(ctx context.Context, req *types.MsgDeleteOutput } // permission check - if challenger != bridgeConfig.Challenger { + if !slices.Contains(bridgeConfig.Challengers, challenger) { return nil, errors.ErrUnauthorized.Wrap("invalid challenger") } @@ -430,7 +432,7 @@ func (ms MsgServer) UpdateProposer(ctx context.Context, req *types.MsgUpdateProp }, nil } -func (ms MsgServer) UpdateChallenger(ctx context.Context, req *types.MsgUpdateChallenger) (*types.MsgUpdateChallengerResponse, error) { +func (ms MsgServer) UpdateChallengers(ctx context.Context, req *types.MsgUpdateChallengers) (*types.MsgUpdateChallengersResponse, error) { if err := req.Validate(ms.authKeeper.AddressCodec()); err != nil { return nil, err } @@ -441,13 +443,30 @@ func (ms MsgServer) UpdateChallenger(ctx context.Context, req *types.MsgUpdateCh return nil, err } - // gov or current challenger can update challenger. - if ms.authority != req.Authority && config.Challenger != req.Authority { - return nil, govtypes.ErrInvalidSigner.Wrapf("invalid authority; expected %s or %s, got %s", ms.authority, config.Challenger, req.Authority) + // permission check + if req.Authority == ms.authority { + config.Challengers = req.NewChallengers + } else if idx := slices.Index(config.Challengers, req.Authority); idx >= 0 { + removedChallengers := []string{} + for _, challenger := range config.Challengers { + if found := slices.Contains(req.NewChallengers, challenger); !found { + removedChallengers = append(removedChallengers, challenger) + } + } + + originChallengersLen := len(config.Challengers) + newChallengersLen := len(req.NewChallengers) + removedChallengersLen := len(removedChallengers) + if removedChallengersLen != 1 || removedChallengers[0] != req.Authority || originChallengersLen-newChallengersLen < 0 { + return nil, types.ErrInvalidChallengerUpdate.Wrap("a challenger can replace only oneself or remove oneself") + } + + config.Challengers = req.NewChallengers + } else { + return nil, govtypes.ErrInvalidSigner.Wrapf("invalid authority; expected %s or one in [%s], but got %s", ms.authority, strings.Join(config.Challengers, ","), req.Authority) } - config.Challenger = req.NewChallenger - if err := ms.Keeper.bridgeHook.BridgeChallengerUpdated(ctx, bridgeId, config); err != nil { + if err := ms.Keeper.bridgeHook.BridgeChallengersUpdated(ctx, bridgeId, config); err != nil { return nil, err } @@ -462,12 +481,12 @@ func (ms MsgServer) UpdateChallenger(ctx context.Context, req *types.MsgUpdateCh sdk.UnwrapSDKContext(ctx).EventManager().EmitEvent(sdk.NewEvent( types.EventTypeUpdateChallenger, sdk.NewAttribute(types.AttributeKeyBridgeId, strconv.FormatUint(bridgeId, 10)), - sdk.NewAttribute(types.AttributeKeyChallenger, req.NewChallenger), + sdk.NewAttribute(types.AttributeKeyChallenger, strings.Join(config.Challengers, ",")), sdk.NewAttribute(types.AttributeKeyFinalizedOutputIndex, strconv.FormatUint(finalizedOutputIndex, 10)), sdk.NewAttribute(types.AttributeKeyFinalizedL2BlockNumber, strconv.FormatUint(finalizedOutput.L2BlockNumber, 10)), )) - return &types.MsgUpdateChallengerResponse{ + return &types.MsgUpdateChallengersResponse{ OutputIndex: finalizedOutputIndex, L2BlockNumber: finalizedOutput.L2BlockNumber, }, nil diff --git a/x/ophost/keeper/msg_server_test.go b/x/ophost/keeper/msg_server_test.go index 3678a532..775ca2ee 100644 --- a/x/ophost/keeper/msg_server_test.go +++ b/x/ophost/keeper/msg_server_test.go @@ -34,7 +34,7 @@ func Test_CreateBridge(t *testing.T) { ms := keeper.NewMsgServerImpl(input.OPHostKeeper) config := types.BridgeConfig{ - Challenger: addrsStr[0], + Challengers: []string{addrsStr[0]}, Proposer: addrsStr[0], SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, @@ -59,7 +59,7 @@ func Test_ProposeOutput(t *testing.T) { ms := keeper.NewMsgServerImpl(input.OPHostKeeper) config := types.BridgeConfig{ - Challenger: addrsStr[0], + Challengers: []string{addrsStr[0]}, Proposer: addrsStr[0], SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, @@ -98,7 +98,7 @@ func Test_DeleteOutput(t *testing.T) { ms := keeper.NewMsgServerImpl(input.OPHostKeeper) config := types.BridgeConfig{ Proposer: addrsStr[0], - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, SubmissionStartTime: time.Now().UTC(), @@ -152,7 +152,7 @@ func Test_InitiateTokenDeposit(t *testing.T) { ms := keeper.NewMsgServerImpl(input.OPHostKeeper) config := types.BridgeConfig{ Proposer: addrsStr[0], - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, SubmissionStartTime: time.Now().UTC(), @@ -180,7 +180,7 @@ func Test_FinalizeTokenWithdrawal(t *testing.T) { ms := keeper.NewMsgServerImpl(input.OPHostKeeper) config := types.BridgeConfig{ Proposer: addrsStr[0], - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, SubmissionStartTime: time.Now().UTC(), @@ -246,7 +246,7 @@ func Test_UpdateProposal(t *testing.T) { config := types.BridgeConfig{ Proposer: addrsStr[0], - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, SubmissionStartTime: time.Now().UTC(), @@ -290,13 +290,13 @@ func Test_UpdateProposal(t *testing.T) { require.Error(t, err) } -func Test_UpdateChallenger(t *testing.T) { +func Test_UpdateChallengers(t *testing.T) { ctx, input := createDefaultTestInput(t) ms := keeper.NewMsgServerImpl(input.OPHostKeeper) config := types.BridgeConfig{ Proposer: addrsStr[0], - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1], addrsStr[2], addrsStr[3]}, SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, SubmissionStartTime: time.Now().UTC(), @@ -310,34 +310,70 @@ func Test_UpdateChallenger(t *testing.T) { // gov signer govAddr, err := input.AccountKeeper.AddressCodec().BytesToString(authtypes.NewModuleAddress("gov")) require.NoError(t, err) - msg := types.NewMsgUpdateChallenger(govAddr, 1, addrsStr[2]) - _, err = ms.UpdateChallenger(ctx, msg) + msg := types.NewMsgUpdateChallengers(govAddr, 1, []string{addrsStr[2], addrsStr[3]}) + _, err = ms.UpdateChallengers(ctx, msg) require.NoError(t, err) _config, err := ms.GetBridgeConfig(ctx, 1) require.NoError(t, err) - require.Equal(t, addrs[2].String(), _config.Challenger) - require.Equal(t, addrs[2].String(), input.BridgeHook.challenger) + require.Equal(t, []string{addrsStr[2], addrsStr[3]}, _config.Challengers) + require.Equal(t, input.BridgeHook.challengers, _config.Challengers) // current challenger - msg = types.NewMsgUpdateChallenger(addrsStr[2], 1, addrsStr[3]) - _, err = ms.UpdateChallenger(ctx, msg) + + // case 1. replace oneself + msg = types.NewMsgUpdateChallengers(addrsStr[2], 1, []string{addrsStr[3], addrsStr[4]}) + _, err = ms.UpdateChallengers(ctx, msg) require.NoError(t, err) _config, err = ms.GetBridgeConfig(ctx, 1) require.NoError(t, err) - require.Equal(t, addrs[3].String(), _config.Challenger) - require.Equal(t, addrs[3].String(), input.BridgeHook.challenger) + require.Equal(t, []string{addrsStr[3], addrsStr[4]}, _config.Challengers) + require.Equal(t, input.BridgeHook.challengers, _config.Challengers) + + // case 2. try to remove other challenger + msg = types.NewMsgUpdateChallengers(addrsStr[4], 1, []string{addrsStr[4]}) + _, err = ms.UpdateChallengers(ctx, msg) + require.Error(t, err) + + // case 2. try to replace other challenger + msg = types.NewMsgUpdateChallengers(addrsStr[4], 1, []string{addrsStr[2], addrsStr[4]}) + _, err = ms.UpdateChallengers(ctx, msg) + require.Error(t, err) + + // case 3. remove oneself + msg = types.NewMsgUpdateChallengers(addrsStr[3], 1, []string{addrsStr[4]}) + _, err = ms.UpdateChallengers(ctx, msg) + require.NoError(t, err) + _config, err = ms.GetBridgeConfig(ctx, 1) + require.NoError(t, err) + require.Equal(t, []string{addrsStr[4]}, _config.Challengers) + require.Equal(t, input.BridgeHook.challengers, _config.Challengers) + + // case 4. try to add more challenger + msg = types.NewMsgUpdateChallengers(addrsStr[4], 1, []string{addrsStr[3], addrsStr[4]}) + _, err = ms.UpdateChallengers(ctx, msg) + require.Error(t, err) + + // case 5. try to add more challenger with replace + msg = types.NewMsgUpdateChallengers(addrsStr[4], 1, []string{addrsStr[2], addrsStr[3]}) + _, err = ms.UpdateChallengers(ctx, msg) + require.Error(t, err) // invalid signer invalidAddr, err := input.AccountKeeper.AddressCodec().BytesToString(authtypes.NewModuleAddress(types.ModuleName)) require.NoError(t, err) - msg = types.NewMsgUpdateChallenger(invalidAddr, 1, addrsStr[1]) + msg = types.NewMsgUpdateChallengers(invalidAddr, 1, []string{addrsStr[1]}) require.NoError(t, err) - _, err = ms.UpdateChallenger( + _, err = ms.UpdateChallengers( ctx, msg, ) require.Error(t, err) + + // invalid case + msg = types.NewMsgUpdateChallengers(govAddr, 1, []string{}) + _, err = ms.UpdateChallengers(ctx, msg) + require.Error(t, err) } func Test_UpdateBatchInfo(t *testing.T) { @@ -346,7 +382,7 @@ func Test_UpdateBatchInfo(t *testing.T) { config := types.BridgeConfig{ Proposer: addrsStr[0], - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, SubmissionStartTime: time.Now().UTC(), @@ -371,7 +407,7 @@ func Test_UpdateBatchInfo(t *testing.T) { require.NoError(t, err) _config, err := ms.GetBridgeConfig(ctx, 1) require.NoError(t, err) - require.Equal(t, addrsStr[2], _config.BatchInfo.Submitter) + require.Equal(t, _config.BatchInfo.Submitter, addrsStr[2]) require.Equal(t, "celestia", _config.BatchInfo.Chain) require.Equal(t, input.BridgeHook.batchInfo, _config.BatchInfo) @@ -384,7 +420,7 @@ func Test_UpdateBatchInfo(t *testing.T) { require.NoError(t, err) _config, err = ms.GetBridgeConfig(ctx, 1) require.NoError(t, err) - require.Equal(t, addrsStr[3], _config.BatchInfo.Submitter) + require.Equal(t, _config.BatchInfo.Submitter, addrsStr[3]) require.Equal(t, "l1", _config.BatchInfo.Chain) require.Equal(t, input.BridgeHook.batchInfo, _config.BatchInfo) @@ -410,7 +446,7 @@ func Test_UpdateMetadata(t *testing.T) { config := types.BridgeConfig{ Proposer: addrsStr[0], - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, SubmissionStartTime: time.Now().UTC(), diff --git a/x/ophost/keeper/output_test.go b/x/ophost/keeper/output_test.go index 79ecc6e4..362afc6a 100644 --- a/x/ophost/keeper/output_test.go +++ b/x/ophost/keeper/output_test.go @@ -80,7 +80,7 @@ func Test_IsFinalized(t *testing.T) { ctx, input := createDefaultTestInput(t) err := input.OPHostKeeper.SetBridgeConfig(ctx, 1, types.BridgeConfig{ - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, Proposer: addrsStr[0], SubmissionInterval: 100, FinalizationPeriod: time.Second * 10, @@ -139,7 +139,7 @@ func Test_GetLastFinalizedOutput(t *testing.T) { err := input.OPHostKeeper.SetBridgeConfig(ctx, 1, types.BridgeConfig{ Proposer: addrsStr[0], - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, SubmissionInterval: 100, FinalizationPeriod: time.Second * 10, SubmissionStartTime: time.Now().UTC(), @@ -183,7 +183,7 @@ func Test_DeleteOutputProposal(t *testing.T) { err = input.OPHostKeeper.SetBridgeConfig(ctx, 1, types.BridgeConfig{ Proposer: addrsStr[0], - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, SubmissionInterval: 100, FinalizationPeriod: time.Second * 10, SubmissionStartTime: time.Now().UTC(), diff --git a/x/ophost/keeper/querier_test.go b/x/ophost/keeper/querier_test.go index 1bc1893f..7dfaebd7 100644 --- a/x/ophost/keeper/querier_test.go +++ b/x/ophost/keeper/querier_test.go @@ -13,7 +13,7 @@ import ( func Test_QueryBridge(t *testing.T) { ctx, input := createDefaultTestInput(t) config := types.BridgeConfig{ - Challenger: addrs[0].String(), + Challengers: []string{addrs[0].String()}, Proposer: addrs[0].String(), SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, @@ -40,7 +40,7 @@ func Test_QueryBridge(t *testing.T) { func Test_QueryBridges(t *testing.T) { ctx, input := createDefaultTestInput(t) config1 := types.BridgeConfig{ - Challenger: addrs[0].String(), + Challengers: []string{addrs[0].String()}, Proposer: addrs[0].String(), SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, @@ -49,7 +49,7 @@ func Test_QueryBridges(t *testing.T) { BatchInfo: types.BatchInfo{Submitter: addrsStr[0], Chain: "l1"}, } config2 := types.BridgeConfig{ - Challenger: addrs[1].String(), + Challengers: []string{addrs[1].String()}, Proposer: addrs[0].String(), SubmissionInterval: time.Second * 10, FinalizationPeriod: time.Second * 60, @@ -182,7 +182,7 @@ func Test_QueryLastFinalizedOutput(t *testing.T) { err := input.OPHostKeeper.SetBridgeConfig(ctx, 1, types.BridgeConfig{ Proposer: addrsStr[0], - Challenger: addrsStr[1], + Challengers: []string{addrsStr[1]}, SubmissionInterval: 100, FinalizationPeriod: time.Second * 10, SubmissionStartTime: time.Now().UTC(), diff --git a/x/ophost/types/bridge_config.go b/x/ophost/types/bridge_config.go index f40b35b3..1744c00a 100644 --- a/x/ophost/types/bridge_config.go +++ b/x/ophost/types/bridge_config.go @@ -1,6 +1,7 @@ package types import ( + "slices" time "time" "cosmossdk.io/core/address" @@ -9,8 +10,17 @@ import ( ) func (config BridgeConfig) Validate(ac address.Codec) error { - if _, err := ac.StringToBytes(config.Challenger); err != nil { - return err + challengerDupMap := make(map[string]bool, len(config.Challengers)) + for _, challenger := range config.Challengers { + if _, err := ac.StringToBytes(challenger); err != nil { + return err + } + + if _, ok := challengerDupMap[challenger]; ok { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "challengers must be unique") + } + + challengerDupMap[challenger] = true } if _, err := ac.StringToBytes(config.Proposer); err != nil { @@ -25,6 +35,10 @@ func (config BridgeConfig) Validate(ac address.Codec) error { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "batch submitter must be set") } + if !config.isValidChallengers() { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "challengers must be non-empty array") + } + if config.FinalizationPeriod == time.Duration(0) { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "finalization period must be greater than 0") } @@ -45,15 +59,15 @@ func (config BridgeConfig) ValidateWithNoAddrValidation() error { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "proposer must be set") } - if len(config.Challenger) == 0 { - return errors.Wrapf(sdkerrors.ErrInvalidRequest, "challenger must be set") + if !config.isValidChallengers() { + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "challengers must be non-empty array") } if len(config.BatchInfo.Chain) == 0 { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "batch chain must be set") } - if len(config.BatchInfo.Submitter) == 0 { + if config.BatchInfo.Submitter == "" { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "batch submitter must be set") } @@ -71,3 +85,15 @@ func (config BridgeConfig) ValidateWithNoAddrValidation() error { return nil } + +func (config BridgeConfig) isValidChallengers() bool { + if len(config.Challengers) == 0 { + return false + } + + if slices.Contains(config.Challengers, "") { + return false + } + + return true +} diff --git a/x/ophost/types/codec.go b/x/ophost/types/codec.go index 542c4bf6..ce6b612c 100644 --- a/x/ophost/types/codec.go +++ b/x/ophost/types/codec.go @@ -18,7 +18,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgInitiateTokenDeposit{}, "ophost/MsgInitiateTokenDeposit") legacy.RegisterAminoMsg(cdc, &MsgFinalizeTokenWithdrawal{}, "ophost/MsgFinalizeTokenWithdrawal") legacy.RegisterAminoMsg(cdc, &MsgUpdateProposer{}, "ophost/MsgUpdateProposer") - legacy.RegisterAminoMsg(cdc, &MsgUpdateChallenger{}, "ophost/MsgUpdateChallenger") + legacy.RegisterAminoMsg(cdc, &MsgUpdateChallengers{}, "ophost/MsgUpdateChallengers") legacy.RegisterAminoMsg(cdc, &MsgUpdateBatchInfo{}, "ophost/MsgUpdateBatchInfo") legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "ophost/MsgUpdateParams") @@ -36,7 +36,7 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { &MsgInitiateTokenDeposit{}, &MsgFinalizeTokenWithdrawal{}, &MsgUpdateProposer{}, - &MsgUpdateChallenger{}, + &MsgUpdateChallengers{}, &MsgUpdateBatchInfo{}, &MsgUpdateParams{}, ) diff --git a/x/ophost/types/error.go b/x/ophost/types/error.go index 2025420b..08ed3c6b 100644 --- a/x/ophost/types/error.go +++ b/x/ophost/types/error.go @@ -19,4 +19,5 @@ var ( ErrEmptyBatchInfo = errorsmod.Register(ModuleName, 12, "empty batch info") ErrInvalidBridgeMetadata = errorsmod.Register(ModuleName, 13, "invalid bridge metadata") ErrInvalidBatchInfo = errorsmod.Register(ModuleName, 14, "invalid batch info") + ErrInvalidChallengerUpdate = errorsmod.Register(ModuleName, 15, "invalid challenger update") ) diff --git a/x/ophost/types/hook/bridge_hook.go b/x/ophost/types/hook/bridge_hook.go index 831775a4..d493ce8c 100644 --- a/x/ophost/types/hook/bridge_hook.go +++ b/x/ophost/types/hook/bridge_hook.go @@ -2,7 +2,9 @@ package hook import ( "context" + "errors" + "cosmossdk.io/collections" "cosmossdk.io/core/address" sdk "github.com/cosmos/cosmos-sdk/types" @@ -25,7 +27,8 @@ type ChannelKeeper interface { type PermKeeper interface { HasPermission(ctx context.Context, portID, channelID string, relayer sdk.AccAddress) (bool, error) - SetPermissionedRelayer(ctx context.Context, portID, channelID string, relayer sdk.AccAddress) error + SetPermissionedRelayers(ctx context.Context, portID, channelID string, relayers []sdk.AccAddress) error + GetPermissionedRelayers(ctx context.Context, portID, channelID string) ([]sdk.AccAddress, error) } func NewBridgeHook(channelKeeper ChannelKeeper, permKeeper PermKeeper, ac address.Codec) BridgeHook { @@ -42,22 +45,39 @@ func (h BridgeHook) BridgeCreated( return nil } - challenger, err := h.ac.StringToBytes(bridgeConfig.Challenger) - if err != nil { - return err + // TODO (reviewer): This is a temporary solution to allow only one challenger on bridge creation. + if len(bridgeConfig.Challengers) != 1 { + return errors.New("bridge must have exactly one challenger on creation") + } + + challengers := make([]sdk.AccAddress, len(bridgeConfig.Challengers)) + for i, challenger := range bridgeConfig.Challengers { + challengerAddr, err := h.ac.StringToBytes(challenger) + if err != nil { + return err + } + + challengers[i] = challengerAddr } sdkCtx := sdk.UnwrapSDKContext(ctx) for _, permChannel := range metadata.PermChannels { portID, channelID := permChannel.PortID, permChannel.ChannelID if seq, ok := h.IBCChannelKeeper.GetNextSequenceSend(sdkCtx, portID, channelID); !ok { - return channeltypes.ErrChannelNotFound.Wrap("failed to register permissioned relayer") + return channeltypes.ErrChannelNotFound.Wrap("failed to get next sequence send") } else if seq != 1 { - return channeltypes.ErrChannelExists.Wrap("cannot register permissioned relayer for the channel in use") + return channeltypes.ErrChannelExists.Wrap("cannot register permissioned relayers for the channel in use") } - // register challenger as channel relayer - if err = h.IBCPermKeeper.SetPermissionedRelayer(sdkCtx, portID, channelID, challenger); err != nil { + // check if the channel has a permissioned relayer + if _, err := h.IBCPermKeeper.GetPermissionedRelayers(ctx, portID, channelID); err == nil { + return channeltypes.ErrChannelExists.Wrap("cannot register permissioned relayers for the channel in use") + } else if !errors.Is(err, collections.ErrNotFound) { + return err + } + + // register challengers as channel relayer + if err := h.IBCPermKeeper.SetPermissionedRelayers(sdkCtx, portID, channelID, challengers); err != nil { return err } } @@ -65,7 +85,7 @@ func (h BridgeHook) BridgeCreated( return nil } -func (h BridgeHook) BridgeChallengerUpdated( +func (h BridgeHook) BridgeChallengersUpdated( ctx context.Context, bridgeId uint64, bridgeConfig ophosttypes.BridgeConfig, @@ -75,17 +95,21 @@ func (h BridgeHook) BridgeChallengerUpdated( return nil } - challenger, err := h.ac.StringToBytes(bridgeConfig.Challenger) - if err != nil { - return err + challengers := make([]sdk.AccAddress, len(bridgeConfig.Challengers)) + for i, challenger := range bridgeConfig.Challengers { + challengerAddr, err := h.ac.StringToBytes(challenger) + if err != nil { + return err + } + + challengers[i] = challengerAddr } sdkCtx := sdk.UnwrapSDKContext(ctx) for _, permChannel := range metadata.PermChannels { portID, channelID := permChannel.PortID, permChannel.ChannelID - - // update relayer to a new challenger - if err = h.IBCPermKeeper.SetPermissionedRelayer(sdkCtx, portID, channelID, challenger); err != nil { + // register challengers as channel relayers + if err := h.IBCPermKeeper.SetPermissionedRelayers(sdkCtx, portID, channelID, challengers); err != nil { return err } } @@ -120,19 +144,33 @@ func (h BridgeHook) BridgeMetadataUpdated( return nil } - challenger, err := h.ac.StringToBytes(bridgeConfig.Challenger) - if err != nil { - return err + challengers := make([]sdk.AccAddress, len(bridgeConfig.Challengers)) + for i, challenger := range bridgeConfig.Challengers { + challengerAddr, err := h.ac.StringToBytes(challenger) + if err != nil { + return err + } + + challengers[i] = challengerAddr } sdkCtx := sdk.UnwrapSDKContext(ctx) for _, permChannel := range metadata.PermChannels { portID, channelID := permChannel.PortID, permChannel.ChannelID - // check if the relayer is already registered as a permissioned relayer - if hasPermission, err := h.IBCPermKeeper.HasPermission(ctx, portID, channelID, challenger); err != nil { - return err - } else if hasPermission { + hasPermission := true + + // check if the challengers are already registered as a permissioned relayers + for _, challenger := range challengers { + if hasPerm, err := h.IBCPermKeeper.HasPermission(ctx, portID, channelID, challenger); err != nil { + return err + } else if !hasPerm { + hasPermission = false + break + } + } + + if hasPermission { continue } @@ -142,8 +180,8 @@ func (h BridgeHook) BridgeMetadataUpdated( return channeltypes.ErrChannelExists.Wrap("cannot register permissioned relayer for the channel in use") } - // register challenger as channel relayer - if err = h.IBCPermKeeper.SetPermissionedRelayer(sdkCtx, portID, channelID, challenger); err != nil { + // register challengers as channel relayers + if err := h.IBCPermKeeper.SetPermissionedRelayers(sdkCtx, portID, channelID, challengers); err != nil { return err } } diff --git a/x/ophost/types/hook/bridge_hook_test.go b/x/ophost/types/hook/bridge_hook_test.go index ce68bc2c..0f3d239f 100644 --- a/x/ophost/types/hook/bridge_hook_test.go +++ b/x/ophost/types/hook/bridge_hook_test.go @@ -6,6 +6,7 @@ import ( "testing" "time" + "cosmossdk.io/collections" "cosmossdk.io/log" "cosmossdk.io/store" "cosmossdk.io/store/metrics" @@ -14,6 +15,8 @@ import ( dbm "github.com/cosmos/cosmos-db" "github.com/cosmos/cosmos-sdk/codec/address" sdk "github.com/cosmos/cosmos-sdk/types" + channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" + "github.com/stretchr/testify/require" ophosttypes "github.com/initia-labs/OPinit/x/ophost/types" @@ -32,19 +35,52 @@ func (k MockChannelKeeper) GetNextSequenceSend(ctx sdk.Context, portID, channelI return seq, ok } +type MockPermissionRelayers struct { + Relayers []string +} + +func (l MockPermissionRelayers) HasRelayer(relayer string) bool { + for _, r := range l.Relayers { + if r == relayer { + return true + } + } + return false +} + +type MockPermRelayerList struct { + Relayers []sdk.AccAddress +} + +func (l MockPermRelayerList) Equals(relayer sdk.AccAddress) bool { + for _, r := range l.Relayers { + if r.Equals(relayer) { + return true + } + } + return false +} + type MockPermKeeper struct { - perms map[string]sdk.AccAddress + perms map[string]MockPermRelayerList } func (k MockPermKeeper) HasPermission(ctx context.Context, portID, channelID string, relayer sdk.AccAddress) (bool, error) { return k.perms[portID+"/"+channelID].Equals(relayer), nil } -func (k MockPermKeeper) SetPermissionedRelayer(ctx context.Context, portID, channelID string, relayer sdk.AccAddress) error { - k.perms[portID+"/"+channelID] = relayer +func (k MockPermKeeper) SetPermissionedRelayers(ctx context.Context, portID, channelID string, relayers []sdk.AccAddress) error { + k.perms[portID+"/"+channelID] = MockPermRelayerList{Relayers: relayers} return nil } +func (k MockPermKeeper) GetPermissionedRelayers(ctx context.Context, portID, channelID string) ([]sdk.AccAddress, error) { + if _, ok := k.perms[portID+"/"+channelID]; !ok { + return nil, collections.ErrNotFound + } + return k.perms[portID+"/"+channelID].Relayers, nil +} + func setup() (context.Context, hook.BridgeHook) { h := hook.NewBridgeHook(MockChannelKeeper{ sequenceIDs: map[string]uint64{ @@ -53,7 +89,7 @@ func setup() (context.Context, hook.BridgeHook) { "transfer/channel-2": 1, }, }, MockPermKeeper{ - perms: make(map[string]sdk.AccAddress), + perms: make(map[string]MockPermRelayerList), }, address.NewBech32Codec(sdk.GetConfig().GetBech32AccountAddrPrefix())) ms := store.NewCommitMultiStore(dbm.NewMemDB(), log.NewNopLogger(), metrics.NewNoOpMetrics()) @@ -65,8 +101,8 @@ func setup() (context.Context, hook.BridgeHook) { return ctx, h } -func acc_addr() sdk.AccAddress { - return sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) +func acc_addr() []sdk.AccAddress { + return []sdk.AccAddress{sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()), sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address())} } func Test_BridgeHook_BridgeCreated(t *testing.T) { @@ -94,30 +130,37 @@ func Test_BridgeHook_BridgeCreated(t *testing.T) { addr := acc_addr() err = h.BridgeCreated(ctx, 1, ophosttypes.BridgeConfig{ - Challenger: addr.String(), - Metadata: metadata, + Challengers: []string{addr[0].String()}, + Metadata: metadata, }) require.NoError(t, err) + // can't create bridge with already taken channel + err = h.BridgeCreated(ctx, 2, ophosttypes.BridgeConfig{ + Challengers: []string{addr[0].String()}, + Metadata: metadata, + }) + require.ErrorIs(t, err, channeltypes.ErrChannelExists) + // cannot take non-1 sequence channel err = h.BridgeCreated(ctx, 1, ophosttypes.BridgeConfig{ - Challenger: addr.String(), - Metadata: metadata2, + Challengers: []string{addr[0].String()}, + Metadata: metadata2, }) - require.Error(t, err) + require.ErrorIs(t, err, channeltypes.ErrChannelExists) // check permission is applied - ok, err := h.IBCPermKeeper.HasPermission(ctx, "transfer", "channel-0", addr) + ok, err := h.IBCPermKeeper.HasPermission(ctx, "transfer", "channel-0", addr[0]) require.NoError(t, err) require.True(t, ok) // check permission is applied - ok, err = h.IBCPermKeeper.HasPermission(ctx, "transfer", "channel-0", acc_addr()) + ok, err = h.IBCPermKeeper.HasPermission(ctx, "transfer", "channel-0", addr[1]) require.NoError(t, err) require.False(t, ok) } -func Test_BridgeHook_ChallengerUpdated(t *testing.T) { +func Test_BridgeHook_ChallengersUpdated(t *testing.T) { ctx, h := setup() metadata, err := json.Marshal(hook.PermsMetadata{ @@ -132,22 +175,30 @@ func Test_BridgeHook_ChallengerUpdated(t *testing.T) { addr := acc_addr() err = h.BridgeCreated(ctx, 1, ophosttypes.BridgeConfig{ - Challenger: addr.String(), - Metadata: metadata, + Challengers: []string{addr[0].String()}, + Metadata: metadata, }) require.NoError(t, err) newAddr := acc_addr() - err = h.BridgeChallengerUpdated(ctx, 1, ophosttypes.BridgeConfig{ - Challenger: newAddr.String(), - Metadata: metadata, + err = h.BridgeChallengersUpdated(ctx, 1, ophosttypes.BridgeConfig{ + Challengers: []string{newAddr[0].String(), newAddr[1].String()}, + Metadata: metadata, }) require.NoError(t, err) // check permission is applied - ok, err := h.IBCPermKeeper.HasPermission(ctx, "transfer", "channel-0", newAddr) + ok, err := h.IBCPermKeeper.HasPermission(ctx, "transfer", "channel-0", newAddr[0]) + require.NoError(t, err) + require.True(t, ok) + + ok, err = h.IBCPermKeeper.HasPermission(ctx, "transfer", "channel-0", newAddr[1]) require.NoError(t, err) require.True(t, ok) + + ok, err = h.IBCPermKeeper.HasPermission(ctx, "transfer", "channel-0", addr[0]) + require.NoError(t, err) + require.False(t, ok) } func Test_BridgeHook_MetadataUpdated(t *testing.T) { @@ -165,8 +216,8 @@ func Test_BridgeHook_MetadataUpdated(t *testing.T) { addr := acc_addr() err = h.BridgeCreated(ctx, 1, ophosttypes.BridgeConfig{ - Challenger: addr.String(), - Metadata: metadata, + Challengers: []string{addr[0].String()}, + Metadata: metadata, }) require.NoError(t, err) @@ -187,8 +238,8 @@ func Test_BridgeHook_MetadataUpdated(t *testing.T) { // cannot take non-1 sequence channel err = h.BridgeMetadataUpdated(ctx, 1, ophosttypes.BridgeConfig{ - Challenger: addr.String(), - Metadata: metadata, + Challengers: []string{addr[0].String(), addr[1].String()}, + Metadata: metadata, }) require.Error(t, err) @@ -208,13 +259,17 @@ func Test_BridgeHook_MetadataUpdated(t *testing.T) { require.NoError(t, err) err = h.BridgeMetadataUpdated(ctx, 1, ophosttypes.BridgeConfig{ - Challenger: addr.String(), - Metadata: metadata, + Challengers: []string{addr[0].String(), addr[1].String()}, + Metadata: metadata, }) require.NoError(t, err) // check permission is applied - ok, err := h.IBCPermKeeper.HasPermission(ctx, "transfer", "channel-2", addr) + ok, err := h.IBCPermKeeper.HasPermission(ctx, "transfer", "channel-2", addr[0]) require.NoError(t, err) require.True(t, ok) + + ok, err = h.IBCPermKeeper.HasPermission(ctx, "transfer", "channel-1", addr[0]) + require.NoError(t, err) + require.False(t, ok) } diff --git a/x/ophost/types/hooks.go b/x/ophost/types/hooks.go index 17e84b03..d774b934 100644 --- a/x/ophost/types/hooks.go +++ b/x/ophost/types/hooks.go @@ -8,7 +8,7 @@ type BridgeHook interface { bridgeId uint64, bridgeConfig BridgeConfig, ) error - BridgeChallengerUpdated( + BridgeChallengersUpdated( ctx context.Context, bridgeId uint64, bridgeConfig BridgeConfig, @@ -52,13 +52,13 @@ func (hooks BridgeHooks) BridgeCreated( return nil } -func (hooks BridgeHooks) BridgeChallengerUpdated( +func (hooks BridgeHooks) BridgeChallengersUpdated( ctx context.Context, bridgeId uint64, bridgeConfig BridgeConfig, ) error { for _, h := range hooks { - if err := h.BridgeChallengerUpdated(ctx, bridgeId, bridgeConfig); err != nil { + if err := h.BridgeChallengersUpdated(ctx, bridgeId, bridgeConfig); err != nil { return err } } diff --git a/x/ophost/types/tx.go b/x/ophost/types/tx.go index 3cff6a11..b91c401c 100644 --- a/x/ophost/types/tx.go +++ b/x/ophost/types/tx.go @@ -13,7 +13,7 @@ var ( _ sdk.Msg = &MsgFinalizeTokenWithdrawal{} _ sdk.Msg = &MsgInitiateTokenDeposit{} _ sdk.Msg = &MsgUpdateProposer{} - _ sdk.Msg = &MsgUpdateChallenger{} + _ sdk.Msg = &MsgUpdateChallengers{} _ sdk.Msg = &MsgUpdateBatchInfo{} _ sdk.Msg = &MsgUpdateMetadata{} _ sdk.Msg = &MsgUpdateParams{} @@ -303,23 +303,23 @@ func (msg MsgUpdateProposer) Validate(accAddressCodec address.Codec) error { return nil } -/* MsgUpdateChallenger */ +/* MsgUpdateChallengers */ -// NewMsgUpdateChallenger creates a new MsgUpdateChallenger instance. -func NewMsgUpdateChallenger( +// NewMsgUpdateChallengers creates a new MsgUpdateChallengers instance. +func NewMsgUpdateChallengers( authority string, bridgeId uint64, - newChallenger string, -) *MsgUpdateChallenger { - return &MsgUpdateChallenger{ - Authority: authority, - BridgeId: bridgeId, - NewChallenger: newChallenger, + newChallengers []string, +) *MsgUpdateChallengers { + return &MsgUpdateChallengers{ + Authority: authority, + BridgeId: bridgeId, + NewChallengers: newChallengers, } } -// Validate performs basic MsgUpdateChallenger message validation. -func (msg MsgUpdateChallenger) Validate(accAddressCodec address.Codec) error { +// Validate performs basic MsgUpdateChallengers message validation. +func (msg MsgUpdateChallengers) Validate(accAddressCodec address.Codec) error { if _, err := accAddressCodec.StringToBytes(msg.Authority); err != nil { return err } @@ -328,8 +328,22 @@ func (msg MsgUpdateChallenger) Validate(accAddressCodec address.Codec) error { return ErrInvalidBridgeId } - if _, err := accAddressCodec.StringToBytes(msg.NewChallenger); err != nil { - return err + dupCheckMap := make(map[string]bool) + for _, challenger := range msg.NewChallengers { + _, err := accAddressCodec.StringToBytes(challenger) + if err != nil { + return err + } + + if _, found := dupCheckMap[challenger]; found { + return ErrInvalidChallengerUpdate.Wrap("duplicate challenger") + } + + dupCheckMap[challenger] = true + } + + if len(msg.NewChallengers) == 0 { + return ErrInvalidChallengerUpdate.Wrap("at least one new challenger is required") } return nil diff --git a/x/ophost/types/tx.pb.go b/x/ophost/types/tx.pb.go index e2d39077..d54ce74b 100644 --- a/x/ophost/types/tx.pb.go +++ b/x/ophost/types/tx.pb.go @@ -595,26 +595,28 @@ func (m *MsgUpdateProposerResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateProposerResponse proto.InternalMessageInfo // MsgUpdateChallenger is a message to change a challenger -type MsgUpdateChallenger struct { +type MsgUpdateChallengers struct { // authority is the address that controls the module (defaults to x/gov unless overwritten) // or the current challenger address. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` - BridgeId uint64 `protobuf:"varint,2,opt,name=bridge_id,json=bridgeId,proto3" json:"bridge_id,omitempty" yaml:"bridge_id"` - NewChallenger string `protobuf:"bytes,3,opt,name=new_challenger,json=newChallenger,proto3" json:"new_challenger,omitempty" yaml:"new_challenger"` + // + // If the given authority is a challenger address, it has the ability to replace itself with another address. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` + BridgeId uint64 `protobuf:"varint,2,opt,name=bridge_id,json=bridgeId,proto3" json:"bridge_id,omitempty" yaml:"bridge_id"` + NewChallengers []string `protobuf:"bytes,3,rep,name=new_challengers,json=newChallengers,proto3" json:"new_challengers,omitempty" yaml:"new_challengers"` } -func (m *MsgUpdateChallenger) Reset() { *m = MsgUpdateChallenger{} } -func (m *MsgUpdateChallenger) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateChallenger) ProtoMessage() {} -func (*MsgUpdateChallenger) Descriptor() ([]byte, []int) { +func (m *MsgUpdateChallengers) Reset() { *m = MsgUpdateChallengers{} } +func (m *MsgUpdateChallengers) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateChallengers) ProtoMessage() {} +func (*MsgUpdateChallengers) Descriptor() ([]byte, []int) { return fileDescriptor_d16af6eaf4088d05, []int{14} } -func (m *MsgUpdateChallenger) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateChallengers) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateChallenger) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateChallengers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateChallenger.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateChallengers.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -624,38 +626,38 @@ func (m *MsgUpdateChallenger) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *MsgUpdateChallenger) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateChallenger.Merge(m, src) +func (m *MsgUpdateChallengers) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateChallengers.Merge(m, src) } -func (m *MsgUpdateChallenger) XXX_Size() int { +func (m *MsgUpdateChallengers) XXX_Size() int { return m.Size() } -func (m *MsgUpdateChallenger) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateChallenger.DiscardUnknown(m) +func (m *MsgUpdateChallengers) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateChallengers.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateChallenger proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateChallengers proto.InternalMessageInfo -// MsgUpdateChallengerResponse returns a message handle result. -type MsgUpdateChallengerResponse struct { +// MsgUpdateChallengersResponse returns a message handle result. +type MsgUpdateChallengersResponse struct { // last finalized output index OutputIndex uint64 `protobuf:"varint,1,opt,name=output_index,json=outputIndex,proto3" json:"output_index,omitempty"` // last finalized l2 block number L2BlockNumber uint64 `protobuf:"varint,2,opt,name=l2_block_number,json=l2BlockNumber,proto3" json:"l2_block_number,omitempty"` } -func (m *MsgUpdateChallengerResponse) Reset() { *m = MsgUpdateChallengerResponse{} } -func (m *MsgUpdateChallengerResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateChallengerResponse) ProtoMessage() {} -func (*MsgUpdateChallengerResponse) Descriptor() ([]byte, []int) { +func (m *MsgUpdateChallengersResponse) Reset() { *m = MsgUpdateChallengersResponse{} } +func (m *MsgUpdateChallengersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateChallengersResponse) ProtoMessage() {} +func (*MsgUpdateChallengersResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d16af6eaf4088d05, []int{15} } -func (m *MsgUpdateChallengerResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpdateChallengersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpdateChallengerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpdateChallengersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpdateChallengerResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpdateChallengersResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -665,17 +667,17 @@ func (m *MsgUpdateChallengerResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *MsgUpdateChallengerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateChallengerResponse.Merge(m, src) +func (m *MsgUpdateChallengersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateChallengersResponse.Merge(m, src) } -func (m *MsgUpdateChallengerResponse) XXX_Size() int { +func (m *MsgUpdateChallengersResponse) XXX_Size() int { return m.Size() } -func (m *MsgUpdateChallengerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateChallengerResponse.DiscardUnknown(m) +func (m *MsgUpdateChallengersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateChallengersResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpdateChallengerResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUpdateChallengersResponse proto.InternalMessageInfo // MsgUpdateBatchInfo is a message to change a batch info type MsgUpdateBatchInfo struct { @@ -764,6 +766,9 @@ var xxx_messageInfo_MsgUpdateBatchInfoResponse proto.InternalMessageInfo type MsgUpdateMetadata struct { // authority is the address that controls the module (defaults to x/gov unless overwritten) // or the current challenger address. + // + // If the given authority is a challenger address, it has the ability to replace oneself to another address or remove + // oneself. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"` BridgeId uint64 `protobuf:"varint,2,opt,name=bridge_id,json=bridgeId,proto3" json:"bridge_id,omitempty" yaml:"bridge_id"` Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty" yaml:"metadata"` @@ -937,8 +942,8 @@ func init() { proto.RegisterType((*MsgFinalizeTokenWithdrawalResponse)(nil), "opinit.ophost.v1.MsgFinalizeTokenWithdrawalResponse") proto.RegisterType((*MsgUpdateProposer)(nil), "opinit.ophost.v1.MsgUpdateProposer") proto.RegisterType((*MsgUpdateProposerResponse)(nil), "opinit.ophost.v1.MsgUpdateProposerResponse") - proto.RegisterType((*MsgUpdateChallenger)(nil), "opinit.ophost.v1.MsgUpdateChallenger") - proto.RegisterType((*MsgUpdateChallengerResponse)(nil), "opinit.ophost.v1.MsgUpdateChallengerResponse") + proto.RegisterType((*MsgUpdateChallengers)(nil), "opinit.ophost.v1.MsgUpdateChallengers") + proto.RegisterType((*MsgUpdateChallengersResponse)(nil), "opinit.ophost.v1.MsgUpdateChallengersResponse") proto.RegisterType((*MsgUpdateBatchInfo)(nil), "opinit.ophost.v1.MsgUpdateBatchInfo") proto.RegisterType((*MsgUpdateBatchInfoResponse)(nil), "opinit.ophost.v1.MsgUpdateBatchInfoResponse") proto.RegisterType((*MsgUpdateMetadata)(nil), "opinit.ophost.v1.MsgUpdateMetadata") @@ -950,107 +955,108 @@ func init() { func init() { proto.RegisterFile("opinit/ophost/v1/tx.proto", fileDescriptor_d16af6eaf4088d05) } var fileDescriptor_d16af6eaf4088d05 = []byte{ - // 1600 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcf, 0x6f, 0x13, 0xc7, - 0x17, 0xb7, 0x4d, 0x12, 0xe2, 0x71, 0x7e, 0x2e, 0x21, 0x71, 0x16, 0xe4, 0x4d, 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0x70, 0x04, - 0xaf, 0x83, 0x7c, 0x5c, 0x26, 0x19, 0x5f, 0x06, 0x13, 0xe2, 0x08, 0xdb, 0x69, 0xa0, 0x07, 0x82, - 0x74, 0xe1, 0xd3, 0xb6, 0x27, 0x82, 0x2f, 0x79, 0x19, 0xde, 0x44, 0x2d, 0x44, 0x7d, 0xda, 0x2b, - 0x00, 0xd4, 0x9b, 0x66, 0xab, 0x85, 0x1c, 0x4b, 0x12, 0xbf, 0xde, 0xef, 0x69, 0xb3, 0xa2, 0x40, - 0xa4, 0x6e, 0x38, 0xf5, 0xa1, 0x0d, 0x4e, 0x42, 0x7e, 0x39, 0xe6, 0x38, 0x67, 0x7e, 0xa1, 0xdf, - 0xd3, 0xce, 0x44, 0x98, 0x63, 0x5a, 0x18, 0x89, 0xa8, 0xbc, 0xea, 0x71, 0x17, 0x3a, 0x3f, 0x56, - 0xad, 0xe1, 0x48, 0xe1, 0x22, 0xab, 0xd6, 0xb0, 0x48, 0x7e, 0x9f, 0x2f, 0x33, 0x4c, 0xb7, 0xed, - 0xd8, 0xd4, 0x36, 0x29, 0xfa, 0x08, 0xdf, 0x47, 0xce, 0x4d, 0xd4, 0xc1, 0xc4, 0xa6, 0xca, 0x0d, - 0x30, 0x46, 0x90, 0xd3, 0x90, 0xe4, 0x5c, 0x0a, 0xbe, 0x1e, 0x2e, 0x1f, 0x4e, 0x8c, 0x30, 0x3c, - 0x09, 0x29, 0xff, 0x07, 0x19, 0x8a, 0x19, 0x15, 0x59, 0xfd, 0x62, 0xbf, 0xa7, 0x65, 0x39, 0x96, - 0xe2, 0xe1, 0xa7, 0x65, 0x28, 0x56, 0x2a, 0x60, 0xcc, 0x6c, 0xe3, 0xae, 0xc3, 0xeb, 0x2f, 0xb7, - 0xb9, 0x58, 0x14, 0x50, 0x6f, 0x20, 0x14, 0xc5, 0x40, 0x28, 0x6e, 0x61, 0xdb, 0x89, 0x77, 0x02, - 0x6e, 0xe6, 0x77, 0x02, 0xbe, 0x52, 0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x43, 0x94, 0xab, 0x00, 0x10, 0x6a, - 0x52, 0xc4, 0xfb, 0x6e, 0x96, 0x19, 0x9c, 0x0d, 0x3a, 0x58, 0xa0, 0x83, 0x46, 0x96, 0x2d, 0xbc, - 0xae, 0xeb, 0xe5, 0x98, 0x50, 0xec, 0x9a, 0x96, 0xb0, 0x03, 0xcc, 0x2e, 0x94, 0xe3, 0xb0, 0x16, - 0x1a, 0x39, 0xb1, 0x64, 0xb6, 0xb7, 0xc1, 0x6c, 0xcb, 0xa4, 0x88, 0x50, 0x31, 0x11, 0x9a, 0x26, - 0x69, 0xe6, 0x73, 0x6c, 0x83, 0xf3, 0xfd, 0x9e, 0x96, 0x17, 0x03, 0x23, 0x0e, 0x81, 0xc6, 0x34, - 0x97, 0xb1, 0xb1, 0x71, 0xdb, 0x24, 0xcd, 0xf2, 0x15, 0xd6, 0xfb, 0x7d, 0xe2, 0xbd, 0x8f, 0x65, - 0x39, 0xf8, 0x58, 0x86, 0x54, 0x34, 0xbc, 0x00, 0xe0, 0x70, 0xad, 0xec, 0x69, 0x3f, 0x64, 0xc0, - 0x6c, 0x85, 0x58, 0x1f, 0x77, 0x1a, 0x26, 0x45, 0x3b, 0xfe, 0x70, 0xbc, 0x03, 0xb2, 0x66, 0x97, - 0x36, 0xb1, 0x6b, 0xd3, 0x83, 0xc1, 0x5b, 0x98, 0x54, 0x1d, 0x71, 0x0b, 0x93, 0x98, 0x93, 0x7c, - 0x59, 0x06, 0x98, 0x70, 0xd0, 0x7e, 0x55, 0x0e, 0x7a, 0xde, 0xe0, 0x4a, 0x01, 0xeb, 0x61, 0xed, - 0x70, 0x27, 0x72, 0x0e, 0xda, 0xf7, 0x43, 0x2a, 0x5f, 0x66, 0x17, 0x34, 0xe9, 0x96, 0x47, 0x62, - 0x3e, 0x20, 0x31, 0x1a, 0x3f, 0xdc, 0x05, 0x8b, 0x03, 0xc2, 0xd7, 0x18, 0xa1, 0xca, 0x7f, 0x07, - 0x6f, 0x0a, 0x2c,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 0x9a, 0xec, - 0xf5, 0x47, 0x91, 0xe6, 0x83, 0x8e, 0x24, 0x6d, 0xa0, 0x87, 0xde, 0x03, 0x13, 0x91, 0xa6, 0xb7, - 0x7c, 0x14, 0xe3, 0x0c, 0x32, 0xa4, 0xd6, 0x93, 0x7a, 0x8d, 0x3a, 0xfa, 0xb5, 0x37, 0x5d, 0xf5, - 0x3b, 0x87, 0x7f, 0x16, 0x52, 0x87, 0x4f, 0x0b, 0xe9, 0x27, 0x4f, 0x0b, 0xe9, 0x3f, 0x9e, 0x16, - 0xd2, 0xdf, 0x3f, 0x2b, 0xa4, 0x9e, 0x3c, 0x2b, 0xa4, 0x7e, 0x7f, 0x56, 0x48, 0x7d, 0xbe, 0x66, - 0xd9, 0xb4, 0xd9, 0xad, 0x15, 0xeb, 0xb8, 0x5d, 0xb2, 0x59, 0x0d, 0xaf, 0xb7, 0xcc, 0x1a, 0x29, - 0xdd, 0xdd, 0x61, 0x3f, 0x95, 0x3e, 0xf0, 0x7f, 0x2c, 0x65, 0xbf, 0x94, 0xd6, 0xc6, 0xd8, 0x4f, - 0xa5, 0x57, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0x22, 0x9f, 0x9c, 0x3f, 0xf4, 0x15, 0x00, 0x00, + // 1604 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x58, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xb7, 0x9d, 0x8f, 0xc6, 0xe3, 0x34, 0x1f, 0xdb, 0x34, 0x71, 0xdc, 0xca, 0x9b, 0x0c, 0xa5, + 0xa4, 0x69, 0x6a, 0x2b, 0x69, 0x29, 0x92, 0xa5, 0x1e, 0xba, 0xa9, 0x68, 0x53, 0xc9, 0x34, 0x5a, + 0x40, 0x08, 0xa8, 0x64, 0xad, 0xed, 0xc9, 0x7a, 0x55, 0x7b, 0xc7, 0xec, 0x8c, 0x93, 0x06,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76, 0x93, 0x1b, 0xfb, + 0x9a, 0x0d, 0x58, 0xe3, 0xf6, 0xc1, 0x9f, 0xf9, 0xc4, 0xc1, 0x93, 0x7c, 0xf2, 0xf1, 0x93, 0x7c, + 0xf2, 0x8f, 0x27, 0xf9, 0xe4, 0xf7, 0x4f, 0xf3, 0x89, 0xc7, 0x4f, 0xf3, 0x89, 0xdf, 0x9f, 0xe6, + 0x13, 0x9f, 0xad, 0xd9, 0x0e, 0x6d, 0x74, 0xaa, 0x85, 0x1a, 0x6e, 0x15, 0x1d, 0x5e, 0xc6, 0x97, + 0x9a, 0x56, 0x95, 0x14, 0xef, 0x6c, 0xf3, 0xdf, 0x4c, 0xef, 0xfb, 0xbf, 0x9a, 0xf2, 0x9f, 0x4c, + 0xab, 0xe3, 0xfc, 0x37, 0xd3, 0xcb, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x85, 0xea, 0x3c, + 0xfd, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1079,8 +1085,8 @@ type MsgClient interface { FinalizeTokenWithdrawal(ctx context.Context, in *MsgFinalizeTokenWithdrawal, opts ...grpc.CallOption) (*MsgFinalizeTokenWithdrawalResponse, error) // UpdateProposer defines a rpc handler method for MsgUpdateProposer. UpdateProposer(ctx context.Context, in *MsgUpdateProposer, opts ...grpc.CallOption) (*MsgUpdateProposerResponse, error) - // UpdateChallenger defines a rpc handler method for MsgUpdateChallenger. - UpdateChallenger(ctx context.Context, in *MsgUpdateChallenger, opts ...grpc.CallOption) (*MsgUpdateChallengerResponse, error) + // UpdateChallengers defines a rpc handler method for MsgUpdateChallengers. + UpdateChallengers(ctx context.Context, in *MsgUpdateChallengers, opts ...grpc.CallOption) (*MsgUpdateChallengersResponse, error) // UpdateBatchInfo defines a rpc handler method for MsgUpdateBatchInfo. UpdateBatchInfo(ctx context.Context, in *MsgUpdateBatchInfo, opts ...grpc.CallOption) (*MsgUpdateBatchInfoResponse, error) // UpdateMetadata defines a rpc handler method for MsgUpdateMetadata. @@ -1161,9 +1167,9 @@ func (c *msgClient) UpdateProposer(ctx context.Context, in *MsgUpdateProposer, o return out, nil } -func (c *msgClient) UpdateChallenger(ctx context.Context, in *MsgUpdateChallenger, opts ...grpc.CallOption) (*MsgUpdateChallengerResponse, error) { - out := new(MsgUpdateChallengerResponse) - err := c.cc.Invoke(ctx, "/opinit.ophost.v1.Msg/UpdateChallenger", in, out, opts...) +func (c *msgClient) UpdateChallengers(ctx context.Context, in *MsgUpdateChallengers, opts ...grpc.CallOption) (*MsgUpdateChallengersResponse, error) { + out := new(MsgUpdateChallengersResponse) + err := c.cc.Invoke(ctx, "/opinit.ophost.v1.Msg/UpdateChallengers", in, out, opts...) if err != nil { return nil, err } @@ -1213,8 +1219,8 @@ type MsgServer interface { FinalizeTokenWithdrawal(context.Context, *MsgFinalizeTokenWithdrawal) (*MsgFinalizeTokenWithdrawalResponse, error) // UpdateProposer defines a rpc handler method for MsgUpdateProposer. UpdateProposer(context.Context, *MsgUpdateProposer) (*MsgUpdateProposerResponse, error) - // UpdateChallenger defines a rpc handler method for MsgUpdateChallenger. - UpdateChallenger(context.Context, *MsgUpdateChallenger) (*MsgUpdateChallengerResponse, error) + // UpdateChallengers defines a rpc handler method for MsgUpdateChallengers. + UpdateChallengers(context.Context, *MsgUpdateChallengers) (*MsgUpdateChallengersResponse, error) // UpdateBatchInfo defines a rpc handler method for MsgUpdateBatchInfo. UpdateBatchInfo(context.Context, *MsgUpdateBatchInfo) (*MsgUpdateBatchInfoResponse, error) // UpdateMetadata defines a rpc handler method for MsgUpdateMetadata. @@ -1249,8 +1255,8 @@ func (*UnimplementedMsgServer) FinalizeTokenWithdrawal(ctx context.Context, req func (*UnimplementedMsgServer) UpdateProposer(ctx context.Context, req *MsgUpdateProposer) (*MsgUpdateProposerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateProposer not implemented") } -func (*UnimplementedMsgServer) UpdateChallenger(ctx context.Context, req *MsgUpdateChallenger) (*MsgUpdateChallengerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateChallenger not implemented") +func (*UnimplementedMsgServer) UpdateChallengers(ctx context.Context, req *MsgUpdateChallengers) (*MsgUpdateChallengersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateChallengers not implemented") } func (*UnimplementedMsgServer) UpdateBatchInfo(ctx context.Context, req *MsgUpdateBatchInfo) (*MsgUpdateBatchInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateBatchInfo not implemented") @@ -1392,20 +1398,20 @@ func _Msg_UpdateProposer_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } -func _Msg_UpdateChallenger_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateChallenger) +func _Msg_UpdateChallengers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateChallengers) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).UpdateChallenger(ctx, in) + return srv.(MsgServer).UpdateChallengers(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/opinit.ophost.v1.Msg/UpdateChallenger", + FullMethod: "/opinit.ophost.v1.Msg/UpdateChallengers", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateChallenger(ctx, req.(*MsgUpdateChallenger)) + return srv.(MsgServer).UpdateChallengers(ctx, req.(*MsgUpdateChallengers)) } return interceptor(ctx, in, info, handler) } @@ -1497,8 +1503,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateProposer_Handler, }, { - MethodName: "UpdateChallenger", - Handler: _Msg_UpdateChallenger_Handler, + MethodName: "UpdateChallengers", + Handler: _Msg_UpdateChallengers_Handler, }, { MethodName: "UpdateBatchInfo", @@ -2072,7 +2078,7 @@ func (m *MsgUpdateProposerResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *MsgUpdateChallenger) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateChallengers) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2082,22 +2088,24 @@ func (m *MsgUpdateChallenger) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateChallenger) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateChallengers) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateChallenger) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateChallengers) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.NewChallenger) > 0 { - i -= len(m.NewChallenger) - copy(dAtA[i:], m.NewChallenger) - i = encodeVarintTx(dAtA, i, uint64(len(m.NewChallenger))) - i-- - dAtA[i] = 0x1a + if len(m.NewChallengers) > 0 { + for iNdEx := len(m.NewChallengers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.NewChallengers[iNdEx]) + copy(dAtA[i:], m.NewChallengers[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.NewChallengers[iNdEx]))) + i-- + dAtA[i] = 0x1a + } } if m.BridgeId != 0 { i = encodeVarintTx(dAtA, i, uint64(m.BridgeId)) @@ -2114,7 +2122,7 @@ func (m *MsgUpdateChallenger) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgUpdateChallengerResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpdateChallengersResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2124,12 +2132,12 @@ func (m *MsgUpdateChallengerResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpdateChallengerResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgUpdateChallengersResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpdateChallengerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgUpdateChallengersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2627,7 +2635,7 @@ func (m *MsgUpdateProposerResponse) Size() (n int) { return n } -func (m *MsgUpdateChallenger) Size() (n int) { +func (m *MsgUpdateChallengers) Size() (n int) { if m == nil { return 0 } @@ -2640,14 +2648,16 @@ func (m *MsgUpdateChallenger) Size() (n int) { if m.BridgeId != 0 { n += 1 + sovTx(uint64(m.BridgeId)) } - l = len(m.NewChallenger) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.NewChallengers) > 0 { + for _, s := range m.NewChallengers { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } } return n } -func (m *MsgUpdateChallengerResponse) Size() (n int) { +func (m *MsgUpdateChallengersResponse) Size() (n int) { if m == nil { return 0 } @@ -4436,7 +4446,7 @@ func (m *MsgUpdateProposerResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateChallenger) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateChallengers) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4459,10 +4469,10 @@ func (m *MsgUpdateChallenger) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateChallenger: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateChallengers: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateChallenger: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateChallengers: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4518,7 +4528,7 @@ func (m *MsgUpdateChallenger) Unmarshal(dAtA []byte) error { } case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NewChallenger", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NewChallengers", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4546,7 +4556,7 @@ func (m *MsgUpdateChallenger) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.NewChallenger = string(dAtA[iNdEx:postIndex]) + m.NewChallengers = append(m.NewChallengers, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -4569,7 +4579,7 @@ func (m *MsgUpdateChallenger) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateChallengerResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpdateChallengersResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4592,10 +4602,10 @@ func (m *MsgUpdateChallengerResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateChallengerResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpdateChallengersResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateChallengerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpdateChallengersResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/ophost/types/types.pb.go b/x/ophost/types/types.pb.go index c7c5c1b9..b8baf0c3 100644 --- a/x/ophost/types/types.pb.go +++ b/x/ophost/types/types.pb.go @@ -74,7 +74,7 @@ var xxx_messageInfo_Params proto.InternalMessageInfo // BridgeConfig defines the set of bridge config. type BridgeConfig struct { // The address of the challenger. - Challenger string `protobuf:"bytes,1,opt,name=challenger,proto3" json:"challenger,omitempty"` + Challengers []string `protobuf:"bytes,1,rep,name=challengers,proto3" json:"challengers,omitempty"` // The address of the proposer. Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` // The information about batch submission. @@ -249,7 +249,7 @@ var xxx_messageInfo_Output proto.InternalMessageInfo // BatchInfoWithOutput defines the batch information with output. type BatchInfoWithOutput struct { - BatchInfo BatchInfo `protobuf:"bytes,1,opt,name=batchInfo,proto3" json:"batchInfo"` + BatchInfo BatchInfo `protobuf:"bytes,1,opt,name=batch_info,json=batchInfo,proto3" json:"batch_info"` Output Output `protobuf:"bytes,2,opt,name=output,proto3" json:"output"` } @@ -298,56 +298,56 @@ func init() { func init() { proto.RegisterFile("opinit/ophost/v1/types.proto", fileDescriptor_29cadbd84ee898dd) } var fileDescriptor_29cadbd84ee898dd = []byte{ - // 774 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x4f, 0xeb, 0x46, - 0x10, 0x8f, 0xf9, 0x13, 0xc8, 0x86, 0x08, 0x6a, 0xa8, 0xe4, 0xa4, 0xd4, 0x8e, 0x72, 0xa8, 0x22, - 0x04, 0xb6, 0x9c, 0xb6, 0x52, 0xd5, 0x1e, 0x2a, 0x0c, 0xad, 0xc4, 0xa1, 0x10, 0x19, 0xa4, 0x4a, - 0x95, 0xaa, 0x68, 0x1d, 0x6f, 0x9c, 0x15, 0xb6, 0xd7, 0xda, 0xdd, 0x44, 0x85, 0x7e, 0x83, 0x9e, - 0x38, 0x72, 0xa4, 0x37, 0xd4, 0x13, 0x87, 0x1e, 0xfa, 0x11, 0x38, 0xa2, 0x9e, 0x7a, 0x82, 0xbe, - 0x70, 0xe0, 0xe9, 0x7d, 0x8a, 0x27, 0xef, 0x6e, 0x42, 0x04, 0x48, 0xef, 0xcf, 0x25, 0xf1, 0xcc, - 0xfc, 0x66, 0x7e, 0xb3, 0xbf, 0x19, 0x0d, 0x58, 0x27, 0x19, 0x4e, 0x31, 0x77, 0x48, 0xd6, 0x27, - 0x8c, 0x3b, 0x43, 0xd7, 0xe1, 0x27, 0x19, 0x62, 0x76, 0x46, 0x09, 0x27, 0xfa, 0x8a, 0x8c, 0xda, - 0x32, 0x6a, 0x0f, 0xdd, 0xda, 0x27, 0x30, 0xc1, 0x29, 0x71, 0xc4, 0xaf, 0x04, 0xd5, 0xcc, 0x2e, - 0x61, 0x09, 0x61, 0x4e, 0x00, 0x19, 0x72, 0x86, 0x6e, 0x80, 0x38, 0x74, 0x9d, 0x2e, 0xc1, 0xa9, - 0x8a, 0x57, 0x65, 0xbc, 0x23, 0x2c, 0x47, 0x1a, 0x2a, 0xb4, 0x16, 0x91, 0x88, 0x48, 0x7f, 0xfe, - 0xa5, 0xbc, 0x56, 0x44, 0x48, 0x14, 0x23, 0x47, 0x58, 0xc1, 0xa0, 0xe7, 0x70, 0x9c, 0x20, 0xc6, - 0x61, 0x92, 0x8d, 0x19, 0x9f, 0x02, 0xc2, 0x01, 0x85, 0x1c, 0x13, 0xc5, 0xd8, 0xf8, 0x53, 0x03, - 0xc5, 0x36, 0xa4, 0x30, 0x61, 0xfa, 0xef, 0x60, 0x85, 0xa2, 0x08, 0x33, 0x2e, 0x01, 0x9d, 0x1e, - 0x42, 0x86, 0x56, 0x9f, 0x6d, 0x96, 0x5b, 0x55, 0x5b, 0xb5, 0x92, 0xf7, 0x6d, 0xab, 0xbe, 0xed, - 0x1d, 0x82, 0x53, 0xef, 0xeb, 0xeb, 0x5b, 0xab, 0xf0, 0xd7, 0x9d, 0xd5, 0x8c, 0x30, 0xef, 0x0f, - 0x02, 0xbb, 0x4b, 0x12, 0xd5, 0xb7, 0xfa, 0xdb, 0x62, 0xe1, 0xb1, 0x12, 0x2a, 0x4f, 0x60, 0x97, - 0x0f, 0x57, 0x1b, 0x9a, 0xbf, 0x3c, 0xcd, 0xf4, 0x23, 0x42, 0xdf, 0x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x0b, 0xb0, 0x1c, 0xb7, 0x54, 0xb9, 0x74, 0x90, 0x04, 0x88, - 0x8a, 0xed, 0x9d, 0xf3, 0x2b, 0x71, 0x4b, 0xa0, 0xf6, 0x85, 0xb3, 0x71, 0xae, 0x81, 0xd5, 0x89, - 0x4e, 0x3f, 0x63, 0xde, 0x57, 0xfd, 0xee, 0x82, 0xc7, 0xf5, 0x15, 0xdd, 0x7e, 0xd4, 0xde, 0x7f, - 0x07, 0x8a, 0xf2, 0x89, 0xea, 0x35, 0xc6, 0xf3, 0x12, 0x92, 0x6f, 0x3a, 0x5f, 0xa5, 0x78, 0xfb, - 0xd7, 0xaf, 0xcc, 0xc2, 0xe5, 0xc8, 0xd4, 0xae, 0x47, 0xa6, 0x76, 0x33, 0x32, 0xb5, 0xff, 0x47, - 0xa6, 0x76, 0x76, 0x6f, 0x16, 0x6e, 0xee, 0xcd, 0xc2, 0x7f, 0xf7, 0x66, 0xe1, 0x97, 0xcd, 0xa9, - 0xd3, 0x93, 0x97, 0xc5, 0x70, 0x2b, 0x86, 0x01, 0x73, 0x0e, 0xda, 0xe2, 0x5c, 0xff, 0x36, 0x3e, - 0xd8, 0xe2, 0x08, 0x05, 0x45, 0x21, 0xe1, 0x97, 0x6f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x05, 0x59, - 0x2b, 0x3b, 0xce, 0x05, 0x00, 0x00, + // 776 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xcf, 0x74, 0xbb, 0xd9, 0x66, 0xd2, 0x68, 0x17, 0x6f, 0x91, 0x9c, 0xb0, 0xd8, 0x51, 0x0e, + 0x28, 0x5a, 0x6d, 0x6d, 0x39, 0xc0, 0x65, 0x39, 0xa0, 0xf5, 0x2e, 0x48, 0x7b, 0xa0, 0x8d, 0xdc, + 0x4a, 0x48, 0x48, 0x28,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0x9e, 0x0a, 0x75, 0x8e, 0x01, 0xac, 0x6e, 0x4f, + 0x44, 0x39, 0x11, 0x96, 0x0b, 0xeb, 0x54, 0x7d, 0x0d, 0x18, 0xa5, 0x42, 0xd5, 0x58, 0x8f, 0xa0, + 0x76, 0x45, 0x94, 0x0a, 0xeb, 0x0b, 0xd8, 0xc8, 0x82, 0x41, 0x9c, 0xd1, 0xe1, 0x9e, 0x96, 0x68, + 0xe5, 0xbf, 0x4a, 0x54, 0xcf, 0x82, 0x50, 0xa6, 0x2b, 0x69, 0x3e, 0x80, 0x8f, 0xb3, 0x9e, 0x29, + 0x57, 0x4c, 0xf2, 0x18, 0x33, 0xb5, 0xbd, 0xab, 0x51, 0x23, 0xeb, 0x29, 0xd4, 0x96, 0x72, 0x76, + 0xbe, 0x07, 0xf0, 0xe9, 0x42, 0xa7, 0x2f, 0x89, 0x18, 0x9b, 0x7e, 0xff, 0xbe, 0xf8, 0xe0, 0xff, + 0x2e, 0xfe, 0x27, 0xb0, 0xaa, 0xdf, 0x68, 0x9e, 0x63, 0xdf, 0x2d, 0xa1, 0x09, 0x97, 0xf3, 0x4d, + 0x4a, 0xb8, 0x75, 0xf6, 0xbb, 0x53, 0x39, 0x99, 0x39, 0xe0, 0x6c, 0xe6, 0x80, 0xf3, 0x99, 0x03, + 0x7e, 0x9b, 0x39, 0xe0, 0xf0, 0xca, 0xa9, 0x9c, 0x5f, 0x39, 0x95, 0x5f, 0xaf, 0x9c, 0xca, 0x57, + 0x2f, 0x96, 0xae, 0x8f, 0x2c, 0x4b, 0xd0, 0x66, 0x86, 0x62, 0xee, 0x6f, 0xf7, 0xd5, 0xc5, 0xfe, + 0x66, 0x7e, 0xb3, 0xd5, 0x1d, 0x8a, 0xab, 0x4a, 0xc3, 0x0f, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, + 0x97, 0x27, 0x99, 0xda, 0xd1, 0x05, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -398,9 +398,14 @@ func (this *BridgeConfig) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Challenger != that1.Challenger { + if len(this.Challengers) != len(that1.Challengers) { return false } + for i := range this.Challengers { + if this.Challengers[i] != that1.Challengers[i] { + return false + } + } if this.Proposer != that1.Proposer { return false } @@ -637,12 +642,14 @@ func (m *BridgeConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Challenger) > 0 { - i -= len(m.Challenger) - copy(dAtA[i:], m.Challenger) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Challenger))) - i-- - dAtA[i] = 0xa + if len(m.Challengers) > 0 { + for iNdEx := len(m.Challengers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Challengers[iNdEx]) + copy(dAtA[i:], m.Challengers[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Challengers[iNdEx]))) + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } @@ -839,9 +846,11 @@ func (m *BridgeConfig) Size() (n int) { } var l int _ = l - l = len(m.Challenger) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) + if len(m.Challengers) > 0 { + for _, s := range m.Challengers { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } } l = len(m.Proposer) if l > 0 { @@ -1048,7 +1057,7 @@ func (m *BridgeConfig) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Challenger", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Challengers", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1076,7 +1085,7 @@ func (m *BridgeConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Challenger = string(dAtA[iNdEx:postIndex]) + m.Challengers = append(m.Challengers, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: if wireType != 2 {