From 2ea883bc502be3b8f2e17f35b541db2ec6a21e6c Mon Sep 17 00:00:00 2001 From: nabarun Date: Wed, 20 Apr 2022 17:21:52 +0530 Subject: [PATCH] nameservice: return record id in setRecord message response --- docs/api/proto-docs.md | 5 + proto/vulcanize/nameservice/v1beta1/tx.proto | 1 + x/nameservice/keeper/keeper.go | 15 +- x/nameservice/keeper/msg_server.go | 4 +- x/nameservice/types/tx.pb.go | 163 ++++++++++++------- 5 files changed, 123 insertions(+), 65 deletions(-) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index b94fcb27..94e938eb 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -3153,6 +3153,11 @@ MsgSetRecord MsgSetRecordResponse +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [string](#string) | | | + + diff --git a/proto/vulcanize/nameservice/v1beta1/tx.proto b/proto/vulcanize/nameservice/v1beta1/tx.proto index 1961eadd..f66d3a11 100644 --- a/proto/vulcanize/nameservice/v1beta1/tx.proto +++ b/proto/vulcanize/nameservice/v1beta1/tx.proto @@ -43,6 +43,7 @@ message MsgSetRecord{ // MsgSetRecordResponse message MsgSetRecordResponse{ + string id = 1; } // Payload diff --git a/x/nameservice/keeper/keeper.go b/x/nameservice/keeper/keeper.go index 2dd0303f..f5fbeef9 100644 --- a/x/nameservice/keeper/keeper.go +++ b/x/nameservice/keeper/keeper.go @@ -171,7 +171,7 @@ func (k Keeper) GetRecordExpiryQueue(ctx sdk.Context) []*types.ExpiryQueueRecord } // ProcessSetRecord creates a record. -func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) error { +func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) (*types.RecordType, error) { payload := msg.Payload.ToReadablePayload() record := types.RecordType{Attributes: payload.Record, BondId: msg.BondId} @@ -179,13 +179,14 @@ func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) error resourceSignBytes, _ := record.GetSignBytes() cid, err := record.GetCID() if err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid record JSON") + return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid record JSON") } record.Id = cid if exists := k.HasRecord(ctx, record.Id); exists { - return nil + // Immutable record already exists. No-op. + return &record, nil } record.Owners = []string{} @@ -193,13 +194,13 @@ func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) error pubKey, err := legacy.PubKeyFromBytes(helpers.BytesFromBase64(sig.PubKey)) if err != nil { fmt.Println("Error decoding pubKey from bytes: ", err) - return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Invalid public key.") + return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Invalid public key.") } sigOK := pubKey.VerifySignature(resourceSignBytes, helpers.BytesFromBase64(sig.Sig)) if !sigOK { fmt.Println("Signature mismatch: ", sig.PubKey) - return sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Invalid signature.") + return nil, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "Invalid signature.") } record.Owners = append(record.Owners, pubKey.Address().String()) } @@ -208,9 +209,9 @@ func (k Keeper) ProcessSetRecord(ctx sdk.Context, msg types.MsgSetRecord) error sort.Strings(record.Owners) sdkErr := k.processRecord(ctx, &record, false) if sdkErr != nil { - return sdkErr + return nil, sdkErr } - return nil + return &record, nil } func (k Keeper) processRecord(ctx sdk.Context, record *types.RecordType, isRenewal bool) error { diff --git a/x/nameservice/keeper/msg_server.go b/x/nameservice/keeper/msg_server.go index 2c726fe1..31224b7a 100644 --- a/x/nameservice/keeper/msg_server.go +++ b/x/nameservice/keeper/msg_server.go @@ -25,7 +25,7 @@ func (m msgServer) SetRecord(c context.Context, msg *types.MsgSetRecord) (*types return nil, err } - err = m.Keeper.ProcessSetRecord(ctx, types.MsgSetRecord{ + record, err := m.Keeper.ProcessSetRecord(ctx, types.MsgSetRecord{ BondId: msg.GetBondId(), Signer: msg.GetSigner(), Payload: msg.GetPayload(), @@ -48,7 +48,7 @@ func (m msgServer) SetRecord(c context.Context, msg *types.MsgSetRecord) (*types ), }) - return &types.MsgSetRecordResponse{}, nil + return &types.MsgSetRecordResponse{Id: record.Id}, nil } func (m msgServer) SetName(c context.Context, msg *types.MsgSetName) (*types.MsgSetNameResponse, error) { diff --git a/x/nameservice/types/tx.pb.go b/x/nameservice/types/tx.pb.go index 0dd83b57..40138fb8 100644 --- a/x/nameservice/types/tx.pb.go +++ b/x/nameservice/types/tx.pb.go @@ -91,6 +91,7 @@ func (m *MsgSetRecord) GetPayload() Payload { // MsgSetRecordResponse type MsgSetRecordResponse struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (m *MsgSetRecordResponse) Reset() { *m = MsgSetRecordResponse{} } @@ -126,6 +127,13 @@ func (m *MsgSetRecordResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSetRecordResponse proto.InternalMessageInfo +func (m *MsgSetRecordResponse) GetId() string { + if m != nil { + return m.Id + } + return "" +} + // Payload type Payload struct { Record *Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` @@ -1059,62 +1067,62 @@ func init() { } var fileDescriptor_b66a805dda801ce9 = []byte{ - // 869 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6b, 0xdb, 0x48, - 0x14, 0xb6, 0xe2, 0xac, 0xbd, 0x7e, 0xde, 0x0d, 0x89, 0xd6, 0x1b, 0xbc, 0xca, 0x46, 0xf2, 0x2a, - 0x24, 0x78, 0x09, 0x6b, 0x25, 0xce, 0x2e, 0x1b, 0xb2, 0x1b, 0xd8, 0x98, 0x6d, 0x69, 0x0b, 0x2e, - 0x45, 0x39, 0x14, 0x7a, 0x09, 0xb2, 0x35, 0xc8, 0x0a, 0xb6, 0xc6, 0x68, 0xe4, 0x38, 0x6e, 0xa0, - 0xb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4a, 0xac, 0xf4, 0xe8, 0xf2, 0x5a, 0xe4, - 0xae, 0xae, 0x45, 0xee, 0xf3, 0xb5, 0xc8, 0xbd, 0xbd, 0x11, 0x63, 0x57, 0x37, 0x62, 0xec, 0xd3, - 0x8d, 0x18, 0x7b, 0xb6, 0x63, 0x98, 0x4e, 0xad, 0x55, 0x29, 0x54, 0x71, 0x43, 0x71, 0x6a, 0x9a, - 0x4d, 0x4c, 0xa2, 0x20, 0xa7, 0x86, 0xec, 0x86, 0x69, 0x39, 0xca, 0x79, 0xe4, 0xf9, 0xef, 0x74, - 0x9a, 0x88, 0x54, 0x12, 0xf4, 0xc5, 0xbf, 0xf7, 0x35, 0x00, 0x00, 0xff, 0xff, 0x82, 0x89, 0x2d, - 0xfe, 0x81, 0x0c, 0x00, 0x00, + // 878 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4d, 0x6b, 0xe3, 0x46, + 0x18, 0xb6, 0xec, 0xd4, 0xae, 0x5f, 0xb7, 0x21, 0x51, 0xdd, 0xe0, 0x2a, 0x8d, 0xe4, 0x2a, 0x24, + 0xb8, 0x84, 0x5a, 0x89, 0xd3, 0xd2, 0x90, 0x36, 0xd0, 0x98, 0xb6, 0xb4, 0x05, 0x97, 0xa2, 0x1c, + 0x0a, 0xbd, 0x04, 0xd9, 0x1a, 0x64, 0x05, 0x5b, 0x63, 0x34, 0x72, 0x1c, 0x37, 0xd0, 0x5e, 0x16, + 0x16, 0xf6, 0xb4, 0xbf, 0x62, 0xd9, 0x3f, 0xb1, 0xec, 0x35, 0xc7, 0x1c, 0xf7, 0x64, 0x96, 0xe4, + 0x1f, 0xf8, 0xba, 0x97, 0x45, 0xa3, 0xaf, 0x91, 0x3f, 0xe2, 0x8f, 0xcd, 0x6d, 0x34, 0xf3, 0x3e, + 0xef, 0xf3, 0xbc, 0xcf, 0xcc, 0xab, 0x91, 0x60, 0x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, + 0x6e, 0xbd, 0xdc, 0xc0, 0x6d, 0xc5, 0x69, 0x6a, 0x36, 0x31, 0x89, 0x82, 0x9c, 0x26, 0xb2, 0xdb, + 0xa6, 0xe5, 0x28, 0x57, 0xb1, 0xdf, 0x01, 0xa7, 0xdf, 0x41, 0xa4, 0x9e, 0xa6, 0x7f, 0x00, 0x87, + 0xef, 0x03, 0x00, 0x00, 0xff, 0xff, 0x08, 0x20, 0xb1, 0x62, 0x91, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1608,6 +1616,13 @@ func (m *MsgSetRecordResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTx(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -2271,6 +2286,10 @@ func (m *MsgSetRecordResponse) Size() (n int) { } var l int _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -2729,6 +2748,38 @@ func (m *MsgSetRecordResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgSetRecordResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:])