Rename ethereum_address to nitro_address in onboarding module (#8)

* Rename ethereum_address to nitro_address

* Use camel case for variables in gql schema

* Fix indentation in proto files

* Fix proto lint errors

---------

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
This commit is contained in:
Nabarun Gogoi 2024-07-15 15:03:44 +05:30 committed by Nabarun
parent f23f691646
commit a8a59ad0c1
13 changed files with 278 additions and 272 deletions

View File

@ -424,16 +424,16 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods {
}
var (
md_Participant protoreflect.MessageDescriptor
fd_Participant_cosmos_address protoreflect.FieldDescriptor
fd_Participant_ethereum_address protoreflect.FieldDescriptor
md_Participant protoreflect.MessageDescriptor
fd_Participant_cosmos_address protoreflect.FieldDescriptor
fd_Participant_nitro_address protoreflect.FieldDescriptor
)
func init() {
file_cerc_onboarding_v1_onboarding_proto_init()
md_Participant = File_cerc_onboarding_v1_onboarding_proto.Messages().ByName("Participant")
fd_Participant_cosmos_address = md_Participant.Fields().ByName("cosmos_address")
fd_Participant_ethereum_address = md_Participant.Fields().ByName("ethereum_address")
fd_Participant_nitro_address = md_Participant.Fields().ByName("nitro_address")
}
var _ protoreflect.Message = (*fastReflection_Participant)(nil)
@ -507,9 +507,9 @@ func (x *fastReflection_Participant) Range(f func(protoreflect.FieldDescriptor,
return
}
}
if x.EthereumAddress != "" {
value := protoreflect.ValueOfString(x.EthereumAddress)
if !f(fd_Participant_ethereum_address, value) {
if x.NitroAddress != "" {
value := protoreflect.ValueOfString(x.NitroAddress)
if !f(fd_Participant_nitro_address, value) {
return
}
}
@ -530,8 +530,8 @@ func (x *fastReflection_Participant) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "cerc.onboarding.v1.Participant.cosmos_address":
return x.CosmosAddress != ""
case "cerc.onboarding.v1.Participant.ethereum_address":
return x.EthereumAddress != ""
case "cerc.onboarding.v1.Participant.nitro_address":
return x.NitroAddress != ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@ -550,8 +550,8 @@ func (x *fastReflection_Participant) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "cerc.onboarding.v1.Participant.cosmos_address":
x.CosmosAddress = ""
case "cerc.onboarding.v1.Participant.ethereum_address":
x.EthereumAddress = ""
case "cerc.onboarding.v1.Participant.nitro_address":
x.NitroAddress = ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@ -571,8 +571,8 @@ func (x *fastReflection_Participant) Get(descriptor protoreflect.FieldDescriptor
case "cerc.onboarding.v1.Participant.cosmos_address":
value := x.CosmosAddress
return protoreflect.ValueOfString(value)
case "cerc.onboarding.v1.Participant.ethereum_address":
value := x.EthereumAddress
case "cerc.onboarding.v1.Participant.nitro_address":
value := x.NitroAddress
return protoreflect.ValueOfString(value)
default:
if descriptor.IsExtension() {
@ -596,8 +596,8 @@ func (x *fastReflection_Participant) Set(fd protoreflect.FieldDescriptor, value
switch fd.FullName() {
case "cerc.onboarding.v1.Participant.cosmos_address":
x.CosmosAddress = value.Interface().(string)
case "cerc.onboarding.v1.Participant.ethereum_address":
x.EthereumAddress = value.Interface().(string)
case "cerc.onboarding.v1.Participant.nitro_address":
x.NitroAddress = value.Interface().(string)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@ -620,8 +620,8 @@ func (x *fastReflection_Participant) Mutable(fd protoreflect.FieldDescriptor) pr
switch fd.FullName() {
case "cerc.onboarding.v1.Participant.cosmos_address":
panic(fmt.Errorf("field cosmos_address of message cerc.onboarding.v1.Participant is not mutable"))
case "cerc.onboarding.v1.Participant.ethereum_address":
panic(fmt.Errorf("field ethereum_address of message cerc.onboarding.v1.Participant is not mutable"))
case "cerc.onboarding.v1.Participant.nitro_address":
panic(fmt.Errorf("field nitro_address of message cerc.onboarding.v1.Participant is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@ -637,7 +637,7 @@ func (x *fastReflection_Participant) NewField(fd protoreflect.FieldDescriptor) p
switch fd.FullName() {
case "cerc.onboarding.v1.Participant.cosmos_address":
return protoreflect.ValueOfString("")
case "cerc.onboarding.v1.Participant.ethereum_address":
case "cerc.onboarding.v1.Participant.nitro_address":
return protoreflect.ValueOfString("")
default:
if fd.IsExtension() {
@ -712,7 +712,7 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.EthereumAddress)
l = len(x.NitroAddress)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
@ -745,10 +745,10 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if len(x.EthereumAddress) > 0 {
i -= len(x.EthereumAddress)
copy(dAtA[i:], x.EthereumAddress)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.EthereumAddress)))
if len(x.NitroAddress) > 0 {
i -= len(x.NitroAddress)
copy(dAtA[i:], x.NitroAddress)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NitroAddress)))
i--
dAtA[i] = 0x12
}
@ -842,7 +842,7 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EthereumAddress", wireType)
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NitroAddress", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@ -870,7 +870,7 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.EthereumAddress = string(dAtA[iNdEx:postIndex])
x.NitroAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@ -1440,14 +1440,15 @@ func (x *Params) GetOnboardingEnabled() bool {
return false
}
// Participant defines the data that will be stored for each enrolled participant
// Participant defines the data that will be stored for each enrolled
// participant
type Participant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
EthereumAddress string `protobuf:"bytes,2,opt,name=ethereum_address,json=ethereumAddress,proto3" json:"ethereum_address,omitempty"`
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"`
}
func (x *Participant) Reset() {
@ -1477,9 +1478,9 @@ func (x *Participant) GetCosmosAddress() string {
return ""
}
func (x *Participant) GetEthereumAddress() string {
func (x *Participant) GetNitroAddress() string {
if x != nil {
return x.EthereumAddress
return x.NitroAddress
}
return ""
}
@ -1543,40 +1544,40 @@ var file_cerc_onboarding_v1_onboarding_proto_rawDesc = []byte{
0x6c, 0x65, 0x64, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x52, 0x11,
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x22, 0xc5, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
0x64, 0x22, 0xb9, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
0x74, 0x12, 0x56, 0x0a, 0x0e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xf2, 0xde, 0x1f, 0x2b, 0x6a,
0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x0d, 0x63, 0x6f, 0x73, 0x6d,
0x6f, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x5e, 0x0a, 0x10, 0x65, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x42, 0x33, 0xf2, 0xde, 0x1f, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22,
0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x76, 0x0a, 0x0a, 0x45, 0x74, 0x68,
0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xf2, 0xde, 0x1f, 0x1d, 0x6a, 0x73,
0x6f, 0x6e, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d,
0x6c, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x07, 0x61, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6d, 0x73, 0x67,
0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22, 0x52, 0x03, 0x6d, 0x73,
0x67, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f,
0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x4f, 0x6e,
0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63,
0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67,
0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x76, 0x31,
0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x2e, 0x4f, 0x6e,
0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x65,
0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31,
0xe2, 0x02, 0x1e, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69,
0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
0x61, 0xea, 0x02, 0x14, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72,
0x64, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6f, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x52, 0x0a, 0x0d, 0x6e, 0x69, 0x74,
0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x42, 0x2d, 0xf2, 0xde, 0x1f, 0x29, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6e, 0x69, 0x74, 0x72,
0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a,
0x22, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52,
0x0c, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x76, 0x0a,
0x0a, 0x45, 0x74, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x61,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xf2, 0xde,
0x1f, 0x1d, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22,
0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52,
0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x6a, 0x73, 0x6f, 0x6e, 0x3a,
0x22, 0x6d, 0x73, 0x67, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22,
0x52, 0x03, 0x6d, 0x73, 0x67, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65,
0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31,
0x42, 0x0f, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74,
0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f,
0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72,
0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69,
0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x65, 0x72,
0x63, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca,
0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e,
0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f,
0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x4f, 0x6e,
0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@ -1000,7 +1000,8 @@ func (x *MsgOnboardParticipant) GetEthSignature() string {
return ""
}
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response type.
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
// type.
type MsgOnboardParticipantResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache

View File

@ -13,6 +13,7 @@ On having some change in the GQL schema (for example: adding a new query) update
go get github.com/99designs/gqlgen@v0.17.22
# Generate bindings
# In gql
go run github.com/99designs/gqlgen generate
```
@ -43,15 +44,15 @@ Basic node status:
moniker
}
sync {
latest_block_height
catching_up
latestBlockHeight
catchingUp
}
num_peers
numPeers
peers {
is_outbound
remote_ip
isOutbound
remoteIp
}
disk_usage
diskUsage
}
}
```
@ -68,32 +69,32 @@ Full node status:
moniker
}
sync {
latest_block_hash
latest_block_time
latest_block_height
catching_up
latestBlockHash
latestBlockTime
latestBlockHeight
catchingUp
}
validator {
address
voting_power
proposer_priority
votingPower
proposerPriority
}
validators {
address
voting_power
proposer_priority
votingPower
proposerPriority
}
num_peers
numPeers
peers {
node {
id
network
moniker
}
is_outbound
remote_ip
isOutbound
remoteIp
}
disk_usage
diskUsage
}
}
```
@ -380,8 +381,8 @@ Query participants:
```graphql
{
getParticipants {
cosmos_address
ethereum_address
cosmosAddress
nitroAddress
}
}
```

View File

@ -31,8 +31,8 @@ type Account {
}
type Participant {
cosmos_address: String! # Cosmos address of the participant who will be registered.
ethereum_address: String! # Ethereum addresss of the participant who will be registered.
cosmosAddress: String! # Cosmos address of the participant who will be registered.
nitroAddress: String! # Nitro addresss of the participant who will be registered.
}
# Value describes a DAG-JSON compatible value.
@ -111,24 +111,24 @@ type NodeInfo {
# Node sync status.
type SyncInfo {
latest_block_hash: String!
latest_block_height: String!
latest_block_time: String!
catching_up: Boolean!
latestBlockHash: String!
latestBlockHeight: String!
latestBlockTime: String!
catchingUp: Boolean!
}
# Validator set info (https://docs.tendermint.com/master/rpc/#/Info/validators).
type ValidatorInfo {
address: String!
voting_power: String!
proposer_priority: String
votingPower: String!
proposerPriority: String
}
# Network/peer info (https://docs.tendermint.com/master/rpc/#/Info/net_info).
type PeerInfo {
node: NodeInfo!
is_outbound: Boolean!
remote_ip: String!
isOutbound: Boolean!
remoteIp: String!
}
# Vulcanize laconic status.
@ -138,9 +138,9 @@ type Status {
sync: SyncInfo!
validator: ValidatorInfo
validators: [ValidatorInfo]!
num_peers: String!
numPeers: String!
peers: [PeerInfo]
disk_usage: String!
diskUsage: String!
}
# An auction bid.

View File

@ -154,8 +154,8 @@ type ComplexityRoot struct {
}
Participant struct {
CosmosAddress func(childComplexity int) int
EthereumAddress func(childComplexity int) int
CosmosAddress func(childComplexity int) int
NitroAddress func(childComplexity int) int
}
PeerInfo struct {
@ -641,21 +641,21 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.OwnerBonds.Owner(childComplexity), true
case "Participant.cosmos_address":
case "Participant.cosmosAddress":
if e.complexity.Participant.CosmosAddress == nil {
break
}
return e.complexity.Participant.CosmosAddress(childComplexity), true
case "Participant.ethereum_address":
if e.complexity.Participant.EthereumAddress == nil {
case "Participant.nitroAddress":
if e.complexity.Participant.NitroAddress == nil {
break
}
return e.complexity.Participant.EthereumAddress(childComplexity), true
return e.complexity.Participant.NitroAddress(childComplexity), true
case "PeerInfo.is_outbound":
case "PeerInfo.isOutbound":
if e.complexity.PeerInfo.IsOutbound == nil {
break
}
@ -669,7 +669,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.PeerInfo.Node(childComplexity), true
case "PeerInfo.remote_ip":
case "PeerInfo.remoteIp":
if e.complexity.PeerInfo.RemoteIP == nil {
break
}
@ -866,7 +866,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Record.References(childComplexity), true
case "Status.disk_usage":
case "Status.diskUsage":
if e.complexity.Status.DiskUsage == nil {
break
}
@ -880,7 +880,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Status.Node(childComplexity), true
case "Status.num_peers":
case "Status.numPeers":
if e.complexity.Status.NumPeers == nil {
break
}
@ -929,28 +929,28 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.StringValue.Value(childComplexity), true
case "SyncInfo.catching_up":
case "SyncInfo.catchingUp":
if e.complexity.SyncInfo.CatchingUp == nil {
break
}
return e.complexity.SyncInfo.CatchingUp(childComplexity), true
case "SyncInfo.latest_block_hash":
case "SyncInfo.latestBlockHash":
if e.complexity.SyncInfo.LatestBlockHash == nil {
break
}
return e.complexity.SyncInfo.LatestBlockHash(childComplexity), true
case "SyncInfo.latest_block_height":
case "SyncInfo.latestBlockHeight":
if e.complexity.SyncInfo.LatestBlockHeight == nil {
break
}
return e.complexity.SyncInfo.LatestBlockHeight(childComplexity), true
case "SyncInfo.latest_block_time":
case "SyncInfo.latestBlockTime":
if e.complexity.SyncInfo.LatestBlockTime == nil {
break
}
@ -964,14 +964,14 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.ValidatorInfo.Address(childComplexity), true
case "ValidatorInfo.proposer_priority":
case "ValidatorInfo.proposerPriority":
if e.complexity.ValidatorInfo.ProposerPriority == nil {
break
}
return e.complexity.ValidatorInfo.ProposerPriority(childComplexity), true
case "ValidatorInfo.voting_power":
case "ValidatorInfo.votingPower":
if e.complexity.ValidatorInfo.VotingPower == nil {
break
}
@ -3836,8 +3836,8 @@ func (ec *executionContext) fieldContext_OwnerBonds_bonds(ctx context.Context, f
return fc, nil
}
func (ec *executionContext) _Participant_cosmos_address(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Participant_cosmos_address(ctx, field)
func (ec *executionContext) _Participant_cosmosAddress(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Participant_cosmosAddress(ctx, field)
if err != nil {
return graphql.Null
}
@ -3867,7 +3867,7 @@ func (ec *executionContext) _Participant_cosmos_address(ctx context.Context, fie
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Participant_cosmos_address(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_Participant_cosmosAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Participant",
Field: field,
@ -3880,8 +3880,8 @@ func (ec *executionContext) fieldContext_Participant_cosmos_address(ctx context.
return fc, nil
}
func (ec *executionContext) _Participant_ethereum_address(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Participant_ethereum_address(ctx, field)
func (ec *executionContext) _Participant_nitroAddress(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Participant_nitroAddress(ctx, field)
if err != nil {
return graphql.Null
}
@ -3894,7 +3894,7 @@ func (ec *executionContext) _Participant_ethereum_address(ctx context.Context, f
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.EthereumAddress, nil
return obj.NitroAddress, nil
})
if err != nil {
ec.Error(ctx, err)
@ -3911,7 +3911,7 @@ func (ec *executionContext) _Participant_ethereum_address(ctx context.Context, f
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Participant_ethereum_address(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_Participant_nitroAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Participant",
Field: field,
@ -3976,8 +3976,8 @@ func (ec *executionContext) fieldContext_PeerInfo_node(ctx context.Context, fiel
return fc, nil
}
func (ec *executionContext) _PeerInfo_is_outbound(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PeerInfo_is_outbound(ctx, field)
func (ec *executionContext) _PeerInfo_isOutbound(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PeerInfo_isOutbound(ctx, field)
if err != nil {
return graphql.Null
}
@ -4007,7 +4007,7 @@ func (ec *executionContext) _PeerInfo_is_outbound(ctx context.Context, field gra
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_PeerInfo_is_outbound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_PeerInfo_isOutbound(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "PeerInfo",
Field: field,
@ -4020,8 +4020,8 @@ func (ec *executionContext) fieldContext_PeerInfo_is_outbound(ctx context.Contex
return fc, nil
}
func (ec *executionContext) _PeerInfo_remote_ip(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PeerInfo_remote_ip(ctx, field)
func (ec *executionContext) _PeerInfo_remoteIp(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PeerInfo_remoteIp(ctx, field)
if err != nil {
return graphql.Null
}
@ -4051,7 +4051,7 @@ func (ec *executionContext) _PeerInfo_remote_ip(ctx context.Context, field graph
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_PeerInfo_remote_ip(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_PeerInfo_remoteIp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "PeerInfo",
Field: field,
@ -4113,12 +4113,12 @@ func (ec *executionContext) fieldContext_Query_getStatus(ctx context.Context, fi
return ec.fieldContext_Status_validator(ctx, field)
case "validators":
return ec.fieldContext_Status_validators(ctx, field)
case "num_peers":
return ec.fieldContext_Status_num_peers(ctx, field)
case "numPeers":
return ec.fieldContext_Status_numPeers(ctx, field)
case "peers":
return ec.fieldContext_Status_peers(ctx, field)
case "disk_usage":
return ec.fieldContext_Status_disk_usage(ctx, field)
case "diskUsage":
return ec.fieldContext_Status_diskUsage(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Status", field.Name)
},
@ -4832,10 +4832,10 @@ func (ec *executionContext) fieldContext_Query_getParticipants(ctx context.Conte
IsResolver: true,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "cosmos_address":
return ec.fieldContext_Participant_cosmos_address(ctx, field)
case "ethereum_address":
return ec.fieldContext_Participant_ethereum_address(ctx, field)
case "cosmosAddress":
return ec.fieldContext_Participant_cosmosAddress(ctx, field)
case "nitroAddress":
return ec.fieldContext_Participant_nitroAddress(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type Participant", field.Name)
},
@ -5471,14 +5471,14 @@ func (ec *executionContext) fieldContext_Status_sync(ctx context.Context, field
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
switch field.Name {
case "latest_block_hash":
return ec.fieldContext_SyncInfo_latest_block_hash(ctx, field)
case "latest_block_height":
return ec.fieldContext_SyncInfo_latest_block_height(ctx, field)
case "latest_block_time":
return ec.fieldContext_SyncInfo_latest_block_time(ctx, field)
case "catching_up":
return ec.fieldContext_SyncInfo_catching_up(ctx, field)
case "latestBlockHash":
return ec.fieldContext_SyncInfo_latestBlockHash(ctx, field)
case "latestBlockHeight":
return ec.fieldContext_SyncInfo_latestBlockHeight(ctx, field)
case "latestBlockTime":
return ec.fieldContext_SyncInfo_latestBlockTime(ctx, field)
case "catchingUp":
return ec.fieldContext_SyncInfo_catchingUp(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type SyncInfo", field.Name)
},
@ -5524,10 +5524,10 @@ func (ec *executionContext) fieldContext_Status_validator(ctx context.Context, f
switch field.Name {
case "address":
return ec.fieldContext_ValidatorInfo_address(ctx, field)
case "voting_power":
return ec.fieldContext_ValidatorInfo_voting_power(ctx, field)
case "proposer_priority":
return ec.fieldContext_ValidatorInfo_proposer_priority(ctx, field)
case "votingPower":
return ec.fieldContext_ValidatorInfo_votingPower(ctx, field)
case "proposerPriority":
return ec.fieldContext_ValidatorInfo_proposerPriority(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ValidatorInfo", field.Name)
},
@ -5576,10 +5576,10 @@ func (ec *executionContext) fieldContext_Status_validators(ctx context.Context,
switch field.Name {
case "address":
return ec.fieldContext_ValidatorInfo_address(ctx, field)
case "voting_power":
return ec.fieldContext_ValidatorInfo_voting_power(ctx, field)
case "proposer_priority":
return ec.fieldContext_ValidatorInfo_proposer_priority(ctx, field)
case "votingPower":
return ec.fieldContext_ValidatorInfo_votingPower(ctx, field)
case "proposerPriority":
return ec.fieldContext_ValidatorInfo_proposerPriority(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type ValidatorInfo", field.Name)
},
@ -5587,8 +5587,8 @@ func (ec *executionContext) fieldContext_Status_validators(ctx context.Context,
return fc, nil
}
func (ec *executionContext) _Status_num_peers(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Status_num_peers(ctx, field)
func (ec *executionContext) _Status_numPeers(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Status_numPeers(ctx, field)
if err != nil {
return graphql.Null
}
@ -5618,7 +5618,7 @@ func (ec *executionContext) _Status_num_peers(ctx context.Context, field graphql
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Status_num_peers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_Status_numPeers(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Status",
Field: field,
@ -5669,10 +5669,10 @@ func (ec *executionContext) fieldContext_Status_peers(ctx context.Context, field
switch field.Name {
case "node":
return ec.fieldContext_PeerInfo_node(ctx, field)
case "is_outbound":
return ec.fieldContext_PeerInfo_is_outbound(ctx, field)
case "remote_ip":
return ec.fieldContext_PeerInfo_remote_ip(ctx, field)
case "isOutbound":
return ec.fieldContext_PeerInfo_isOutbound(ctx, field)
case "remoteIp":
return ec.fieldContext_PeerInfo_remoteIp(ctx, field)
}
return nil, fmt.Errorf("no field named %q was found under type PeerInfo", field.Name)
},
@ -5680,8 +5680,8 @@ func (ec *executionContext) fieldContext_Status_peers(ctx context.Context, field
return fc, nil
}
func (ec *executionContext) _Status_disk_usage(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Status_disk_usage(ctx, field)
func (ec *executionContext) _Status_diskUsage(ctx context.Context, field graphql.CollectedField, obj *Status) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Status_diskUsage(ctx, field)
if err != nil {
return graphql.Null
}
@ -5711,7 +5711,7 @@ func (ec *executionContext) _Status_disk_usage(ctx context.Context, field graphq
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Status_disk_usage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_Status_diskUsage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Status",
Field: field,
@ -5768,8 +5768,8 @@ func (ec *executionContext) fieldContext_StringValue_value(ctx context.Context,
return fc, nil
}
func (ec *executionContext) _SyncInfo_latest_block_hash(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SyncInfo_latest_block_hash(ctx, field)
func (ec *executionContext) _SyncInfo_latestBlockHash(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SyncInfo_latestBlockHash(ctx, field)
if err != nil {
return graphql.Null
}
@ -5799,7 +5799,7 @@ func (ec *executionContext) _SyncInfo_latest_block_hash(ctx context.Context, fie
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SyncInfo_latest_block_hash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_SyncInfo_latestBlockHash(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SyncInfo",
Field: field,
@ -5812,8 +5812,8 @@ func (ec *executionContext) fieldContext_SyncInfo_latest_block_hash(ctx context.
return fc, nil
}
func (ec *executionContext) _SyncInfo_latest_block_height(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SyncInfo_latest_block_height(ctx, field)
func (ec *executionContext) _SyncInfo_latestBlockHeight(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SyncInfo_latestBlockHeight(ctx, field)
if err != nil {
return graphql.Null
}
@ -5843,7 +5843,7 @@ func (ec *executionContext) _SyncInfo_latest_block_height(ctx context.Context, f
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SyncInfo_latest_block_height(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_SyncInfo_latestBlockHeight(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SyncInfo",
Field: field,
@ -5856,8 +5856,8 @@ func (ec *executionContext) fieldContext_SyncInfo_latest_block_height(ctx contex
return fc, nil
}
func (ec *executionContext) _SyncInfo_latest_block_time(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SyncInfo_latest_block_time(ctx, field)
func (ec *executionContext) _SyncInfo_latestBlockTime(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SyncInfo_latestBlockTime(ctx, field)
if err != nil {
return graphql.Null
}
@ -5887,7 +5887,7 @@ func (ec *executionContext) _SyncInfo_latest_block_time(ctx context.Context, fie
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SyncInfo_latest_block_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_SyncInfo_latestBlockTime(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SyncInfo",
Field: field,
@ -5900,8 +5900,8 @@ func (ec *executionContext) fieldContext_SyncInfo_latest_block_time(ctx context.
return fc, nil
}
func (ec *executionContext) _SyncInfo_catching_up(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SyncInfo_catching_up(ctx, field)
func (ec *executionContext) _SyncInfo_catchingUp(ctx context.Context, field graphql.CollectedField, obj *SyncInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_SyncInfo_catchingUp(ctx, field)
if err != nil {
return graphql.Null
}
@ -5931,7 +5931,7 @@ func (ec *executionContext) _SyncInfo_catching_up(ctx context.Context, field gra
return ec.marshalNBoolean2bool(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_SyncInfo_catching_up(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_SyncInfo_catchingUp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "SyncInfo",
Field: field,
@ -5988,8 +5988,8 @@ func (ec *executionContext) fieldContext_ValidatorInfo_address(ctx context.Conte
return fc, nil
}
func (ec *executionContext) _ValidatorInfo_voting_power(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ValidatorInfo_voting_power(ctx, field)
func (ec *executionContext) _ValidatorInfo_votingPower(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ValidatorInfo_votingPower(ctx, field)
if err != nil {
return graphql.Null
}
@ -6019,7 +6019,7 @@ func (ec *executionContext) _ValidatorInfo_voting_power(ctx context.Context, fie
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_ValidatorInfo_voting_power(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_ValidatorInfo_votingPower(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ValidatorInfo",
Field: field,
@ -6032,8 +6032,8 @@ func (ec *executionContext) fieldContext_ValidatorInfo_voting_power(ctx context.
return fc, nil
}
func (ec *executionContext) _ValidatorInfo_proposer_priority(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ValidatorInfo_proposer_priority(ctx, field)
func (ec *executionContext) _ValidatorInfo_proposerPriority(ctx context.Context, field graphql.CollectedField, obj *ValidatorInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_ValidatorInfo_proposerPriority(ctx, field)
if err != nil {
return graphql.Null
}
@ -6060,7 +6060,7 @@ func (ec *executionContext) _ValidatorInfo_proposer_priority(ctx context.Context
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_ValidatorInfo_proposer_priority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
func (ec *executionContext) fieldContext_ValidatorInfo_proposerPriority(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "ValidatorInfo",
Field: field,
@ -8787,16 +8787,16 @@ func (ec *executionContext) _Participant(ctx context.Context, sel ast.SelectionS
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("Participant")
case "cosmos_address":
case "cosmosAddress":
out.Values[i] = ec._Participant_cosmos_address(ctx, field, obj)
out.Values[i] = ec._Participant_cosmosAddress(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "ethereum_address":
case "nitroAddress":
out.Values[i] = ec._Participant_ethereum_address(ctx, field, obj)
out.Values[i] = ec._Participant_nitroAddress(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@ -8829,16 +8829,16 @@ func (ec *executionContext) _PeerInfo(ctx context.Context, sel ast.SelectionSet,
if out.Values[i] == graphql.Null {
invalids++
}
case "is_outbound":
case "isOutbound":
out.Values[i] = ec._PeerInfo_is_outbound(ctx, field, obj)
out.Values[i] = ec._PeerInfo_isOutbound(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "remote_ip":
case "remoteIp":
out.Values[i] = ec._PeerInfo_remote_ip(ctx, field, obj)
out.Values[i] = ec._PeerInfo_remoteIp(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@ -9258,9 +9258,9 @@ func (ec *executionContext) _Status(ctx context.Context, sel ast.SelectionSet, o
if out.Values[i] == graphql.Null {
invalids++
}
case "num_peers":
case "numPeers":
out.Values[i] = ec._Status_num_peers(ctx, field, obj)
out.Values[i] = ec._Status_numPeers(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@ -9269,9 +9269,9 @@ func (ec *executionContext) _Status(ctx context.Context, sel ast.SelectionSet, o
out.Values[i] = ec._Status_peers(ctx, field, obj)
case "disk_usage":
case "diskUsage":
out.Values[i] = ec._Status_disk_usage(ctx, field, obj)
out.Values[i] = ec._Status_diskUsage(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@ -9325,30 +9325,30 @@ func (ec *executionContext) _SyncInfo(ctx context.Context, sel ast.SelectionSet,
switch field.Name {
case "__typename":
out.Values[i] = graphql.MarshalString("SyncInfo")
case "latest_block_hash":
case "latestBlockHash":
out.Values[i] = ec._SyncInfo_latest_block_hash(ctx, field, obj)
out.Values[i] = ec._SyncInfo_latestBlockHash(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "latest_block_height":
case "latestBlockHeight":
out.Values[i] = ec._SyncInfo_latest_block_height(ctx, field, obj)
out.Values[i] = ec._SyncInfo_latestBlockHeight(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "latest_block_time":
case "latestBlockTime":
out.Values[i] = ec._SyncInfo_latest_block_time(ctx, field, obj)
out.Values[i] = ec._SyncInfo_latestBlockTime(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "catching_up":
case "catchingUp":
out.Values[i] = ec._SyncInfo_catching_up(ctx, field, obj)
out.Values[i] = ec._SyncInfo_catchingUp(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
@ -9381,16 +9381,16 @@ func (ec *executionContext) _ValidatorInfo(ctx context.Context, sel ast.Selectio
if out.Values[i] == graphql.Null {
invalids++
}
case "voting_power":
case "votingPower":
out.Values[i] = ec._ValidatorInfo_voting_power(ctx, field, obj)
out.Values[i] = ec._ValidatorInfo_votingPower(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "proposer_priority":
case "proposerPriority":
out.Values[i] = ec._ValidatorInfo_proposer_priority(ctx, field, obj)
out.Values[i] = ec._ValidatorInfo_proposerPriority(ctx, field, obj)
default:
panic("unknown field " + strconv.Quote(field.Name))

View File

@ -136,14 +136,14 @@ type OwnerBonds struct {
}
type Participant struct {
CosmosAddress string `json:"cosmos_address"`
EthereumAddress string `json:"ethereum_address"`
CosmosAddress string `json:"cosmosAddress"`
NitroAddress string `json:"nitroAddress"`
}
type PeerInfo struct {
Node *NodeInfo `json:"node"`
IsOutbound bool `json:"is_outbound"`
RemoteIP string `json:"remote_ip"`
IsOutbound bool `json:"isOutbound"`
RemoteIP string `json:"remoteIp"`
}
type Record struct {
@ -163,9 +163,9 @@ type Status struct {
Sync *SyncInfo `json:"sync"`
Validator *ValidatorInfo `json:"validator"`
Validators []*ValidatorInfo `json:"validators"`
NumPeers string `json:"num_peers"`
NumPeers string `json:"numPeers"`
Peers []*PeerInfo `json:"peers"`
DiskUsage string `json:"disk_usage"`
DiskUsage string `json:"diskUsage"`
}
type StringValue struct {
@ -175,16 +175,16 @@ type StringValue struct {
func (StringValue) IsValue() {}
type SyncInfo struct {
LatestBlockHash string `json:"latest_block_hash"`
LatestBlockHeight string `json:"latest_block_height"`
LatestBlockTime string `json:"latest_block_time"`
CatchingUp bool `json:"catching_up"`
LatestBlockHash string `json:"latestBlockHash"`
LatestBlockHeight string `json:"latestBlockHeight"`
LatestBlockTime string `json:"latestBlockTime"`
CatchingUp bool `json:"catchingUp"`
}
type ValidatorInfo struct {
Address string `json:"address"`
VotingPower string `json:"voting_power"`
ProposerPriority *string `json:"proposer_priority"`
VotingPower string `json:"votingPower"`
ProposerPriority *string `json:"proposerPriority"`
}
type ValueInput struct {

View File

@ -371,8 +371,8 @@ func (q queryResolver) GetParticipants(ctx context.Context) ([]*Participant, err
participants := make([]*Participant, len(participantResp.GetParticipants()))
for i, p := range participantResp.Participants {
participants[i] = &Participant{
CosmosAddress: p.CosmosAddress,
EthereumAddress: p.EthereumAddress,
CosmosAddress: p.CosmosAddress,
NitroAddress: p.NitroAddress,
}
}

View File

@ -8,28 +8,26 @@ option go_package = "git.vdb.to/cerc-io/laconicd/x/onboarding";
// Params defines the parameters of the onboarding module.
message Params {
bool onboarding_enabled = 1 [
(gogoproto.moretags) = "json:\"onboarding_enabled\" yaml:\"onboarding_enabled\""
];
bool onboarding_enabled = 1
[ (gogoproto.moretags) =
"json:\"onboarding_enabled\" yaml:\"onboarding_enabled\"" ];
}
// Participant defines the data that will be stored for each enrolled participant
// Participant defines the data that will be stored for each enrolled
// participant
message Participant {
string cosmos_address = 1 [
(gogoproto.moretags) = "json:\"cosmos_address\" yaml:\"cosmos_address\""
];
string cosmos_address = 1
[ (gogoproto.moretags) =
"json:\"cosmos_address\" yaml:\"cosmos_address\"" ];
string ethereum_address = 2 [
(gogoproto.moretags) = "json:\"ethereum_address\" yaml:\"ethereum_address\""
];
string nitro_address = 2
[ (gogoproto.moretags) =
"json:\"nitro_address\" yaml:\"nitro_address\"" ];
}
// EthPayload defines the payload that is signed by the ethereum private key
message EthPayload {
string address = 1 [
(gogoproto.moretags) = "json:\"address\" yaml:\"address\""
];
string address = 1
[ (gogoproto.moretags) = "json:\"address\" yaml:\"address\"" ];
string msg = 2 [
(gogoproto.moretags) = "json:\"msg\" yaml:\"msg\""
];
string msg = 2 [ (gogoproto.moretags) = "json:\"msg\" yaml:\"msg\"" ];
}

View File

@ -12,7 +12,8 @@ option go_package = "git.vdb.to/cerc-io/laconicd/x/onboarding";
// Query defines the gRPC querier service for onboarding module
service Query {
// Participants queries Participants list
rpc Participants(QueryParticipantsRequest) returns (QueryParticipantsResponse) {
rpc Participants(QueryParticipantsRequest)
returns (QueryParticipantsResponse) {
option (google.api.http).get = "/cerc/onboarding/v1/participants";
}
}

View File

@ -15,9 +15,9 @@ service Msg {
// OnboardParticipant defines a method for enrolling a new validator.
rpc OnboardParticipant(MsgOnboardParticipant)
returns (MsgOnboardParticipantResponse) {
option (google.api.http).post = "/cerc/onboarding/v1/onboard_participant";
};
returns (MsgOnboardParticipantResponse) {
option (google.api.http).post = "/cerc/onboarding/v1/onboard_participant";
};
}
// MsgOnboardParticipant defines a SDK message for enrolling a new validator.
@ -30,5 +30,6 @@ message MsgOnboardParticipant {
string eth_signature = 3;
}
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response type.
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
// type.
message MsgOnboardParticipantResponse {}

View File

@ -87,18 +87,19 @@ func (k Keeper) OnboardParticipant(
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid format for payload")
}
ethereumAddress, err := utils.DecodeEthereumAddress(message, msg.EthSignature)
// Decode eth address from signature which should be the nitro address of the participant
nitroAddress, err := utils.DecodeEthereumAddress(message, msg.EthSignature)
if err != nil {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Failed to decode Ethereum address")
}
if ethereumAddress != msg.EthPayload.Address {
if nitroAddress != msg.EthPayload.Address {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Recovered ethereum address does not match the address set in payload")
}
participant := &onboardingTypes.Participant{
CosmosAddress: signerAddress.String(),
EthereumAddress: ethereumAddress,
CosmosAddress: signerAddress.String(),
NitroAddress: nitroAddress,
}
if err := k.StoreParticipant(ctx, participant); err != nil {

View File

@ -68,10 +68,11 @@ func (m *Params) GetOnboardingEnabled() bool {
return false
}
// Participant defines the data that will be stored for each enrolled participant
// Participant defines the data that will be stored for each enrolled
// participant
type Participant struct {
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty" json:"cosmos_address" yaml:"cosmos_address"`
EthereumAddress string `protobuf:"bytes,2,opt,name=ethereum_address,json=ethereumAddress,proto3" json:"ethereum_address,omitempty" json:"ethereum_address" yaml:"ethereum_address"`
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty" json:"cosmos_address" yaml:"cosmos_address"`
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty" json:"nitro_address" yaml:"nitro_address"`
}
func (m *Participant) Reset() { *m = Participant{} }
@ -114,9 +115,9 @@ func (m *Participant) GetCosmosAddress() string {
return ""
}
func (m *Participant) GetEthereumAddress() string {
func (m *Participant) GetNitroAddress() string {
if m != nil {
return m.EthereumAddress
return m.NitroAddress
}
return ""
}
@ -185,29 +186,29 @@ func init() {
}
var fileDescriptor_59afed779274eaf0 = []byte{
// 346 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcd, 0x4a, 0xc3, 0x40,
0x14, 0x85, 0x1b, 0x85, 0xaa, 0x23, 0xfe, 0x0d, 0x0a, 0x2a, 0x98, 0xd4, 0xb8, 0x29, 0x14, 0x33,
0x94, 0x2e, 0x04, 0x5d, 0x19, 0xe8, 0xbe, 0x64, 0xe1, 0xc2, 0x85, 0x65, 0x92, 0x8c, 0x69, 0x24,
0xc9, 0x2d, 0x33, 0x63, 0xb0, 0x6f, 0xe1, 0x4b, 0x09, 0x2e, 0xbb, 0x74, 0x15, 0xa4, 0x7d, 0x83,
0x3c, 0x81, 0x24, 0xd3, 0xf4, 0xd7, 0xdd, 0xcc, 0xb9, 0xe7, 0x7c, 0x67, 0x60, 0x2e, 0xba, 0xf1,
0x18, 0xf7, 0x08, 0x24, 0x2e, 0x50, 0xee, 0x87, 0x49, 0x40, 0xd2, 0xf6, 0xd2, 0xcd, 0x1a, 0x72,
0x90, 0x80, 0x71, 0x61, 0xb2, 0x96, 0xe4, 0xb4, 0x7d, 0x79, 0x1a, 0x40, 0x00, 0xe5, 0x98, 0x14,
0x27, 0xe5, 0x34, 0x87, 0xa8, 0xde, 0xa3, 0x9c, 0xc6, 0x02, 0xbf, 0x22, 0xbc, 0x08, 0xf4, 0x59,
0x42, 0xdd, 0x88, 0xf9, 0xe7, 0x5a, 0x43, 0x6b, 0xee, 0xda, 0x77, 0x79, 0x66, 0x74, 0xde, 0x04,
0x24, 0xf7, 0xe6, 0xa6, 0xc7, 0x6c, 0x8c, 0x68, 0x1c, 0xfd, 0x3b, 0x71, 0x4e, 0x16, 0x62, 0x77,
0xa6, 0x7d, 0x69, 0x68, 0xbf, 0x47, 0xb9, 0x0c, 0xbd, 0x70, 0x48, 0x13, 0x89, 0x9f, 0xd0, 0xa1,
0x07, 0x22, 0x06, 0xd1, 0xa7, 0xbe, 0xcf, 0x99, 0x10, 0x65, 0xe7, 0x9e, 0x4d, 0xf2, 0xcc, 0x68,
0xa9, 0xce, 0xd5, 0x79, 0xd5, 0xb7, 0xa6, 0x3a, 0x07, 0x4a, 0x78, 0x54, 0x77, 0xfc, 0x82, 0x8e,
0x99, 0x1c, 0x30, 0xce, 0xde, 0xe3, 0x39, 0x79, 0xab, 0x24, 0x77, 0xf2, 0xcc, 0x20, 0x8a, 0xbc,
0xee, 0xa8, 0xd8, 0x1b, 0xba, 0x73, 0x54, 0x49, 0x33, 0xbe, 0x99, 0x22, 0xd4, 0x95, 0x83, 0x1e,
0x1d, 0x45, 0x40, 0x7d, 0xfc, 0x80, 0x76, 0x56, 0x9f, 0x7f, 0x9d, 0x67, 0xc6, 0x95, 0x2a, 0x59,
0x63, 0xcf, 0x91, 0x55, 0x02, 0xb7, 0xd0, 0x76, 0x2c, 0x82, 0xd9, 0xeb, 0x2e, 0xf2, 0xcc, 0x38,
0x53, 0xc1, 0x58, 0x04, 0x55, 0xa8, 0x38, 0x3a, 0x85, 0xcb, 0xb6, 0xbf, 0x27, 0xba, 0x36, 0x9e,
0xe8, 0xda, 0xef, 0x44, 0xd7, 0x3e, 0xa7, 0x7a, 0x6d, 0x3c, 0xd5, 0x6b, 0x3f, 0x53, 0xbd, 0xf6,
0xdc, 0x0c, 0x42, 0x69, 0xa5, 0xbe, 0x6b, 0x49, 0x20, 0xc5, 0x02, 0xdc, 0x86, 0x40, 0x22, 0xea,
0x41, 0x12, 0x7a, 0x3e, 0xf9, 0x58, 0xda, 0x12, 0xb7, 0x5e, 0x7e, 0x7e, 0xe7, 0x2f, 0x00, 0x00,
0xff, 0xff, 0x45, 0x07, 0xf1, 0x0c, 0x4d, 0x02, 0x00, 0x00,
// 343 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcf, 0x4a, 0xc3, 0x30,
0x1c, 0xc7, 0x57, 0x85, 0xa9, 0xd1, 0x09, 0x06, 0x05, 0x15, 0x6c, 0x67, 0xbd, 0x4c, 0xc6, 0x5a,
0xc6, 0x0e, 0x82, 0x9e, 0x2c, 0xec, 0x3e, 0x7a, 0xf0, 0xe0, 0x65, 0xa4, 0x7f, 0xac, 0x91, 0x36,
0xbf, 0x91, 0x84, 0xe2, 0xde, 0xc2, 0xd7, 0xf1, 0x0d, 0x3c, 0xee, 0xe8, 0xa9, 0xc8, 0xf6, 0x06,
0x7d, 0x02, 0x69, 0xb3, 0x6e, 0xeb, 0xf4, 0x96, 0xdf, 0xf7, 0xcf, 0xe7, 0x17, 0x48, 0xd0, 0x8d,
0x1f, 0x72, 0xdf, 0x06, 0xe6, 0x01, 0xe1, 0x01, 0x65, 0x91, 0x9d, 0xf6, 0x37, 0x26, 0x6b, 0xc2,
0x41, 0x02, 0xc6, 0x45, 0xc8, 0xda, 0x90, 0xd3, 0xfe, 0xe5, 0x69, 0x04, 0x11, 0x94, 0xb6, 0x5d,
0x9c, 0x54, 0xd2, 0x9c, 0xa0, 0xe6, 0x88, 0x70, 0x92, 0x08, 0xfc, 0x82, 0xf0, 0xba, 0x30, 0x0e,
0x19, 0xf1, 0xe2, 0x30, 0x38, 0xd7, 0xda, 0x5a, 0x67, 0xdf, 0xb9, 0xcb, 0x33, 0x63, 0xf0, 0x26,
0x80, 0xdd, 0x9b, 0x7f, 0x33, 0x66, 0x7b, 0x4a, 0x92, 0xf8, 0x5f, 0xc7, 0x3d, 0x59, 0x8b, 0xc3,
0xa5, 0xf6, 0xa9, 0xa1, 0xc3, 0x11, 0xe1, 0x92, 0xfa, 0x74, 0x42, 0x98, 0xc4, 0x4f, 0xe8, 0xd8,
0x07, 0x91, 0x80, 0x18, 0x93, 0x20, 0xe0, 0xa1, 0x10, 0xe5, 0xce, 0x03, 0xc7, 0xce, 0x33, 0xa3,
0xab, 0x76, 0xd6, 0xfd, 0x6a, 0xdf, 0x96, 0xea, 0xb6, 0x94, 0xf0, 0xa8, 0x66, 0xec, 0xa2, 0x16,
0xa3, 0x92, 0xc3, 0x0a, 0xbb, 0x53, 0x62, 0x7b, 0x79, 0x66, 0xdc, 0x2a, 0x6c, 0xcd, 0xae, 0xa8,
0x75, 0xd1, 0x3d, 0x2a, 0xe7, 0x25, 0xd3, 0x4c, 0x11, 0x1a, 0xca, 0xd7, 0x11, 0x99, 0xc6, 0x40,
0x02, 0xfc, 0x80, 0xf6, 0xea, 0x57, 0xbe, 0xce, 0x33, 0xe3, 0x4a, 0xb1, 0xb7, 0xa8, 0x2b, 0x5e,
0xd5, 0xc0, 0x5d, 0xb4, 0x9b, 0x88, 0x68, 0x79, 0xa9, 0x8b, 0x3c, 0x33, 0xce, 0x54, 0x31, 0x11,
0x51, 0x55, 0x2a, 0x8e, 0x6e, 0x91, 0x72, 0x9c, 0xaf, 0xb9, 0xae, 0xcd, 0xe6, 0xba, 0xf6, 0x33,
0xd7, 0xb5, 0x8f, 0x85, 0xde, 0x98, 0x2d, 0xf4, 0xc6, 0xf7, 0x42, 0x6f, 0x3c, 0x77, 0x22, 0x2a,
0xad, 0x34, 0xf0, 0x2c, 0x09, 0x76, 0xf1, 0xe8, 0x3d, 0x0a, 0x76, 0x4c, 0x7c, 0x60, 0xd4, 0x0f,
0xec, 0xf7, 0x8d, 0x9f, 0xe1, 0x35, 0xcb, 0x07, 0x1f, 0xfc, 0x06, 0x00, 0x00, 0xff, 0xff, 0x91,
0x47, 0xeb, 0x34, 0x41, 0x02, 0x00, 0x00,
}
func (m *Params) Marshal() (dAtA []byte, err error) {
@ -263,10 +264,10 @@ func (m *Participant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.EthereumAddress) > 0 {
i -= len(m.EthereumAddress)
copy(dAtA[i:], m.EthereumAddress)
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.EthereumAddress)))
if len(m.NitroAddress) > 0 {
i -= len(m.NitroAddress)
copy(dAtA[i:], m.NitroAddress)
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.NitroAddress)))
i--
dAtA[i] = 0x12
}
@ -350,7 +351,7 @@ func (m *Participant) Size() (n int) {
if l > 0 {
n += 1 + l + sovOnboarding(uint64(l))
}
l = len(m.EthereumAddress)
l = len(m.NitroAddress)
if l > 0 {
n += 1 + l + sovOnboarding(uint64(l))
}
@ -513,7 +514,7 @@ func (m *Participant) Unmarshal(dAtA []byte) error {
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EthereumAddress", wireType)
return fmt.Errorf("proto: wrong wireType = %d for field NitroAddress", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@ -541,7 +542,7 @@ func (m *Participant) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.EthereumAddress = string(dAtA[iNdEx:postIndex])
m.NitroAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex

View File

@ -92,7 +92,8 @@ func (m *MsgOnboardParticipant) GetEthSignature() string {
return ""
}
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response type.
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
// type.
type MsgOnboardParticipantResponse struct {
}