From 555934b79967ab68ae9b8e039de621500ab8d09a Mon Sep 17 00:00:00 2001 From: nabarun Date: Fri, 8 Apr 2022 13:03:58 +0530 Subject: [PATCH 01/10] nameservice: change Record message types for chiba-clonk-client --- go.mod | 4 +- go.sum | 7 +- gql/resolver.go | 17 +- gql/util.go | 9 +- init.sh | 2 + .../nameservice/v1beta1/nameservice.proto | 10 +- x/nameservice/genesis.go | 9 +- x/nameservice/keeper/keeper.go | 19 +- x/nameservice/keeper/record_keeper.go | 12 +- x/nameservice/types/nameservice.pb.go | 279 +++++++++--------- x/nameservice/types/query.pb.gw.go | 37 ++- x/nameservice/types/record_msg.go | 6 + x/nameservice/types/types.go | 16 +- 13 files changed, 243 insertions(+), 184 deletions(-) diff --git a/go.mod b/go.mod index c08b163f..f7634d58 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/tharsis/ethermint go 1.17 require ( + github.com/99designs/gqlgen v0.17.2 github.com/btcsuite/btcd v0.22.0-beta github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce github.com/cosmos/cosmos-sdk v0.45.1 @@ -35,6 +36,7 @@ require ( github.com/tendermint/tendermint v0.34.14 github.com/tendermint/tm-db v0.6.7 github.com/tyler-smith/go-bip39 v1.1.0 + github.com/vektah/gqlparser/v2 v2.4.1 google.golang.org/genproto v0.0.0-20220401170504-314d38edb7de google.golang.org/grpc v1.45.0 google.golang.org/protobuf v1.28.0 @@ -44,7 +46,6 @@ require ( require ( filippo.io/edwards25519 v1.0.0-beta.2 // indirect - github.com/99designs/gqlgen v0.17.2 // indirect github.com/99designs/keyring v1.1.6 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/DataDog/zstd v1.4.5 // indirect @@ -152,7 +153,6 @@ require ( github.com/tendermint/go-amino v0.16.0 // indirect github.com/tklauser/go-sysconf v0.3.5 // indirect github.com/tklauser/numcpus v0.2.2 // indirect - github.com/vektah/gqlparser/v2 v2.4.1 // indirect github.com/whyrusleeping/cbor-gen v0.0.0-20200123233031-1cdf64d27158 // indirect github.com/zondax/hid v0.9.0 // indirect go.etcd.io/bbolt v1.3.6 // indirect diff --git a/go.sum b/go.sum index 9e822db8..f2dc9712 100644 --- a/go.sum +++ b/go.sum @@ -115,11 +115,13 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= github.com/allegro/bigcache v1.2.1 h1:hg1sY1raCwic3Vnsvje6TT7/pnZba83LeFck5NrFKSc= github.com/allegro/bigcache v1.2.1/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/arrow/go/arrow v0.0.0-20191024131854-af6fa24be0db/go.mod h1:VTxUBvSJ3s3eHAg65PNgrsn5BtqCRPdmyXh6rAfdxN0= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/aristanetworks/goarista v0.0.0-20170210015632-ea17b1a17847/go.mod h1:D/tb0zPVXnP7fmsLZjtdUhSsumbK/ij54UXjjVgMGxQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -282,6 +284,7 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= @@ -993,6 +996,7 @@ github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KR github.com/segmentio/kafka-go v0.1.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/segmentio/kafka-go v0.2.0/go.mod h1:X6itGqS9L4jDletMsxZ7Dz+JFWxM6JHfPOCvTvk+EJo= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil v2.20.5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= @@ -1112,7 +1116,6 @@ github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/X github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vektah/gqlparser/v2 v2.4.0 h1:EmA4dw9mqHm0j6Xzb9T21hOrp3oXmxnS40vwki70DZU= github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= github.com/vektah/gqlparser/v2 v2.4.1 h1:QOyEn8DAPMUMARGMeshKDkDgNmVoEaEGiDB0uWxcSlQ= github.com/vektah/gqlparser/v2 v2.4.1/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= @@ -1524,8 +1527,8 @@ golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.5 h1:ouewzE6p+/VEB31YYnTbEJdi8pFqKp4P4n85vwo3DHA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.9 h1:j9KsMiaP1c3B0OTQGth0/k+miLGTgLsAFUCrF2vLcF8= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/gql/resolver.go b/gql/resolver.go index adb0a531..9c1e3251 100644 --- a/gql/resolver.go +++ b/gql/resolver.go @@ -3,13 +3,14 @@ package gql import ( "context" "encoding/base64" + "strconv" + "github.com/cosmos/cosmos-sdk/client" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" auctiontypes "github.com/tharsis/ethermint/x/auction/types" bondtypes "github.com/tharsis/ethermint/x/bond/types" nstypes "github.com/tharsis/ethermint/x/nameservice/types" - "strconv" ) // DefaultLogNumLines is the number of log lines to tail by default. @@ -139,15 +140,17 @@ func (q queryResolver) GetRecordsByIds(ctx context.Context, ids []string) ([]*Re gqlResponse := make([]*Record, len(ids)) for i, id := range ids { + // TODO: Implement HasRecord query similar to https://github.com/vulcanize/dxns/blob/main/gql/resolver.go#L325 res, err := nsQueryClient.GetRecord(context.Background(), &nstypes.QueryRecordByIdRequest{Id: id}) if err != nil { - return nil, err + gqlResponse[i] = nil + } else { + record, err := getGQLRecord(context.Background(), q, res.GetRecord()) + if err != nil { + return nil, err + } + gqlResponse[i] = record } - record, err := getGQLRecord(context.Background(), q, res.GetRecord()) - if err != nil { - return nil, err - } - gqlResponse[i] = record } return gqlResponse, nil diff --git a/gql/util.go b/gql/util.go index 4f76e42c..deb18894 100644 --- a/gql/util.go +++ b/gql/util.go @@ -3,12 +3,13 @@ package gql import ( "context" "encoding/json" + "reflect" + "strconv" + sdk "github.com/cosmos/cosmos-sdk/types" auctiontypes "github.com/tharsis/ethermint/x/auction/types" bondtypes "github.com/tharsis/ethermint/x/bond/types" nstypes "github.com/tharsis/ethermint/x/nameservice/types" - "reflect" - "strconv" ) // OwnerAttributeName denotes the owner attribute name for a bond. @@ -72,8 +73,8 @@ func getGQLRecord(ctx context.Context, resolver QueryResolver, record nstypes.Re return &Record{ ID: record.Id, BondID: record.GetBondId(), - CreateTime: record.GetCreateTime().String(), - ExpiryTime: record.GetExpiryTime().String(), + CreateTime: record.GetCreateTime(), + ExpiryTime: record.GetExpiryTime(), Owners: record.GetOwners(), Attributes: attributes, References: references, diff --git a/init.sh b/init.sh index 07ba55b3..73241aa4 100755 --- a/init.sh +++ b/init.sh @@ -32,6 +32,8 @@ cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["staking"]["params"] cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json +cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["record_rent"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json + # increase block time (?) cat $HOME/.chibaclonkd/config/genesis.json | jq '.consensus_params["block"]["time_iota_ms"]="1000"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json diff --git a/proto/vulcanize/nameservice/v1beta1/nameservice.proto b/proto/vulcanize/nameservice/v1beta1/nameservice.proto index eaea8149..cfba853a 100644 --- a/proto/vulcanize/nameservice/v1beta1/nameservice.proto +++ b/proto/vulcanize/nameservice/v1beta1/nameservice.proto @@ -68,21 +68,17 @@ message Record { string bond_id = 2 [ (gogoproto.moretags) = "json:\"bondId\" yaml:\"bondId\"" ]; - google.protobuf.Timestamp create_time = 3 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, + string create_time = 3 [ (gogoproto.moretags) = "json:\"createTime\" yaml:\"createTime\"" ]; - google.protobuf.Timestamp expiry_time = 4 [ - (gogoproto.stdtime) = true, - (gogoproto.nullable) = false, + string expiry_time = 4 [ (gogoproto.moretags) = "json:\"expiryTime\" yaml:\"expiryTime\"" ]; bool deleted = 5; repeated string owners = 6 [ (gogoproto.moretags) = "json:\"owners\" yaml:\"owners\"" ]; - bytes attributes = 7 [ + string attributes = 7 [ (gogoproto.moretags) = "json:\"attributes\" yaml:\"attributes\"" ]; } diff --git a/x/nameservice/genesis.go b/x/nameservice/genesis.go index 22bd665a..026e1449 100644 --- a/x/nameservice/genesis.go +++ b/x/nameservice/genesis.go @@ -1,6 +1,8 @@ package nameservice import ( + "time" + sdk "github.com/cosmos/cosmos-sdk/types" abci "github.com/tendermint/tendermint/abci/types" "github.com/tharsis/ethermint/x/nameservice/keeper" @@ -14,8 +16,11 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data types.GenesisState) keeper.PutRecord(ctx, record) // Add to record expiry queue if expiry time is in the future. - if record.ExpiryTime.After(ctx.BlockTime()) { - keeper.InsertRecordExpiryQueue(ctx, record) + expiryTime, err := time.Parse(time.RFC3339, record.ExpiryTime) + if err == nil { + if expiryTime.After(ctx.BlockTime()) { + keeper.InsertRecordExpiryQueue(ctx, record) + } } // Note: Bond genesis runs first, so bonds will already be present. diff --git a/x/nameservice/keeper/keeper.go b/x/nameservice/keeper/keeper.go index b719fda3..2daff6a6 100644 --- a/x/nameservice/keeper/keeper.go +++ b/x/nameservice/keeper/keeper.go @@ -2,6 +2,9 @@ package keeper import ( "fmt" + "sort" + "time" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/legacy" sdk "github.com/cosmos/cosmos-sdk/types" @@ -13,8 +16,6 @@ import ( bondkeeper "github.com/tharsis/ethermint/x/bond/keeper" "github.com/tharsis/ethermint/x/nameservice/helpers" "github.com/tharsis/ethermint/x/nameservice/types" - "sort" - "time" ) var ( @@ -198,8 +199,8 @@ func (k Keeper) processRecord(ctx sdk.Context, record *types.RecordType, isRenew return err } - record.CreateTime = ctx.BlockHeader().Time - record.ExpiryTime = ctx.BlockHeader().Time.Add(params.RecordRentDuration) + record.CreateTime = ctx.BlockHeader().Time.Format(time.RFC3339) + record.ExpiryTime = ctx.BlockHeader().Time.Add(params.RecordRentDuration).Format(time.RFC3339) record.Deleted = false k.PutRecord(ctx, record.ToRecordObj()) @@ -268,9 +269,13 @@ func (k Keeper) GetRecordExpiryQueueTimeSlice(ctx sdk.Context, timestamp time.Ti // InsertRecordExpiryQueue inserts a record CID to the appropriate timeslice in the record expiry queue. func (k Keeper) InsertRecordExpiryQueue(ctx sdk.Context, val types.Record) { - timeSlice := k.GetRecordExpiryQueueTimeSlice(ctx, val.ExpiryTime) - timeSlice = append(timeSlice, val.Id) - k.SetRecordExpiryQueueTimeSlice(ctx, val.ExpiryTime, timeSlice) + expiryTime, err := time.Parse(time.RFC3339, val.ExpiryTime) + + if err == nil { + timeSlice := k.GetRecordExpiryQueueTimeSlice(ctx, expiryTime) + timeSlice = append(timeSlice, val.Id) + k.SetRecordExpiryQueueTimeSlice(ctx, expiryTime, timeSlice) + } } // GetModuleBalances gets the nameservice module account(s) balances. diff --git a/x/nameservice/keeper/record_keeper.go b/x/nameservice/keeper/record_keeper.go index 0af7e320..3d50a758 100644 --- a/x/nameservice/keeper/record_keeper.go +++ b/x/nameservice/keeper/record_keeper.go @@ -2,6 +2,8 @@ package keeper import ( "fmt" + "time" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -159,12 +161,16 @@ func (k Keeper) ProcessRenewRecord(ctx sdk.Context, msg types.MsgRenewRecord) er // Check if renewal is required (i.e. expired record marked as deleted). record := k.GetRecord(ctx, msg.RecordId) - if !record.Deleted || record.ExpiryTime.After(ctx.BlockTime()) { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Renewal not required.") + expiryTime, err := time.Parse(time.RFC3339, record.ExpiryTime) + + if err == nil { + if !record.Deleted || expiryTime.After(ctx.BlockTime()) { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Renewal not required.") + } } recordType := record.ToRecordType() - err := k.processRecord(ctx, &recordType, true) + err = k.processRecord(ctx, &recordType, true) if err != nil { return err } diff --git a/x/nameservice/types/nameservice.pb.go b/x/nameservice/types/nameservice.pb.go index 00fe593c..a58f4bf1 100644 --- a/x/nameservice/types/nameservice.pb.go +++ b/x/nameservice/types/nameservice.pb.go @@ -156,13 +156,13 @@ func (m *Params) GetAuthorityAuctionMinimumBid() types.Coin { // Params defines the nameservice module records type Record struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" json:"id" yaml:"id"` - BondId string `protobuf:"bytes,2,opt,name=bond_id,json=bondId,proto3" json:"bond_id,omitempty" json:"bondId" yaml:"bondId"` - CreateTime time.Time `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3,stdtime" json:"create_time" json:"createTime" yaml:"createTime"` - ExpiryTime time.Time `protobuf:"bytes,4,opt,name=expiry_time,json=expiryTime,proto3,stdtime" json:"expiry_time" json:"expiryTime" yaml:"expiryTime"` - Deleted bool `protobuf:"varint,5,opt,name=deleted,proto3" json:"deleted,omitempty"` - Owners []string `protobuf:"bytes,6,rep,name=owners,proto3" json:"owners,omitempty" json:"owners" yaml:"owners"` - Attributes []byte `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty" json:"attributes" yaml:"attributes"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" json:"id" yaml:"id"` + BondId string `protobuf:"bytes,2,opt,name=bond_id,json=bondId,proto3" json:"bond_id,omitempty" json:"bondId" yaml:"bondId"` + CreateTime string `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty" json:"createTime" yaml:"createTime"` + ExpiryTime string `protobuf:"bytes,4,opt,name=expiry_time,json=expiryTime,proto3" json:"expiry_time,omitempty" json:"expiryTime" yaml:"expiryTime"` + Deleted bool `protobuf:"varint,5,opt,name=deleted,proto3" json:"deleted,omitempty"` + Owners []string `protobuf:"bytes,6,rep,name=owners,proto3" json:"owners,omitempty" json:"owners" yaml:"owners"` + Attributes string `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty" json:"attributes" yaml:"attributes"` } func (m *Record) Reset() { *m = Record{} } @@ -212,18 +212,18 @@ func (m *Record) GetBondId() string { return "" } -func (m *Record) GetCreateTime() time.Time { +func (m *Record) GetCreateTime() string { if m != nil { return m.CreateTime } - return time.Time{} + return "" } -func (m *Record) GetExpiryTime() time.Time { +func (m *Record) GetExpiryTime() string { if m != nil { return m.ExpiryTime } - return time.Time{} + return "" } func (m *Record) GetDeleted() bool { @@ -240,11 +240,11 @@ func (m *Record) GetOwners() []string { return nil } -func (m *Record) GetAttributes() []byte { +func (m *Record) GetAttributes() string { if m != nil { return m.Attributes } - return nil + return "" } // AuthorityEntry defines the nameservice module AuthorityEntries @@ -764,88 +764,89 @@ func init() { } var fileDescriptor_c2009c2df775dbad = []byte{ - // 1295 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xc6, 0x89, 0x1d, 0x8f, 0x1b, 0x83, 0x86, 0xb4, 0x75, 0x02, 0xf5, 0x06, 0xa3, 0xaa, - 0xad, 0x42, 0xbc, 0x94, 0x1e, 0xca, 0x1f, 0x21, 0x94, 0x4d, 0xd2, 0x10, 0x10, 0x10, 0x26, 0xbd, - 0xc0, 0xc5, 0xcc, 0xee, 0x4e, 0xec, 0xa1, 0xde, 0x5d, 0x6b, 0x67, 0x36, 0xd4, 0x70, 0xe2, 0x1b, - 0x44, 0xe2, 0xd2, 0x03, 0xe2, 0x0b, 0x80, 0xc4, 0xc7, 0xa0, 0xc7, 0x1e, 0x11, 0x12, 0x06, 0x25, - 0xdf, 0xc0, 0x9f, 0x00, 0xed, 0xcc, 0xec, 0x5f, 0xdb, 0x75, 0x69, 0xc5, 0x6d, 0xdf, 0xff, 0xdf, - 0x7b, 0xf3, 0xde, 0x9b, 0x59, 0x60, 0x9c, 0x86, 0x7d, 0x1b, 0x7b, 0xf4, 0x3b, 0x62, 0x78, 0xd8, - 0x25, 0x8c, 0x04, 0xa7, 0xd4, 0x26, 0xc6, 0xe9, 0x6d, 0x8b, 0x70, 0x7c, 0x3b, 0xcb, 0x6b, 0x0f, - 0x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f2, 0xc2, 0x99, 0x14, - 0x5d, 0xce, 0xce, 0x64, 0x42, 0x73, 0x7a, 0x26, 0x48, 0xaa, 0x25, 0x99, 0xfc, 0xa2, 0x81, 0xd7, - 0x66, 0x95, 0xa5, 0x73, 0x42, 0x48, 0xa3, 0x3a, 0x6f, 0xae, 0x3f, 0x57, 0x39, 0x1c, 0x3c, 0xfd, - 0x34, 0x22, 0x67, 0xf3, 0xce, 0x41, 0xe8, 0xa0, 0xf5, 0xe9, 0xd5, 0xbf, 0x47, 0xc8, 0x0c, 0xb4, - 0x32, 0x75, 0x81, 0x16, 0xbc, 0x30, 0xda, 0xd4, 0xd9, 0xbc, 0x5a, 0xcf, 0x40, 0x2b, 0x2b, 0x1c, - 0xa1, 0xfd, 0x4d, 0x03, 0xd7, 0x26, 0x8d, 0x5d, 0xea, 0x51, 0x37, 0x74, 0x3b, 0x16, 0x75, 0x1a, - 0xb5, 0x79, 0x70, 0xbf, 0x50, 0x70, 0x0f, 0x67, 0xc1, 0xcd, 0x78, 0x9b, 0x8d, 0x37, 0xab, 0x84, - 0x36, 0x8a, 0x80, 0x3f, 0x95, 0x52, 0x93, 0x3a, 0xad, 0x8b, 0x12, 0x28, 0x23, 0xb1, 0xed, 0xe1, - 0x0d, 0xb0, 0x48, 0x1d, 0x71, 0xad, 0x55, 0xcd, 0xab, 0xe3, 0x91, 0xfe, 0x8a, 0x44, 0x90, 0x86, - 0x89, 0x7c, 0x2d, 0x52, 0x07, 0xbe, 0x03, 0x2a, 0x96, 0xef, 0x39, 0x1d, 0xea, 0x88, 0xfb, 0xa8, - 0x6a, 0xea, 0xe3, 0x91, 0xfe, 0xaa, 0xd4, 0x8e, 0x04, 0x87, 0x89, 0x85, 0xa2, 0x50, 0x59, 0x7e, - 0xc0, 0x3e, 0xa8, 0xd9, 0x01, 0xc1, 0x9c, 0x74, 0xa2, 0xdb, 0x59, 0xdd, 0x20, 0x1b, 0x13, 0xd3, - 0x72, 0x3f, 0xbe, 0xba, 0x4d, 0x43, 0x55, 0xe3, 0x0d, 0xe9, 0x5d, 0x1a, 0x47, 0xe2, 0x38, 0x42, - 0x86, 0x73, 0x16, 0xb5, 0x3f, 0x48, 0x19, 0x51, 0x34, 0xf2, 0x70, 0x40, 0x83, 0xa1, 0x8c, 0xb6, - 0xf4, 0x5f, 0xa3, 0x49, 0xe3, 0x6c, 0xb4, 0x0c, 0x47, 0x46, 0x4b, 0x19, 0xb0, 0x01, 0x2a, 0x0e, - 0xe9, 0x13, 0x4e, 0xe4, 0xea, 0x5f, 0x41, 0x31, 0x09, 0xef, 0x82, 0xb2, 0xff, 0xad, 0x47, 0x02, - 0xd6, 0x28, 0x6f, 0x96, 0xf2, 0xe5, 0x92, 0xfc, 0xd8, 0xbd, 0xa2, 0x90, 0x52, 0x87, 0x07, 0x00, - 0x60, 0xce, 0x03, 0x6a, 0x85, 0x9c, 0x30, 0xb1, 0x25, 0x2f, 0x99, 0x37, 0x52, 0x7c, 0xa9, 0x2c, - 0x69, 0x84, 0x94, 0x83, 0x32, 0xa6, 0xad, 0x1e, 0xa8, 0xef, 0xc4, 0x3d, 0xb0, 0xef, 0xf1, 0x60, - 0x08, 0x21, 0x58, 0x8a, 0x5e, 0x59, 0xf2, 0xb8, 0x91, 0xf8, 0x86, 0x26, 0x58, 0x26, 0x91, 0x50, - 0xbd, 0x32, 0xde, 0x6c, 0x3f, 0xf5, 0x45, 0xd6, 0xfe, 0x0c, 0xbb, 0x24, 0xf1, 0x8a, 0xa4, 0x69, - 0xeb, 0xcf, 0x12, 0x58, 0xcd, 0x09, 0xe0, 0x97, 0xe0, 0x65, 0x91, 0x4e, 0x67, 0x10, 0x5a, 0x7d, - 0x6a, 0x77, 0x1e, 0x90, 0xa1, 0x6a, 0x32, 0x23, 0x7d, 0x1b, 0x08, 0x8d, 0x23, 0xa1, 0xf0, 0x09, - 0x19, 0xe6, 0xea, 0x91, 0x72, 0x51, 0x3d, 0xcf, 0x80, 0x47, 0x60, 0x55, 0xba, 0xc6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 0xd4, 0xfe, 0x39, 0x6f, - 0x6a, 0x67, 0x17, 0xcd, 0x85, 0x27, 0x17, 0xcd, 0x85, 0x3f, 0x2e, 0x9a, 0x0b, 0x5f, 0xbd, 0xd5, - 0xa5, 0xbc, 0x17, 0x5a, 0x6d, 0xdb, 0x77, 0x0d, 0xde, 0xc3, 0x01, 0xa3, 0xcc, 0x20, 0xbc, 0x47, - 0x02, 0x97, 0x7a, 0xdc, 0x78, 0x98, 0xfb, 0xf3, 0xe6, 0xc3, 0x01, 0x61, 0x56, 0x59, 0xec, 0x84, - 0x3b, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x84, 0x83, 0x21, 0x9f, 0x0f, 0x00, 0x00, + // 1299 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcd, 0x6e, 0x1b, 0x45, + 0x1c, 0xcf, 0xc6, 0x89, 0x13, 0x8f, 0x1b, 0x83, 0x86, 0xb4, 0x75, 0x02, 0xf5, 0x06, 0xa3, 0xaa, + 0xad, 0x42, 0xbc, 0x94, 0x1e, 0xca, 0x87, 0x10, 0xca, 0x26, 0x69, 0x1a, 0x10, 0x10, 0x26, 0xb9, + 0xc0, 0xc5, 0xcc, 0xee, 0x4e, 0xec, 0xa1, 0xde, 0x5d, 0x6b, 0x67, 0x36, 0xd4, 0x70, 0xe2, 0x0d, + 0x22, 0x71, 0xa9, 0x04, 0xe2, 0x05, 0x40, 0xe2, 0x31, 0xe8, 0xb1, 0x47, 0x84, 0x84, 0x41, 0xc9, + 0x1b, 0xf8, 0x09, 0xd0, 0xce, 0xcc, 0x7e, 0xda, 0xae, 0xa3, 0xf6, 0xb6, 0xff, 0xcf, 0xf9, 0xfd, + 0x3f, 0x67, 0x16, 0x18, 0xa7, 0x61, 0xcf, 0xc6, 0x1e, 0xfd, 0x9e, 0x18, 0x1e, 0x76, 0x09, 0x23, + 0xc1,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 0x40, 0x30, 0x27, 0xed, 0xe8, 0x76, 0x16, 0x37, 0x48, 0xc5, 0xbc, 0x35, 0x1a, + 0xea, 0x6f, 0x49, 0x6b, 0x29, 0x3c, 0xa6, 0x6e, 0x52, 0x8a, 0x0c, 0x07, 0x81, 0x94, 0x88, 0x3c, + 0x91, 0xc7, 0x7d, 0x1a, 0x0c, 0xa4, 0xa7, 0x85, 0xa2, 0x27, 0x29, 0xcc, 0x7a, 0xca, 0x70, 0x10, + 0x48, 0x09, 0x58, 0x07, 0x4b, 0x0e, 0xe9, 0x11, 0x4e, 0xe4, 0xca, 0x5e, 0x46, 0x31, 0x09, 0xef, + 0x83, 0xb2, 0xff, 0x9d, 0x47, 0x02, 0x56, 0x2f, 0x6f, 0x94, 0xf2, 0x61, 0x4a, 0x7e, 0xec, 0x5a, + 0x51, 0x48, 0xa9, 0xc3, 0x7d, 0x00, 0x30, 0xe7, 0x01, 0xb5, 0x42, 0x4e, 0x98, 0xd8, 0x6e, 0x39, + 0x6c, 0xa9, 0x2c, 0x29, 0x60, 0xca, 0x41, 0x19, 0xd3, 0x66, 0x17, 0xd4, 0xb6, 0xe3, 0xda, 0xed, + 0x79, 0x3c, 0x18, 0x40, 0x08, 0x16, 0xa2, 0xd7, 0x91, 0x2c, 0x13, 0x12, 0xdf, 0xd0, 0x04, 0x8b, + 0x24, 0x12, 0xaa, 0xd7, 0xc1, 0xdb, 0xad, 0xe7, 0xbe, 0xa4, 0x5a, 0x9f, 0x63, 0x97, 0x24, 0x5e, + 0x91, 0x34, 0x6d, 0xfe, 0x5d, 0x02, 0x2b, 0x39, 0x01, 0xfc, 0x0a, 0xbc, 0x2a, 0xc2, 0x69, 0xf7, + 0x43, 0xab, 0x47, 0xed, 0xf6, 0x23, 0x32, 0x50, 0xcd, 0x61, 0xa4, 0x77, 0xba, 0xd0, 0x38, 0x14, + 0x0a, 0x9f, 0x92, 0x41, 0x2e, 0x1f, 0x29, 0x17, 0xd5, 0xf2, 0x0c, 0x78,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0xd1, 0x50, 0xbf, 0xa3, 0xe6, 0x59, 0xc8, + 0x0b, 0x2b, 0x29, 0xcf, 0x44, 0x2b, 0x39, 0xda, 0xfc, 0xe4, 0xe9, 0x79, 0x43, 0x7b, 0x76, 0xde, + 0xd0, 0xfe, 0x3b, 0x6f, 0x68, 0x67, 0x17, 0x8d, 0xb9, 0x67, 0x17, 0x8d, 0xb9, 0xbf, 0x2e, 0x1a, + 0x73, 0x5f, 0xbf, 0xd3, 0xa1, 0xbc, 0x1b, 0x5a, 0x2d, 0xdb, 0x77, 0x0d, 0xde, 0xc5, 0x01, 0xa3, + 0xcc, 0x20, 0xbc, 0x4b, 0x02, 0x97, 0x7a, 0xdc, 0x78, 0x9c, 0xfb, 0x63, 0xe6, 0x83, 0x3e, 0x61, + 0x56, 0x59, 0xec, 0x84, 0x7b, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x12, 0x43, 0x47, 0x57, + 0x0f, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -1017,22 +1018,20 @@ func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpiryTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiryTime):]) - if err11 != nil { - return 0, err11 + if len(m.ExpiryTime) > 0 { + i -= len(m.ExpiryTime) + copy(dAtA[i:], m.ExpiryTime) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.ExpiryTime))) + i-- + dAtA[i] = 0x22 } - i -= n11 - i = encodeVarintNameservice(dAtA, i, uint64(n11)) - i-- - dAtA[i] = 0x22 - n12, err12 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreateTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreateTime):]) - if err12 != nil { - return 0, err12 + if len(m.CreateTime) > 0 { + i -= len(m.CreateTime) + copy(dAtA[i:], m.CreateTime) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.CreateTime))) + i-- + dAtA[i] = 0x1a } - i -= n12 - i = encodeVarintNameservice(dAtA, i, uint64(n12)) - i-- - dAtA[i] = 0x1a if len(m.BondId) > 0 { i -= len(m.BondId) copy(dAtA[i:], m.BondId) @@ -1112,12 +1111,12 @@ func (m *NameAuthority) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n14, err14 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpiryTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiryTime):]) - if err14 != nil { - return 0, err14 + n12, err12 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpiryTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiryTime):]) + if err12 != nil { + return 0, err12 } - i -= n14 - i = encodeVarintNameservice(dAtA, i, uint64(n14)) + i -= n12 + i = encodeVarintNameservice(dAtA, i, uint64(n12)) i-- dAtA[i] = 0x3a if len(m.BondId) > 0 { @@ -1498,10 +1497,14 @@ func (m *Record) Size() (n int) { if l > 0 { n += 1 + l + sovNameservice(uint64(l)) } - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreateTime) - n += 1 + l + sovNameservice(uint64(l)) - l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiryTime) - n += 1 + l + sovNameservice(uint64(l)) + l = len(m.CreateTime) + if l > 0 { + n += 1 + l + sovNameservice(uint64(l)) + } + l = len(m.ExpiryTime) + if l > 0 { + n += 1 + l + sovNameservice(uint64(l)) + } if m.Deleted { n += 2 } @@ -2200,7 +2203,7 @@ func (m *Record) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreateTime", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNameservice @@ -2210,30 +2213,29 @@ func (m *Record) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthNameservice } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthNameservice } if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreateTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.CreateTime = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ExpiryTime", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNameservice @@ -2243,24 +2245,23 @@ func (m *Record) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthNameservice } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthNameservice } if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExpiryTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.ExpiryTime = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: if wireType != 0 { @@ -2318,7 +2319,7 @@ func (m *Record) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNameservice @@ -2328,25 +2329,23 @@ func (m *Record) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthNameservice } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthNameservice } if postIndex > l { return io.ErrUnexpectedEOF } - m.Attributes = append(m.Attributes[:0], dAtA[iNdEx:postIndex]...) - if m.Attributes == nil { - m.Attributes = []byte{} - } + m.Attributes = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/nameservice/types/query.pb.gw.go b/x/nameservice/types/query.pb.gw.go index 4cbfa343..ca96f4d5 100644 --- a/x/nameservice/types/query.pb.gw.go +++ b/x/nameservice/types/query.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest @@ -466,12 +468,14 @@ func local_request_Query_GetAuthorityExpiryQueue_0(ctx context.Context, marshale // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -479,6 +483,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -492,6 +497,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ListRecords_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -499,6 +506,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ListRecords_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -512,6 +520,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_GetRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -519,6 +529,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GetRecord_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -532,6 +543,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_GetRecordByBondId_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -539,6 +552,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GetRecordByBondId_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -552,6 +566,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_GetNameServiceModuleBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -559,6 +575,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GetNameServiceModuleBalance_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -572,6 +589,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ListNameRecords_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -579,6 +598,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ListNameRecords_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -592,6 +612,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Whois_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -599,6 +621,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Whois_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -612,6 +635,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_LookupWrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -619,6 +644,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_LookupWrn_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -632,6 +658,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ResolveWrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -639,6 +667,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ResolveWrn_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -652,6 +681,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_GetRecordExpiryQueue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -659,6 +690,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GetRecordExpiryQueue_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -672,6 +704,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_GetAuthorityExpiryQueue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -679,6 +713,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GetAuthorityExpiryQueue_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) diff --git a/x/nameservice/types/record_msg.go b/x/nameservice/types/record_msg.go index 15f73492..c0dd6963 100644 --- a/x/nameservice/types/record_msg.go +++ b/x/nameservice/types/record_msg.go @@ -23,6 +23,12 @@ func NewMsgSetRecord(payload Payload, bondID string, signer sdk.AccAddress) MsgS } } +// Route Implements Msg. +func (msg MsgSetRecord) Route() string { return RouterKey } + +// Type Implements Msg. +func (msg MsgSetRecord) Type() string { return "set-record" } + func (msg MsgSetRecord) ValidateBasic() error { if len(msg.Signer) == 0 { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer) diff --git a/x/nameservice/types/types.go b/x/nameservice/types/types.go index d2baba1d..db8f6537 100644 --- a/x/nameservice/types/types.go +++ b/x/nameservice/types/types.go @@ -2,9 +2,9 @@ package types import ( "crypto/sha256" + canonicalJson "github.com/gibson042/canonicaljson-go" "github.com/tharsis/ethermint/x/nameservice/helpers" - "time" ) const ( @@ -24,11 +24,9 @@ type PayloadType struct { func (payloadObj *PayloadType) ToPayload() Payload { var payload = Payload{ Record: &Record{ - CreateTime: time.Time{}, - ExpiryTime: time.Time{}, Deleted: false, Owners: nil, - Attributes: helpers.MarshalMapToJSONBytes(payloadObj.Record), + Attributes: helpers.BytesToBase64(helpers.MarshalMapToJSONBytes(payloadObj.Record)), }, Signatures: payloadObj.Signatures, } @@ -40,7 +38,7 @@ func (payloadObj *PayloadType) ToPayload() Payload { func (payload Payload) ToReadablePayload() PayloadType { var payloadType PayloadType - payloadType.Record = helpers.UnMarshalMapFromJSONBytes(payload.Record.Attributes) + payloadType.Record = helpers.UnMarshalMapFromJSONBytes(helpers.BytesFromBase64(payload.Record.Attributes)) payloadType.Signatures = payload.Signatures @@ -58,7 +56,7 @@ func (r *Record) ToRecordType() RecordType { resourceObj.ExpiryTime = r.ExpiryTime resourceObj.Deleted = r.Deleted resourceObj.Owners = r.Owners - resourceObj.Attributes = helpers.UnMarshalMapFromJSONBytes(r.Attributes) + resourceObj.Attributes = helpers.UnMarshalMapFromJSONBytes(helpers.BytesFromBase64(r.Attributes)) return resourceObj } @@ -68,8 +66,8 @@ type RecordType struct { Id string `json:"id,omitempty"` Names []string `json:"names,omitempty"` BondId string `json:"bondId,omitempty"` - CreateTime time.Time `json:"createTime,omitempty"` - ExpiryTime time.Time `json:"expiryTime,omitempty"` + CreateTime string `json:"createTime,omitempty"` + ExpiryTime string `json:"expiryTime,omitempty"` Deleted bool `json:"deleted,omitempty"` Owners []string `json:"owners,omitempty"` Attributes map[string]interface{} `json:"attributes,omitempty"` @@ -86,7 +84,7 @@ func (r *RecordType) ToRecordObj() Record { resourceObj.ExpiryTime = r.ExpiryTime resourceObj.Deleted = r.Deleted resourceObj.Owners = r.Owners - resourceObj.Attributes = helpers.MarshalMapToJSONBytes(r.Attributes) + resourceObj.Attributes = helpers.BytesToBase64(helpers.MarshalMapToJSONBytes(r.Attributes)) return resourceObj } From 2b8b18d6594b2ebd480897e245a1db3112e24de2 Mon Sep 17 00:00:00 2001 From: nabarun Date: Fri, 8 Apr 2022 18:02:18 +0530 Subject: [PATCH 02/10] fix: return nil response for gql queries --- gql/resolver.go | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/gql/resolver.go b/gql/resolver.go index 9c1e3251..8b5064d7 100644 --- a/gql/resolver.go +++ b/gql/resolver.go @@ -78,15 +78,15 @@ func (q queryResolver) ResolveNames(ctx context.Context, names []string) ([]*Rec for _, name := range names { res, err := nsQueryClient.ResolveWrn(context.Background(), &nstypes.QueryResolveWrn{Wrn: name}) if err != nil { - return nil, err - } + gqlResponse = append(gqlResponse, nil) + } else { + gqlRecord, err := getGQLRecord(context.Background(), q, *res.GetRecord()) + if err != nil { + return nil, err + } - gqlRecord, err := getGQLRecord(context.Background(), q, *res.GetRecord()) - if err != nil { - return nil, err + gqlResponse = append(gqlResponse, gqlRecord) } - - gqlResponse = append(gqlResponse, gqlRecord) } return gqlResponse, nil @@ -99,15 +99,16 @@ func (q queryResolver) LookupNames(ctx context.Context, names []string) ([]*Name for _, name := range names { res, err := nsQueryClient.LookupWrn(context.Background(), &nstypes.QueryLookupWrn{Wrn: name}) if err != nil { - return nil, err - } + // Instead of throwing error for name not found, return nil similar to https://github.com/vulcanize/dxns/blob/main/gql/resolver.go#L191 + gqlResponse = append(gqlResponse, nil) + } else { + gqlRecord, err := getGQLNameRecord(res.GetName()) + if err != nil { + return nil, err + } - gqlRecord, err := getGQLNameRecord(res.GetName()) - if err != nil { - return nil, err + gqlResponse = append(gqlResponse, gqlRecord) } - - gqlResponse = append(gqlResponse, gqlRecord) } return gqlResponse, nil From 8f5449f397b27f095570ddfcb71c5b676270422e Mon Sep 17 00:00:00 2001 From: nabarun Date: Mon, 11 Apr 2022 18:14:01 +0530 Subject: [PATCH 03/10] auction: change params for auction module test --- init.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/init.sh b/init.sh index 73241aa4..f240a412 100755 --- a/init.sh +++ b/init.sh @@ -32,8 +32,21 @@ cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["staking"]["params"] cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["crisis"]["constant_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["gov"]["deposit_params"]["min_deposit"][0]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json +# Custom modules cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["record_rent"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json +cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_commit_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json +cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_reveal_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json +cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_minimum_bid"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json +if [[ "$AUCTION_ENABLED" == "true" ]]; then + echo "Enabling auction and setting timers." + + cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_enabled"]=true' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json + cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_rent_duration"]="60s"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json + cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_grace_period"]="300s"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json + cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_commits_duration"]="60s"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json + cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_reveals_duration"]="60s"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json +fi # increase block time (?) cat $HOME/.chibaclonkd/config/genesis.json | jq '.consensus_params["block"]["time_iota_ms"]="1000"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json From d762ce98b3ea2c04bba7bacde6e3cadd98180143 Mon Sep 17 00:00:00 2001 From: nabarun Date: Wed, 13 Apr 2022 17:33:42 +0530 Subject: [PATCH 04/10] nameservice: queryRecords filter by attributes --- gql/resolver.go | 9 +- gql/util.go | 23 + .../vulcanize/nameservice/v1beta1/query.proto | 12 +- x/nameservice/keeper/grpc_query.go | 96 ++- x/nameservice/keeper/keeper.go | 26 +- x/nameservice/types/query.pb.go | 661 +++++++++++++++--- 6 files changed, 743 insertions(+), 84 deletions(-) diff --git a/gql/resolver.go b/gql/resolver.go index 8b5064d7..d8f48579 100644 --- a/gql/resolver.go +++ b/gql/resolver.go @@ -116,7 +116,14 @@ func (q queryResolver) LookupNames(ctx context.Context, names []string) ([]*Name func (q queryResolver) QueryRecords(ctx context.Context, attributes []*KeyValueInput, all *bool) ([]*Record, error) { nsQueryClient := nstypes.NewQueryClient(q.ctx) - res, err := nsQueryClient.ListRecords(context.Background(), &nstypes.QueryListRecordsRequest{}) + + res, err := nsQueryClient.ListRecords( + context.Background(), + &nstypes.QueryListRecordsRequest{ + Attributes: parseRequestAttributes(attributes), + }, + ) + if err != nil { return nil, err } diff --git a/gql/util.go b/gql/util.go index deb18894..33aac824 100644 --- a/gql/util.go +++ b/gql/util.go @@ -266,3 +266,26 @@ func mapToKeyValuePairs(attrs map[string]interface{}) ([]*KeyValue, error) { return kvPairs, nil } + +func parseRequestAttributes(attrs []*KeyValueInput) []*nstypes.QueryListRecordsRequest_KeyValueInput { + kvPairs := []*nstypes.QueryListRecordsRequest_KeyValueInput{} + + for _, value := range attrs { + kvPair := &nstypes.QueryListRecordsRequest_KeyValueInput{ + Key: value.Key, + Value: &nstypes.QueryListRecordsRequest_ValueInput{}, + } + + if value.Value.String != nil { + kvPair.Value.String_ = *value.Value.String + } + + if value.Value.Int != nil { + kvPair.Value.Int = int64(*value.Value.Int) + } + + kvPairs = append(kvPairs, kvPair) + } + + return kvPairs +} diff --git a/proto/vulcanize/nameservice/v1beta1/query.proto b/proto/vulcanize/nameservice/v1beta1/query.proto index 6a3b3762..f42e52dd 100644 --- a/proto/vulcanize/nameservice/v1beta1/query.proto +++ b/proto/vulcanize/nameservice/v1beta1/query.proto @@ -68,8 +68,18 @@ message QueryParamsResponse{ // QueryListRecordsRequest is request type for nameservice records list message QueryListRecordsRequest{ + message ValueInput { + string string = 1; + int64 int = 2; + } + message KeyValueInput { + string key = 1; + ValueInput value = 2; + } + repeated KeyValueInput attributes = 1; + // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; + cosmos.base.query.v1beta1.PageRequest pagination = 2; } // QueryListRecordsResponse is response type for nameservice records list diff --git a/x/nameservice/keeper/grpc_query.go b/x/nameservice/keeper/grpc_query.go index 62ab774c..9900854b 100644 --- a/x/nameservice/keeper/grpc_query.go +++ b/x/nameservice/keeper/grpc_query.go @@ -2,11 +2,18 @@ package keeper import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/tharsis/ethermint/x/nameservice/types" ) +// BondIDAttributeName denotes the record bond ID. +const BondIDAttributeName = "bondId" + +// ExpiryTimeAttributeName denotes the record expiry time. +const ExpiryTimeAttributeName = "expiryTime" + type Querier struct { Keeper } @@ -19,9 +26,19 @@ func (q Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types. return &types.QueryParamsResponse{Params: ¶ms}, nil } -func (q Querier) ListRecords(c context.Context, _ *types.QueryListRecordsRequest) (*types.QueryListRecordsResponse, error) { +func (q Querier) ListRecords(c context.Context, req *types.QueryListRecordsRequest) (*types.QueryListRecordsResponse, error) { ctx := sdk.UnwrapSDKContext(c) - records := q.Keeper.ListRecords(ctx) + attributes := req.GetAttributes() + records := []types.Record{} + + if len(attributes) > 0 { + records = q.Keeper.MatchRecords(ctx, func(record *types.RecordType) bool { + return MatchOnAttributes(record, attributes) + }) + } else { + records = q.Keeper.ListRecords(ctx) + } + return &types.QueryListRecordsResponse{Records: records}, nil } @@ -95,3 +112,78 @@ func (q Querier) GetAuthorityExpiryQueue(c context.Context, _ *types.QueryGetAut authorities := q.Keeper.GetAuthorityExpiryQueue(ctx) return &types.QueryGetAuthorityExpiryQueueResponse{Authorities: authorities}, nil } + +func matchOnRecordField(record *types.RecordType, attr *types.QueryListRecordsRequest_KeyValueInput) (fieldFound bool, matched bool) { + fieldFound = false + matched = true + + switch attr.Key { + case BondIDAttributeName: + { + fieldFound = true + if record.BondId != attr.Value.GetString_() { + matched = false + return + } + } + case ExpiryTimeAttributeName: + { + fieldFound = true + if record.ExpiryTime != attr.Value.GetString_() { + matched = false + return + } + } + } + + return +} + +func MatchOnAttributes(record *types.RecordType, attributes []*types.QueryListRecordsRequest_KeyValueInput) bool { + // Filter deleted records. + if record.Deleted { + return false + } + + recAttrs := record.Attributes + + for _, attr := range attributes { + // First try matching on record struct fields. + fieldFound, matched := matchOnRecordField(record, attr) + + if fieldFound { + if !matched { + return false + } + + continue + } + + recAttrVal, recAttrFound := recAttrs[attr.Key] + if !recAttrFound { + return false + } + + if attr.Value.Int != 0 { + recAttrValInt, ok := recAttrVal.(int) + if !ok || int(attr.Value.GetInt()) != recAttrValInt { + return false + } + } + + if attr.Value.String_ != "" { + recAttrValString, ok := recAttrVal.(string) + if !ok { + return false + } + + if attr.Value.GetString_() != recAttrValString { + return false + } + } + + // TODO: Handle other attribute value types. + } + + return true +} diff --git a/x/nameservice/keeper/keeper.go b/x/nameservice/keeper/keeper.go index 2daff6a6..b4a3d631 100644 --- a/x/nameservice/keeper/keeper.go +++ b/x/nameservice/keeper/keeper.go @@ -127,6 +127,29 @@ func (k Keeper) ListRecords(ctx sdk.Context) []types.Record { return records } +// MatchRecords - get all matching records. +func (k Keeper) MatchRecords(ctx sdk.Context, matchFn func(*types.RecordType) bool) []types.Record { + var records []types.Record + + store := ctx.KVStore(k.storeKey) + itr := sdk.KVStorePrefixIterator(store, PrefixCIDToRecordIndex) + defer itr.Close() + for ; itr.Valid(); itr.Next() { + bz := store.Get(itr.Key()) + if bz != nil { + var obj types.Record + k.cdc.MustUnmarshal(bz, &obj) + record := obj.ToRecordType() + // record := recordObjToRecord(store, codec, obj) + if matchFn(&record) { + records = append(records, obj) + } + } + } + + return records +} + func (k Keeper) GetRecordExpiryQueue(ctx sdk.Context) []*types.ExpiryQueueRecord { var records []*types.ExpiryQueueRecord @@ -200,7 +223,8 @@ func (k Keeper) processRecord(ctx sdk.Context, record *types.RecordType, isRenew } record.CreateTime = ctx.BlockHeader().Time.Format(time.RFC3339) - record.ExpiryTime = ctx.BlockHeader().Time.Add(params.RecordRentDuration).Format(time.RFC3339) + // record.ExpiryTime = ctx.BlockHeader().Time.Add(params.RecordRentDuration).Format(time.RFC3339) + record.ExpiryTime = ctx.BlockHeader().Time.Add(time.Minute).Format(time.RFC3339) record.Deleted = false k.PutRecord(ctx, record.ToRecordObj()) diff --git a/x/nameservice/types/query.pb.go b/x/nameservice/types/query.pb.go index 34185606..cfb3d364 100644 --- a/x/nameservice/types/query.pb.go +++ b/x/nameservice/types/query.pb.go @@ -116,8 +116,9 @@ func (m *QueryParamsResponse) GetParams() *Params { // QueryListRecordsRequest is request type for nameservice records list type QueryListRecordsRequest struct { + Attributes []*QueryListRecordsRequest_KeyValueInput `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"` // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryListRecordsRequest) Reset() { *m = QueryListRecordsRequest{} } @@ -153,6 +154,13 @@ func (m *QueryListRecordsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryListRecordsRequest proto.InternalMessageInfo +func (m *QueryListRecordsRequest) GetAttributes() []*QueryListRecordsRequest_KeyValueInput { + if m != nil { + return m.Attributes + } + return nil +} + func (m *QueryListRecordsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination @@ -160,6 +168,110 @@ func (m *QueryListRecordsRequest) GetPagination() *query.PageRequest { return nil } +type QueryListRecordsRequest_ValueInput struct { + String_ string `protobuf:"bytes,1,opt,name=string,proto3" json:"string,omitempty"` + Int int64 `protobuf:"varint,2,opt,name=int,proto3" json:"int,omitempty"` +} + +func (m *QueryListRecordsRequest_ValueInput) Reset() { *m = QueryListRecordsRequest_ValueInput{} } +func (m *QueryListRecordsRequest_ValueInput) String() string { return proto.CompactTextString(m) } +func (*QueryListRecordsRequest_ValueInput) ProtoMessage() {} +func (*QueryListRecordsRequest_ValueInput) Descriptor() ([]byte, []int) { + return fileDescriptor_73d2465766c8f876, []int{2, 0} +} +func (m *QueryListRecordsRequest_ValueInput) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryListRecordsRequest_ValueInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryListRecordsRequest_ValueInput.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryListRecordsRequest_ValueInput) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryListRecordsRequest_ValueInput.Merge(m, src) +} +func (m *QueryListRecordsRequest_ValueInput) XXX_Size() int { + return m.Size() +} +func (m *QueryListRecordsRequest_ValueInput) XXX_DiscardUnknown() { + xxx_messageInfo_QueryListRecordsRequest_ValueInput.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryListRecordsRequest_ValueInput proto.InternalMessageInfo + +func (m *QueryListRecordsRequest_ValueInput) GetString_() string { + if m != nil { + return m.String_ + } + return "" +} + +func (m *QueryListRecordsRequest_ValueInput) GetInt() int64 { + if m != nil { + return m.Int + } + return 0 +} + +type QueryListRecordsRequest_KeyValueInput struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value *QueryListRecordsRequest_ValueInput `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *QueryListRecordsRequest_KeyValueInput) Reset() { *m = QueryListRecordsRequest_KeyValueInput{} } +func (m *QueryListRecordsRequest_KeyValueInput) String() string { return proto.CompactTextString(m) } +func (*QueryListRecordsRequest_KeyValueInput) ProtoMessage() {} +func (*QueryListRecordsRequest_KeyValueInput) Descriptor() ([]byte, []int) { + return fileDescriptor_73d2465766c8f876, []int{2, 1} +} +func (m *QueryListRecordsRequest_KeyValueInput) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryListRecordsRequest_KeyValueInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryListRecordsRequest_KeyValueInput.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryListRecordsRequest_KeyValueInput) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryListRecordsRequest_KeyValueInput.Merge(m, src) +} +func (m *QueryListRecordsRequest_KeyValueInput) XXX_Size() int { + return m.Size() +} +func (m *QueryListRecordsRequest_KeyValueInput) XXX_DiscardUnknown() { + xxx_messageInfo_QueryListRecordsRequest_KeyValueInput.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryListRecordsRequest_KeyValueInput proto.InternalMessageInfo + +func (m *QueryListRecordsRequest_KeyValueInput) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *QueryListRecordsRequest_KeyValueInput) GetValue() *QueryListRecordsRequest_ValueInput { + if m != nil { + return m.Value + } + return nil +} + // QueryListRecordsResponse is response type for nameservice records list type QueryListRecordsResponse struct { Records []Record `protobuf:"bytes,1,rep,name=records,proto3" json:"records"` @@ -1174,6 +1286,8 @@ func init() { proto.RegisterType((*QueryParamsRequest)(nil), "vulcanize.nameservice.v1beta1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "vulcanize.nameservice.v1beta1.QueryParamsResponse") proto.RegisterType((*QueryListRecordsRequest)(nil), "vulcanize.nameservice.v1beta1.QueryListRecordsRequest") + proto.RegisterType((*QueryListRecordsRequest_ValueInput)(nil), "vulcanize.nameservice.v1beta1.QueryListRecordsRequest.ValueInput") + proto.RegisterType((*QueryListRecordsRequest_KeyValueInput)(nil), "vulcanize.nameservice.v1beta1.QueryListRecordsRequest.KeyValueInput") proto.RegisterType((*QueryListRecordsResponse)(nil), "vulcanize.nameservice.v1beta1.QueryListRecordsResponse") proto.RegisterType((*QueryRecordByIdRequest)(nil), "vulcanize.nameservice.v1beta1.QueryRecordByIdRequest") proto.RegisterType((*QueryRecordByIdResponse)(nil), "vulcanize.nameservice.v1beta1.QueryRecordByIdResponse") @@ -1202,84 +1316,90 @@ func init() { } var fileDescriptor_73d2465766c8f876 = []byte{ - // 1218 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58,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 0xac, 0x7a, 0xcf, - 0x34, 0xee, 0xe3, 0x5f, 0x11, 0x8c, 0x84, 0x8c, 0x83, 0x11, 0x0d, 0x5f, 0xc9, 0x42, 0x21, 0x36, - 0x4d, 0x4a, 0x4b, 0xdd, 0x40, 0x85, 0x82, 0xb7, 0x99, 0x82, 0xcb, 0x78, 0x31, 0x9d, 0x82, 0x62, - 0xa5, 0x55, 0xac, 0x50, 0xcb, 0x28, 0x9a, 0x06, 0x17, 0xf3, 0x3b, 0x82, 0x33, 0x47, 0x0c, 0x67, - 0x78, 0x39, 0x81, 0x5b, 0xf2, 0xf8, 0x27, 0x95, 0x9f, 0xc5, 0x45, 0xc6, 0x53, 0x25, 0xc6, 0x22, - 0xfc, 0x18, 0xc1, 0xf0, 0x81, 0x51, 0x05, 0x2f, 0xa5, 0x3d, 0xd2, 0xed, 0x73, 0x94, 0x74, 0xb5, - 0x2b, 0xac, 0x20, 0x3f, 0xc7, 0xc8, 0x4f, 0xe3, 0xc9, 0x34, 0xbf, 0x85, 0xf1, 0x0f, 0x08, 0xfa, - 0xd8, 0x30, 0x82, 0xe7, 0xd3, 0x04, 0x8d, 0x4e, 0x38, 0x52, 0x29, 0x03, 0x22, 0xe3, 0x15, 0xb8, - 0xe3, 0xa3, 0xd4, 0x7b, 0xfe, 0xd6, 0x7d, 0xfc, 0x3d, 0x82, 0x81, 0xfd, 0x89, 0xa4, 0x98, 0x2a, - 0x39, 0x81, 0xb9, 0x74, 0x31, 0x93, 0x79, 0xe6, 0x46, 0x58, 0x67, 0x48, 0xfc, 0x23, 0x02, 0x88, - 0xcc, 0x2d, 0x4a, 0xba, 0x3b, 0x16, 0xd8, 0xa7, 0xed, 0x28, 0x07, 0x47, 0x9e, 0x0c, 0xed, 0x8f, - 0x41, 0xf1, 0x36, 0x82, 0xd1, 0x8e, 0xf3, 0xcd, 0xe5, 0x34, 0x04, 0x3a, 0x21, 0xa5, 0x77, 0xba, - 0x45, 0x86, 0x22, 0xde, 0x64, 0x22, 0x14, 0x3c, 0x97, 0xaa, 0xa9, 0x14, 0x09, 0x73, 0xe1, 0xb7, - 0x92, 0x53, 0x87, 0xcd, 0x13, 0x57, 0x53, 0x72, 0xea, 0x04, 0x96, 0x56, 0x9e, 0x01, 0x1c, 0x6a, - 0xba, 0xc4, 0x34, 0x95, 0xb0, 0x9a, 0xa0, 0x29, 0x1c, 0xf8, 0x85, 0xac, 0xf2, 0xf5, 0xed, 0xdd, - 0x3c, 0x7a, 0xb2, 0x9b, 0x47, 0x7f, 0xed, 0xe6, 0xd1, 0xd7, 0x7b, 0xf9, 0x9e, 0x27, 0x7b, 0xf9, - 0x9e, 0x3f, 0xf6, 0xf2, 0x3d, 0x9f, 0xce, 0x47, 0x7e, 0xae, 0xb9, 0x9b, 0xba, 0xed, 0x98, 0x8e, - 0x4a, 0xdc, 0x4d, 0x62, 0x37, 0x4c, 0xcb, 0x55, 0xef, 0xc6, 0xdc, 0xb3, 0x1f, 0x6f, 0x95, 0x7e, - 0xf6, 0x2f, 0xa6, 0x0b, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x7c, 0xa9, 0x7f, 0x91, 0x5f, 0x13, - 0x00, 0x00, + // 1313 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6c, 0xdc, 0xc4, + 0x17, 0xce, 0x64, 0x9b, 0xf4, 0x97, 0xb7, 0xbf, 0x26, 0x64, 0x88, 0xda, 0xd4, 0x4d, 0x37, 0xc5, + 0xcd, 0x9f, 0x0d, 0x64, 0xed, 0x6c, 0x4a, 0xd3, 0x36, 0x15, 0x88, 0x6c, 0x1a, 0xa2, 0x94, 0x82, + 0x88, 0x41, 0x04, 0x71, 0xa0, 0xf2, 0xee, 0x0e, 0x1b, 0x93, 0x5d, 0xcf, 0xd6, 0x1e, 0x27, 0xdd, + 0x56, 0xbd, 0x70, 0x28, 0x57, 0x24, 0xce,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 0xc4, 0xdf, 0x21, 0x80, 0x90, + 0x6e, 0x51, 0x92, 0xdd, 0x31, 0xdf, 0x3e, 0xe9, 0x44, 0xd9, 0x2f, 0x79, 0xda, 0x18, 0x7f, 0xdc, + 0x15, 0x6f, 0x23, 0x18, 0x6a, 0xa9, 0x6f, 0xae, 0x27, 0x01, 0xd0, 0xca, 0x53, 0x7a, 0xa3, 0x53, + 0xcf, 0x80, 0xc4, 0xab, 0x9c, 0x84, 0x82, 0xa7, 0x13, 0x0d, 0x95, 0x1c, 0xe1, 0x21, 0xdc, 0x51, + 0x72, 0xee, 0x30, 0x3d, 0x71, 0x33, 0x21, 0xa6, 0x56, 0xce, 0xd2, 0xe2, 0x31, 0x9c, 0x03, 0x4e, + 0xd7, 0x38, 0xa7, 0x3c, 0x56, 0x63, 0x38, 0x05, 0x82, 0x5f, 0xd0, 0x2a, 0xdc, 0xde, 0xde, 0xcd, + 0xa0, 0x67, 0xbb, 0x19, 0xf4, 0xc7, 0x6e, 0x06, 0x7d, 0xb1, 0x97, 0xe9, 0x7a, 0xb6, 0x97, 0xe9, + 0xfa, 0x6d, 0x2f, 0xd3, 0xf5, 0xd1, 0x4c, 0xe8, 0x73, 0x8d, 0xad, 0xeb, 0x96, 0x6d, 0xd8, 0x2a, + 0x61, 0xeb, 0xc4, 0xaa, 0x19, 0x26, 0x53, 0xef, 0x47, 0xc2, 0xf3, 0x8f, 0xb7, 0x62, 0x2f, 0xff, + 0x4f, 0xdc, 0x95, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x86, 0x11, 0x51, 0x16, 0x86, 0x14, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1832,6 +1952,97 @@ func (m *QueryListRecordsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x12 + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryListRecordsRequest_ValueInput) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryListRecordsRequest_ValueInput) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_ValueInput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Int != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Int)) + i-- + dAtA[i] = 0x10 + } + if len(m.String_) > 0 { + i -= len(m.String_) + copy(dAtA[i:], m.String_) + i = encodeVarintQuery(dAtA, i, uint64(len(m.String_))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryListRecordsRequest_KeyValueInput) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryListRecordsRequest_KeyValueInput) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_KeyValueInput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != nil { + { + size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Key))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -2667,6 +2878,12 @@ func (m *QueryListRecordsRequest) Size() (n int) { } var l int _ = l + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) @@ -2674,6 +2891,39 @@ func (m *QueryListRecordsRequest) Size() (n int) { return n } +func (m *QueryListRecordsRequest_ValueInput) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.String_) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Int != 0 { + n += 1 + sovQuery(uint64(m.Int)) + } + return n +} + +func (m *QueryListRecordsRequest_KeyValueInput) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Value != nil { + l = m.Value.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryListRecordsResponse) Size() (n int) { if m == nil { return 0 @@ -3159,6 +3409,40 @@ func (m *QueryListRecordsRequest) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &QueryListRecordsRequest_KeyValueInput{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } @@ -3215,6 +3499,225 @@ func (m *QueryListRecordsRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryListRecordsRequest_ValueInput) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValueInput: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValueInput: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.String_ = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) + } + m.Int = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Int |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryListRecordsRequest_KeyValueInput) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KeyValueInput: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KeyValueInput: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Value == nil { + m.Value = &QueryListRecordsRequest_ValueInput{} + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryListRecordsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From f7623b26f9d824d521eef2b452780fce49914411 Mon Sep 17 00:00:00 2001 From: nabarun Date: Thu, 14 Apr 2022 09:26:12 +0530 Subject: [PATCH 05/10] nameservice: return names with records query --- gql/resolver.go | 6 +- gql/util.go | 1 + init.sh | 2 +- .../nameservice/v1beta1/nameservice.proto | 3 + .../vulcanize/nameservice/v1beta1/query.proto | 4 +- x/nameservice/genesis.go | 11 +- x/nameservice/keeper/grpc_query.go | 10 +- x/nameservice/keeper/keeper.go | 34 ++- x/nameservice/keeper/record_keeper.go | 13 +- x/nameservice/types/nameservice.pb.go | 222 +++++++++++------- x/nameservice/types/query.pb.go | 213 ++++++++++------- x/nameservice/types/types.go | 1 + 12 files changed, 326 insertions(+), 194 deletions(-) diff --git a/gql/resolver.go b/gql/resolver.go index d8f48579..74abec0b 100644 --- a/gql/resolver.go +++ b/gql/resolver.go @@ -78,6 +78,7 @@ func (q queryResolver) ResolveNames(ctx context.Context, names []string) ([]*Rec for _, name := range names { res, err := nsQueryClient.ResolveWrn(context.Background(), &nstypes.QueryResolveWrn{Wrn: name}) if err != nil { + // Return nil for record not found. gqlResponse = append(gqlResponse, nil) } else { gqlRecord, err := getGQLRecord(context.Background(), q, *res.GetRecord()) @@ -99,7 +100,7 @@ func (q queryResolver) LookupNames(ctx context.Context, names []string) ([]*Name for _, name := range names { res, err := nsQueryClient.LookupWrn(context.Background(), &nstypes.QueryLookupWrn{Wrn: name}) if err != nil { - // Instead of throwing error for name not found, return nil similar to https://github.com/vulcanize/dxns/blob/main/gql/resolver.go#L191 + // Return nil for name not found. gqlResponse = append(gqlResponse, nil) } else { gqlRecord, err := getGQLNameRecord(res.GetName()) @@ -121,6 +122,7 @@ func (q queryResolver) QueryRecords(ctx context.Context, attributes []*KeyValueI context.Background(), &nstypes.QueryListRecordsRequest{ Attributes: parseRequestAttributes(attributes), + All: (all != nil && *all), }, ) @@ -148,9 +150,9 @@ func (q queryResolver) GetRecordsByIds(ctx context.Context, ids []string) ([]*Re gqlResponse := make([]*Record, len(ids)) for i, id := range ids { - // TODO: Implement HasRecord query similar to https://github.com/vulcanize/dxns/blob/main/gql/resolver.go#L325 res, err := nsQueryClient.GetRecord(context.Background(), &nstypes.QueryRecordByIdRequest{Id: id}) if err != nil { + // Return nil for record not found. gqlResponse[i] = nil } else { record, err := getGQLRecord(context.Background(), q, res.GetRecord()) diff --git a/gql/util.go b/gql/util.go index 33aac824..c25a0d19 100644 --- a/gql/util.go +++ b/gql/util.go @@ -76,6 +76,7 @@ func getGQLRecord(ctx context.Context, resolver QueryResolver, record nstypes.Re CreateTime: record.GetCreateTime(), ExpiryTime: record.GetExpiryTime(), Owners: record.GetOwners(), + Names: record.GetNames(), Attributes: attributes, References: references, }, nil diff --git a/init.sh b/init.sh index f240a412..e1026075 100755 --- a/init.sh +++ b/init.sh @@ -38,7 +38,7 @@ cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["para cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_reveal_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_minimum_bid"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json -if [[ "$AUCTION_ENABLED" == "true" ]]; then +if [[ "$TEST_AUCTION_ENABLED" == "true" ]]; then echo "Enabling auction and setting timers." cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_enabled"]=true' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json diff --git a/proto/vulcanize/nameservice/v1beta1/nameservice.proto b/proto/vulcanize/nameservice/v1beta1/nameservice.proto index cfba853a..860dd91c 100644 --- a/proto/vulcanize/nameservice/v1beta1/nameservice.proto +++ b/proto/vulcanize/nameservice/v1beta1/nameservice.proto @@ -81,6 +81,9 @@ message Record { string attributes = 7 [ (gogoproto.moretags) = "json:\"attributes\" yaml:\"attributes\"" ]; + repeated string names = 8 [ + (gogoproto.moretags) = "json:\"names\" yaml:\"names\"" + ]; } // AuthorityEntry defines the nameservice module AuthorityEntries diff --git a/proto/vulcanize/nameservice/v1beta1/query.proto b/proto/vulcanize/nameservice/v1beta1/query.proto index f42e52dd..2dd1638e 100644 --- a/proto/vulcanize/nameservice/v1beta1/query.proto +++ b/proto/vulcanize/nameservice/v1beta1/query.proto @@ -78,8 +78,10 @@ message QueryListRecordsRequest{ } repeated KeyValueInput attributes = 1; + bool all = 2; + // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; + cosmos.base.query.v1beta1.PageRequest pagination = 3; } // QueryListRecordsResponse is response type for nameservice records list diff --git a/x/nameservice/genesis.go b/x/nameservice/genesis.go index 026e1449..040eea5a 100644 --- a/x/nameservice/genesis.go +++ b/x/nameservice/genesis.go @@ -17,10 +17,13 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data types.GenesisState) // Add to record expiry queue if expiry time is in the future. expiryTime, err := time.Parse(time.RFC3339, record.ExpiryTime) - if err == nil { - if expiryTime.After(ctx.BlockTime()) { - keeper.InsertRecordExpiryQueue(ctx, record) - } + + if err != nil { + panic(err) + } + + if expiryTime.After(ctx.BlockTime()) { + keeper.InsertRecordExpiryQueue(ctx, record) } // Note: Bond genesis runs first, so bonds will already be present. diff --git a/x/nameservice/keeper/grpc_query.go b/x/nameservice/keeper/grpc_query.go index 9900854b..4913b592 100644 --- a/x/nameservice/keeper/grpc_query.go +++ b/x/nameservice/keeper/grpc_query.go @@ -29,11 +29,12 @@ func (q Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types. func (q Querier) ListRecords(c context.Context, req *types.QueryListRecordsRequest) (*types.QueryListRecordsResponse, error) { ctx := sdk.UnwrapSDKContext(c) attributes := req.GetAttributes() + all := req.GetAll() records := []types.Record{} if len(attributes) > 0 { records = q.Keeper.MatchRecords(ctx, func(record *types.RecordType) bool { - return MatchOnAttributes(record, attributes) + return MatchOnAttributes(record, attributes, all) }) } else { records = q.Keeper.ListRecords(ctx) @@ -139,12 +140,17 @@ func matchOnRecordField(record *types.RecordType, attr *types.QueryListRecordsRe return } -func MatchOnAttributes(record *types.RecordType, attributes []*types.QueryListRecordsRequest_KeyValueInput) bool { +func MatchOnAttributes(record *types.RecordType, attributes []*types.QueryListRecordsRequest_KeyValueInput, all bool) bool { // Filter deleted records. if record.Deleted { return false } + // If ONLY named records are requested, check for that condition first. + if !all && len(record.Names) == 0 { + return false + } + recAttrs := record.Attributes for _, attr := range attributes { diff --git a/x/nameservice/keeper/keeper.go b/x/nameservice/keeper/keeper.go index b4a3d631..6e16c96a 100644 --- a/x/nameservice/keeper/keeper.go +++ b/x/nameservice/keeper/keeper.go @@ -119,8 +119,7 @@ func (k Keeper) ListRecords(ctx sdk.Context) []types.Record { if bz != nil { var obj types.Record k.cdc.MustUnmarshal(bz, &obj) - //records = append(records, recordObjToRecord(store, k.cdc, obj)) - records = append(records, obj) + records = append(records, recordObjToRecord(store, k.cdc, obj)) } } @@ -139,8 +138,8 @@ func (k Keeper) MatchRecords(ctx sdk.Context, matchFn func(*types.RecordType) bo if bz != nil { var obj types.Record k.cdc.MustUnmarshal(bz, &obj) + obj = recordObjToRecord(store, k.cdc, obj) record := obj.ToRecordType() - // record := recordObjToRecord(store, codec, obj) if matchFn(&record) { records = append(records, obj) } @@ -223,8 +222,7 @@ func (k Keeper) processRecord(ctx sdk.Context, record *types.RecordType, isRenew } record.CreateTime = ctx.BlockHeader().Time.Format(time.RFC3339) - // record.ExpiryTime = ctx.BlockHeader().Time.Add(params.RecordRentDuration).Format(time.RFC3339) - record.ExpiryTime = ctx.BlockHeader().Time.Add(time.Minute).Format(time.RFC3339) + record.ExpiryTime = ctx.BlockHeader().Time.Add(params.RecordRentDuration).Format(time.RFC3339) record.Deleted = false k.PutRecord(ctx, record.ToRecordObj()) @@ -295,11 +293,13 @@ func (k Keeper) GetRecordExpiryQueueTimeSlice(ctx sdk.Context, timestamp time.Ti func (k Keeper) InsertRecordExpiryQueue(ctx sdk.Context, val types.Record) { expiryTime, err := time.Parse(time.RFC3339, val.ExpiryTime) - if err == nil { - timeSlice := k.GetRecordExpiryQueueTimeSlice(ctx, expiryTime) - timeSlice = append(timeSlice, val.Id) - k.SetRecordExpiryQueueTimeSlice(ctx, expiryTime, timeSlice) + if err != nil { + panic(err) } + + timeSlice := k.GetRecordExpiryQueueTimeSlice(ctx, expiryTime) + timeSlice = append(timeSlice, val.Id) + k.SetRecordExpiryQueueTimeSlice(ctx, expiryTime, timeSlice) } // GetModuleBalances gets the nameservice module account(s) balances. @@ -321,3 +321,19 @@ func (k Keeper) GetModuleBalances(ctx sdk.Context) []*types.AccountBalance { return balances } + +func recordObjToRecord(store sdk.KVStore, codec codec.BinaryCodec, record types.Record) types.Record { + reverseNameIndexKey := GetCIDToNamesIndexKey(record.Id) + + if store.Has(reverseNameIndexKey) { + names, err := helpers.BytesArrToStringArr(store.Get(reverseNameIndexKey)) + + if err != nil { + panic(err) + } + + record.Names = names + } + + return record +} diff --git a/x/nameservice/keeper/record_keeper.go b/x/nameservice/keeper/record_keeper.go index 3d50a758..2a856e32 100644 --- a/x/nameservice/keeper/record_keeper.go +++ b/x/nameservice/keeper/record_keeper.go @@ -145,8 +145,7 @@ func (k RecordKeeper) QueryRecordsByBond(ctx sdk.Context, bondID string) []types if bz != nil { var obj types.Record k.cdc.MustUnmarshal(bz, &obj) - //records = append(records, recordObjToRecord(store, k.cdc, obj)) - records = append(records, obj) + records = append(records, recordObjToRecord(store, k.cdc, obj)) } } @@ -163,10 +162,12 @@ func (k Keeper) ProcessRenewRecord(ctx sdk.Context, msg types.MsgRenewRecord) er record := k.GetRecord(ctx, msg.RecordId) expiryTime, err := time.Parse(time.RFC3339, record.ExpiryTime) - if err == nil { - if !record.Deleted || expiryTime.After(ctx.BlockTime()) { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Renewal not required.") - } + if err != nil { + panic(err) + } + + if !record.Deleted || expiryTime.After(ctx.BlockTime()) { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Renewal not required.") } recordType := record.ToRecordType() diff --git a/x/nameservice/types/nameservice.pb.go b/x/nameservice/types/nameservice.pb.go index a58f4bf1..655895e3 100644 --- a/x/nameservice/types/nameservice.pb.go +++ b/x/nameservice/types/nameservice.pb.go @@ -163,6 +163,7 @@ type Record struct { Deleted bool `protobuf:"varint,5,opt,name=deleted,proto3" json:"deleted,omitempty"` Owners []string `protobuf:"bytes,6,rep,name=owners,proto3" json:"owners,omitempty" json:"owners" yaml:"owners"` Attributes string `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty" json:"attributes" yaml:"attributes"` + Names []string `protobuf:"bytes,8,rep,name=names,proto3" json:"names,omitempty" json:"names" yaml:"names"` } func (m *Record) Reset() { *m = Record{} } @@ -247,6 +248,13 @@ func (m *Record) GetAttributes() string { return "" } +func (m *Record) GetNames() []string { + if m != nil { + return m.Names + } + return nil +} + // AuthorityEntry defines the nameservice module AuthorityEntries type AuthorityEntry struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` @@ -764,89 +772,90 @@ func init() { } var fileDescriptor_c2009c2df775dbad = []byte{ - // 1299 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcd, 0x6e, 0x1b, 0x45, - 0x1c, 0xcf, 0xc6, 0x89, 0x13, 0x8f, 0x1b, 0x83, 0x86, 0xb4, 0x75, 0x02, 0xf5, 0x06, 0xa3, 0xaa, - 0xad, 0x42, 0xbc, 0x94, 0x1e, 0xca, 0x87, 0x10, 0xca, 0x26, 0x69, 0x1a, 0x10, 0x10, 0x26, 0xb9, - 0xc0, 0xc5, 0xcc, 0xee, 0x4e, 0xec, 0xa1, 0xde, 0x5d, 0x6b, 0x67, 0x36, 0xd4, 0x70, 0xe2, 0x0d, - 0x22, 0x71, 0xa9, 0x04, 0xe2, 0x05, 0x40, 0xe2, 0x31, 0xe8, 0xb1, 0x47, 0x84, 0x84, 0x41, 0xc9, - 0x1b, 0xf8, 0x09, 0xd0, 0xce, 0xcc, 0x7e, 0xda, 0xae, 0xa3, 0xf6, 0xb6, 0xff, 0xcf, 0xf9, 0xfd, - 0x3f, 0x67, 0x16, 0x18, 0xa7, 0x61, 0xcf, 0xc6, 0x1e, 0xfd, 0x9e, 0x18, 0x1e, 0x76, 0x09, 0x23, - 0xc1, 0x29, 0xb5, 0x89, 0x71, 0x7a, 0xd7, 0x22, 0x1c, 0xdf, 0xcd, 0xf2, 0x5a, 0xfd, 0xc0, 0xe7, - 0x3e, 0xbc, 0x91, 0x18, 0xb4, 0xb2, 0x42, 0x65, 0xb0, 0xde, 0xe8, 0xf8, 0x7e, 0xa7, 0x47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 0x7d, 0x1a, 0x0c, 0xa4, 0xa7, 0x85, 0xa2, 0x27, 0x29, 0xcc, 0x7a, 0xca, 0x70, 0x10, - 0x48, 0x09, 0x58, 0x07, 0x4b, 0x0e, 0xe9, 0x11, 0x4e, 0xe4, 0xca, 0x5e, 0x46, 0x31, 0x09, 0xef, - 0x83, 0xb2, 0xff, 0x9d, 0x47, 0x02, 0x56, 0x2f, 0x6f, 0x94, 0xf2, 0x61, 0x4a, 0x7e, 0xec, 0x5a, - 0x51, 0x48, 0xa9, 0xc3, 0x7d, 0x00, 0x30, 0xe7, 0x01, 0xb5, 0x42, 0x4e, 0x98, 0xd8, 0x6e, 0x39, - 0x6c, 0xa9, 0x2c, 0x29, 0x60, 0xca, 0x41, 0x19, 0xd3, 0x66, 0x17, 0xd4, 0xb6, 0xe3, 0xda, 0xed, - 0x79, 0x3c, 0x18, 0x40, 0x08, 0x16, 0xa2, 0xd7, 0x91, 0x2c, 0x13, 0x12, 0xdf, 0xd0, 0x04, 0x8b, - 0x24, 0x12, 0xaa, 0xd7, 0xc1, 0xdb, 0xad, 0xe7, 0xbe, 0xa4, 0x5a, 0x9f, 0x63, 0x97, 0x24, 0x5e, - 0x91, 0x34, 0x6d, 0xfe, 0x5d, 0x02, 0x2b, 0x39, 0x01, 0xfc, 0x0a, 0xbc, 0x2a, 0xc2, 0x69, 0xf7, - 0x43, 0xab, 0x47, 0xed, 0xf6, 0x23, 0x32, 0x50, 0xcd, 0x61, 0xa4, 0x77, 0xba, 0xd0, 0x38, 0x14, - 0x0a, 0x9f, 0x92, 0x41, 0x2e, 0x1f, 0x29, 0x17, 0xd5, 0xf2, 0x0c, 0x78, 0x08, 0x56, 0xa4, 0x6b, - 0xec, 0x38, 0x01, 0x61, 0x4c, 0xb5, 0xd1, 0xe6, 0x68, 0xa8, 0xdf, 0xca, 0xf8, 0xdd, 0x96, 0xd2, - 0x9c, 0xd7, 0x98, 0x87, 0xae, 0x64, 0x49, 0x78, 0x0d, 0x94, 0xb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x8d, 0xb9, 0x67, 0x17, 0x8d, 0xb9, 0xbf, 0x2e, 0x1a, - 0x73, 0x5f, 0xbf, 0xd3, 0xa1, 0xbc, 0x1b, 0x5a, 0x2d, 0xdb, 0x77, 0x0d, 0xde, 0xc5, 0x01, 0xa3, - 0xcc, 0x20, 0xbc, 0x4b, 0x02, 0x97, 0x7a, 0xdc, 0x78, 0x9c, 0xfb, 0x63, 0xe6, 0x83, 0x3e, 0x61, - 0x56, 0x59, 0xec, 0x84, 0x7b, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x12, 0x43, 0x47, 0x57, - 0x0f, 0x00, 0x00, + // 1325 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xdd, 0x6e, 0x1b, 0xc5, + 0x17, 0xcf, 0xc6, 0x89, 0x13, 0x4f, 0x1a, 0xff, 0xff, 0x1a, 0xd2, 0x76, 0x13, 0xa8, 0x37, 0x18, + 0x55, 0x6d, 0x55, 0xea, 0xa5, 0xf4, 0xa2, 0x7c, 0x08, 0xa1, 0x6c, 0xd2, 0xa6, 0x01, 0x01, 0x61, + 0xda, 0x1b, 0xb8, 0x31, 0xb3, 0xbb, 0x53, 0x7b, 0xa8, 0x77, 0xd7, 0xda, 0x99, 0x0d, 0x35, 0x5c, + 0xf1, 0x06, 0x95, 0xb8, 0xe9, 0x05, 0xe2, 0x05, 0x40, 0xe2, 0x31, 0xe8, 0x65, 0x2f, 0x11, 0x12, + 0x06, 0xb5, 0x6f, 0xe0, 0x27, 0x40, 0x3b, 0x1f, 0xfb, 0x65, 0xbb, 0x8e, 0xda, 0xbb, 0x3d, 0xe7, + 0x77, 0xce, 0x99, 0xdf, 0x9c, 0x39, 0xe7, 0xcc, 0x2c, 0xb0, 0x4f, 0x92, 0x81, 0x87, 0x43, 0xfa, + 0x3d, 0xb1, 0x43, 0x1c, 0x10, 0x46, 0xe2, 0x13, 0xea, 0x11, 0xfb, 0xe4, 0xba, 0x4b, 0x38, 0xbe, + 0x5e, 0xd4, 0x75, 0x86, 0x71, 0xc4, 0x23, 0x78, 0x21, 0x73, 0xe8, 0x14, 0x41, 0xe5, 0xb0, 0xd3, + 0xea, 0x45, 0x51, 0x6f, 0x40, 0x6c, 0x61, 0xec, 0x26, 0xf7, 0x6d, 0x3f, 0x89, 0x31, 0xa7, 0x51, + 0x28, 0xdd, 0x77, 0xac, 0x2a, 0xce, 0x69, 0x40, 0x18, 0xc7, 0xc1, 0x50, 0x19, 0x6c, 0xf5, 0xa2, + 0x5e, 0x24, 0x3e, 0xed, 0xf4, 0x4b, 0x69, 0x5b, 0x5e, 0xc4, 0x82, 0x88, 0xd9, 0x2e, 0x66, 0x39, + 0x39, 0x2f, 0xa2, 0x2a, 0x6c, 0xfb, 0xef, 0x4d, 0x50, 0x3f, 0xc6, 0x31, 0x0e, 0x18, 0xa4, 0x60, + 0x23, 0x26, 0x5e, 0x14, 0xfb, 0xdd, 0x98, 0x84, 0xdc, 0x34, 0x76, 0x8d, 0xcb, 0x1b, 0xef, 0x6e, + 0x77, 0x64, 0x80, 0x4e, 0x1a, 0x40, 0x93, 0xed, 0xec, 0x47, 0x34, 0x74, 0xae, 0x3d, 0x19, 0x5b, + 0x4b, 0x93, 0xb1, 0x75, 0xf1, 0x5b, 0x16, 0x85, 0x1f, 0xb4, 0x0b, 0xbe, 0xed, 0xdd, 0x11, 0x0e, + 0x06, 0x65, 0x15, 0x02, 0x52, 0x42, 0x24, 0xe4, 0xf0, 0x91, 0x01, 0xb6, 0x0a, 0x60, 0x57, 0xef, + 0xd5, 0x5c, 0x56, 0x8b, 0xca, 0xcd, 0x76, 0xf4, 0x66, 0x3b, 0x07, 0xca, 0xc0, 0xd9, 0x57, 0x8b, + 0xde, 0x9c, 0x5a, 0x34, 0x0b, 0x32, 0x63, 0xf5, 0x1c, 0x7b, 0xfc, 0x8f, 0x65, 0x20, 0x98, 0x53, + 0x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, + 0xe2, 0x06, 0x69, 0x38, 0x97, 0x26, 0x63, 0xeb, 0x2d, 0xe9, 0x2d, 0xc1, 0x7b, 0x34, 0xc8, 0x8e, + 0xa2, 0xa0, 0x41, 0x20, 0x17, 0xd2, 0x48, 0xe4, 0xe1, 0x90, 0xc6, 0x23, 0x19, 0x69, 0xa5, 0x1a, + 0x49, 0x82, 0xc5, 0x48, 0x05, 0x0d, 0x02, 0xb9, 0x00, 0x4d, 0xb0, 0xe6, 0x93, 0x01, 0xe1, 0x44, + 0x8e, 0xec, 0x75, 0xa4, 0x45, 0x78, 0x13, 0xd4, 0xa3, 0xef, 0x42, 0x12, 0x33, 0xb3, 0xbe, 0x5b, + 0x2b, 0x6f, 0x53, 0xea, 0x75, 0x68, 0x25, 0x21, 0x65, 0x0e, 0x0f, 0x01, 0xc0, 0x9c, 0xc7, 0xd4, + 0x4d, 0x38, 0x61, 0x62, 0xba, 0x95, 0xb8, 0xe5, 0x58, 0x76, 0x80, 0xb9, 0x06, 0x15, 0x5c, 0xe1, + 0x0d, 0xb0, 0x2a, 0xde, 0x42, 0xe6, 0xba, 0x20, 0x70, 0x61, 0x32, 0xb6, 0xb6, 0x65, 0x0c, 0xa1, + 0xd6, 0xee, 0x52, 0x40, 0xd2, 0xb6, 0xdd, 0x07, 0xcd, 0x3d, 0x7d, 0xe0, 0xb7, 0x42, 0x1e, 0x8f, + 0x20, 0x04, 0x2b, 0x29, 0x24, 0xcf, 0x16, 0x89, 0x6f, 0xe8, 0x80, 0x55, 0x92, 0x82, 0xea, 0x49, + 0xf1, 0x76, 0xe7, 0x85, 0xcf, 0xaf, 0xce, 0xe7, 0x38, 0x20, 0x59, 0x54, 0x24, 0x5d, 0xdb, 0x7f, + 0xd5, 0xc0, 0x66, 0x09, 0x80, 0x5f, 0x81, 0xff, 0x8b, 0x1c, 0x74, 0x87, 0x89, 0x3b, 0xa0, 0x5e, + 0xf7, 0x01, 0x19, 0xa9, 0x8a, 0xb2, 0xf3, 0x87, 0x80, 0xb0, 0x38, 0x16, 0x06, 0x9f, 0x92, 0x51, + 0x29, 0x89, 0xb9, 0x16, 0x35, 0xcb, 0x0a, 0x78, 0x0c, 0x36, 0x65, 0x68, 0xec, 0xfb, 0x31, 0x61, + 0x4c, 0xd5, 0xde, 0xd5, 0xc9, 0xd8, 0xba, 0x54, 0x88, 0xbb, 0x27, 0xd1, 0x52, 0x54, 0xad, 0x43, + 0x67, 0x8a, 0x22, 0x3c, 0x07, 0xea, 0x7d, 0x42, 0x7b, 0x7d, 0xf9, 0x94, 0x59, 0x41, 0x4a, 0x4a, + 0xf5, 0x8c, 0x63, 0x9e, 0x30, 0x59, 0x56, 0x48, 0x49, 0xf0, 0x00, 0x00, 0xdd, 0x5f, 0x54, 0x16, + 0x4b, 0xc3, 0xb9, 0x38, 0x19, 0x5b, 0x6f, 0xea, 0x56, 0x15, 0xd8, 0xd1, 0x41, 0xde, 0x96, 0x5a, + 0x81, 0x1a, 0xfa, 0xbb, 0xd4, 0x3d, 0xf5, 0x99, 0xdd, 0x73, 0x50, 0xea, 0x9e, 0x83, 0xbc, 0x7b, + 0x06, 0xe5, 0x9a, 0x97, 0xb7, 0xe6, 0xce, 0xd4, 0x5d, 0x73, 0x4f, 0x3f, 0x7c, 0x1d, 0x5b, 0xcd, + 0x92, 0xd3, 0xf4, 0xc4, 0xa3, 0xf4, 0xf2, 0x28, 0xf4, 0x45, 0xfb, 0x1b, 0xd0, 0x48, 0xcf, 0x76, + 0x7e, 0x05, 0x7d, 0x5c, 0xae, 0xa0, 0x2b, 0xa7, 0xa8, 0x20, 0x39, 0x69, 0x74, 0xf9, 0xfc, 0x62, + 0x00, 0x90, 0x6b, 0xe1, 0x6d, 0x50, 0x1f, 0x60, 0x4e, 0x98, 0x7e, 0x5a, 0x77, 0x4e, 0x1d, 0x50, + 0x70, 0x44, 0xca, 0x1b, 0xde, 0x01, 0x6b, 0x7d, 0xca, 0x78, 0x24, 0x98, 0xd5, 0x5e, 0x22, 0x90, + 0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, 0xbc, 0x64, 0x23, 0xdf, 0x03, 0x4d, 0x97, 0xfa, 0xfe, 0xd4, + 0x44, 0xba, 0x36, 0x19, 0x5b, 0x57, 0x54, 0x3f, 0x0b, 0xbc, 0x32, 0x92, 0xca, 0x4a, 0xb4, 0x59, + 0x92, 0x9d, 0x4f, 0x9e, 0x3c, 0x6b, 0x19, 0x4f, 0x9f, 0xb5, 0x8c, 0x7f, 0x9f, 0xb5, 0x8c, 0x47, + 0xcf, 0x5b, 0x4b, 0x4f, 0x9f, 0xb7, 0x96, 0xfe, 0x7c, 0xde, 0x5a, 0xfa, 0xfa, 0x9d, 0x1e, 0xe5, + 0xfd, 0xc4, 0xed, 0x78, 0x51, 0x60, 0xf3, 0x3e, 0x8e, 0x19, 0x65, 0x36, 0xe1, 0x7d, 0x12, 0x07, + 0x34, 0xe4, 0xf6, 0xc3, 0xd2, 0x6f, 0x36, 0x1f, 0x0d, 0x09, 0x73, 0xeb, 0x62, 0x26, 0xdc, 0xf8, + 0x2f, 0x00, 0x00, 0xff, 0xff, 0x7f, 0x95, 0x34, 0xdd, 0x8c, 0x0f, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -992,6 +1001,15 @@ func (m *Record) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Names) > 0 { + for iNdEx := len(m.Names) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Names[iNdEx]) + copy(dAtA[i:], m.Names[iNdEx]) + i = encodeVarintNameservice(dAtA, i, uint64(len(m.Names[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } if len(m.Attributes) > 0 { i -= len(m.Attributes) copy(dAtA[i:], m.Attributes) @@ -1518,6 +1536,12 @@ func (m *Record) Size() (n int) { if l > 0 { n += 1 + l + sovNameservice(uint64(l)) } + if len(m.Names) > 0 { + for _, s := range m.Names { + l = len(s) + n += 1 + l + sovNameservice(uint64(l)) + } + } return n } @@ -2347,6 +2371,38 @@ func (m *Record) Unmarshal(dAtA []byte) error { } m.Attributes = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNameservice + } + 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 ErrInvalidLengthNameservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNameservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Names = append(m.Names, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipNameservice(dAtA[iNdEx:]) diff --git a/x/nameservice/types/query.pb.go b/x/nameservice/types/query.pb.go index cfb3d364..c96e6f62 100644 --- a/x/nameservice/types/query.pb.go +++ b/x/nameservice/types/query.pb.go @@ -117,8 +117,9 @@ func (m *QueryParamsResponse) GetParams() *Params { // QueryListRecordsRequest is request type for nameservice records list type QueryListRecordsRequest struct { Attributes []*QueryListRecordsRequest_KeyValueInput `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"` + All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"` // pagination defines an optional pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryListRecordsRequest) Reset() { *m = QueryListRecordsRequest{} } @@ -161,6 +162,13 @@ func (m *QueryListRecordsRequest) GetAttributes() []*QueryListRecordsRequest_Key return nil } +func (m *QueryListRecordsRequest) GetAll() bool { + if m != nil { + return m.All + } + return false +} + func (m *QueryListRecordsRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination @@ -1316,90 +1324,90 @@ func init() { } var fileDescriptor_73d2465766c8f876 = []byte{ - // 1313 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4f, 0x6c, 0xdc, 0xc4, - 0x17, 0xce, 0x64, 0x9b, 0xf4, 0x97, 0xb7, 0xbf, 0x26, 0x64, 0x88, 0xda, 0xd4, 0x4d, 0x37, 0xc5, - 0xcd, 0x9f, 0x0d, 0x64, 0xed, 0x6c, 0x4a, 0xd3, 0x36, 0x15, 0x88, 0x6c, 0x1a, 0xa2, 0x94, 0x82, - 0x88, 0x41, 0x04, 0x71, 0xa0, 0xf2, 0xee, 0x0e, 0x1b, 0x93, 0x5d, 0xcf, 0xd6, 0x1e, 0x27, 0xdd, - 0x56, 0xbd, 0x70, 0x28, 0x57, 0x24, 0xce, 0x20, 0x90, 0x38, 0x55, 0x02, 0xae, 0xbd, 0x73, 0x89, - 0x38, 0x55, 0x82, 0x03, 0xa7, 0x80, 0x12, 0x24, 0xee, 0x3d, 0x72, 0x42, 0x1e, 0x8f, 0xbd, 0x76, - 0xb2, 0x89, 0xbd, 0x9b, 0x20, 0x71, 0x8a, 0x77, 0xe6, 0xfd, 0xf9, 0xbe, 0xf7, 0x66, 0x9e, 0x3f, - 0x07, 0xa6, 0x36, 0x9d, 0x6a, 0x49, 0x37, 0x8d, 0x07, 0x44, 0x35, 0xf5, 0x1a, 0xb1, 0x89, 0xb5, - 0x69, 0x94, 0x88, 0xba, 0x99, 0x2f, 0x12, 0xa6, 0xe7, 0xd5, 0x7b, 0x0e, 0xb1, 0x1a, 0x4a, 0xdd, - 0xa2, 0x8c, 0xe2, 0x8b, 0x81, 0xa9, 0x12, 0x32, 0x55, 0x84, 0xa9, 0xa4, 0x1e, 0x1d, 0x29, 0xec, - 0xc2, 0xe3, 0x49, 0x23, 0x15, 0x4a, 0x2b, 0x55, 0xa2, 0xea, 0x75, 0x43,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9, - 0xfa, 0x6d, 0x2f, 0xd3, 0xf5, 0xd1, 0x4c, 0xe8, 0x73, 0x8d, 0xad, 0xeb, 0x96, 0x6d, 0xd8, 0x2a, - 0x61, 0xeb, 0xc4, 0xaa, 0x19, 0x26, 0x53, 0xef, 0x47, 0xc2, 0xf3, 0x8f, 0xb7, 0x62, 0x2f, 0xff, - 0x4f, 0xdc, 0x95, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x86, 0x11, 0x51, 0x16, 0x86, 0x14, 0x00, - 0x00, + // 1327 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6c, 0x1b, 0x45, + 0x14, 0xce, 0xc4, 0x4d, 0xda, 0x3c, 0xd3, 0x94, 0x0e, 0x51, 0x9b, 0x6e, 0x5b, 0xa7, 0x6c, 0xff, + 0x1c, 0x88, 0x77, 0x63, 0x97, 0xa6, 0x6d, 0x2a, 0x10, 0x71, 0x1a, 0xa2, 0x94, 0x82, 0xc8, 0x82, + 0x08, 0xe2, 0x40, 0xb5, 0xb6, 0x07, 0x67, 0x89, 0xbd, 0xe3, 0xee, 0xce, 0x26, 0x75, 0xab, 0x5e, + 0x38, 0xf4, 0x86, 0x84, 0xc4, 0x19, 0x04, 0x12, 0xa7, 0x4a, 0xc0, 0xb5, 0x77, 0x2e, 0x11, 0xa7, + 0x4a, 0x70, 0xe0, 0x14, 0x50, 0x82, 0xc4, 0xbd, 0x47, 0x4e, 0x68, 0x67, 0x66, 0xd7, 0xbb, 0x89, + 0x13, 0xaf, 0x9d, 0x20, 0x71, 0xf2, 0xee, 0xcc, 0xfb, 0xde, 0x7b, 0xdf, 0x7b, 0x6f, 0xde, 0xbc, + 0x35, 0x8c, 0xaf, 0x7a, 0xb5, 0xb2, 0x69, 0x5b, 0x0f, 0x88, 0x6e, 0x9b, 0x75, 0xe2, 0x12, 0x67, + 0xd5, 0x2a,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, 0x8f, 0x19, 0x11, 0xbd, 0xf8, 0x45, 0x48, + 0x99, 0xb5, 0xda, 0x68, 0xff, 0x39, 0x94, 0x3d, 0x62, 0xf8, 0x8f, 0xf8, 0x2d, 0x80, 0x56, 0x24, + 0x47, 0x53, 0x9c, 0xd6, 0x25, 0x4d, 0x04, 0x4d, 0xf3, 0x83, 0xa6, 0x89, 0xec, 0xb7, 0x28, 0x55, + 0x89, 0xb4, 0x63, 0x44, 0x90, 0xca, 0x14, 0x40, 0xcb, 0x26, 0x3e, 0x01, 0x83, 0x2e, 0x73, 0x2c, + 0xbb, 0xca, 0x03, 0x35, 0x64, 0xc8, 0x37, 0xdf, 0xbe, 0x65, 0x33, 0x6e, 0x3f, 0x65, 0xf8, 0x8f, + 0xca, 0x03, 0x38, 0x1a, 0x73, 0xd7, 0x17, 0x59, 0x21, 0x4d, 0x89, 0xf3, 0x1f, 0xf1, 0x12, 0x0c, + 0xac, 0xfa, 0xfb, 0x1c, 0x96, 0x2e, 0xcc, 0xf4, 0x18, 0x95, 0x48, 0x48, 0x84, 0x3e, 0xf5, 0x09, + 0x82, 0xd1, 0x9d, 0xd2, 0x32, 0xd7, 0x73, 0x70, 0xd8, 0x11, 0x4b, 0x32, 0x1b, 0x9d, 0x92, 0x2d, + 0x14, 0x14, 0x0f, 0xad, 0x6f, 0x8c, 0xf5, 0x19, 0x01, 0x16, 0xcf, 0xc7, 0xe2, 0x2b, 0x18, 0x5c, + 0xee, 0x18, 0x5f, 0xe1, 0x43, 0x34, 0xc0, 0x6a, 0x16, 0x4e, 0x70, 0x5f, 0xa5, 0x99, 0xe6, 0x42, + 0x25, 0x28, 0x9d, 0x61, 0xe8, 0xb7, 0x2a, 0x32, 0x60, 0xfd, 0x56, 0x45, 0xfd, 0x44, 0x56, 0x59, + 0x54, 0x52, 0x92, 0x9a, 0x85, 0x41, 0xe1, 0x58, 0xc2, 0x02, 0x8e, 0x71, 0x92, 0x50, 0x95, 0x81, + 0x12, 0xd3, 0x5f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, 0xab, 0xf0, 0x5b, 0xc9, 0xc9, + 0xdd, 0xe6, 0x89, 0x9b, 0x09, 0x7d, 0x6a, 0x07, 0x56, 0x66, 0xf7, 0x01, 0x0e, 0x39, 0x5d, 0xe3, + 0x9c, 0xf2, 0x58, 0xef, 0xc0, 0x29, 0x1c, 0xf8, 0x25, 0xad, 0xe2, 0xed, 0xf5, 0xcd, 0x0c, 0x7a, + 0xb6, 0x99, 0x41, 0x7f, 0x6e, 0x66, 0xd0, 0x97, 0x5b, 0x99, 0xbe, 0x67, 0x5b, 0x99, 0xbe, 0xdf, + 0xb7, 0x32, 0x7d, 0x1f, 0x4f, 0x46, 0x3e, 0xd7, 0xd8, 0xb2, 0xe9, 0xb8, 0x96, 0xab, 0x13, 0xb6, + 0x4c, 0x9c, 0xba, 0x65, 0x33, 0xfd, 0x7e, 0x4c, 0x3d, 0xff, 0x78, 0x2b, 0x0d, 0xf2, 0xff, 0xe3, + 0xae, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x7d, 0xf0, 0x84, 0x8c, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1952,7 +1960,17 @@ func (m *QueryListRecordsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + } + if m.All { + i-- + if m.All { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } if len(m.Attributes) > 0 { for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { @@ -2884,6 +2902,9 @@ func (m *QueryListRecordsRequest) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } + if m.All { + n += 2 + } if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovQuery(uint64(l)) @@ -3443,6 +3464,26 @@ func (m *QueryListRecordsRequest) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field All", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.All = bool(v != 0) + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } diff --git a/x/nameservice/types/types.go b/x/nameservice/types/types.go index db8f6537..f60b0cea 100644 --- a/x/nameservice/types/types.go +++ b/x/nameservice/types/types.go @@ -56,6 +56,7 @@ func (r *Record) ToRecordType() RecordType { resourceObj.ExpiryTime = r.ExpiryTime resourceObj.Deleted = r.Deleted resourceObj.Owners = r.Owners + resourceObj.Names = r.Names resourceObj.Attributes = helpers.UnMarshalMapFromJSONBytes(helpers.BytesFromBase64(r.Attributes)) return resourceObj From 8477b3d9cb3a10b1b88d592d4a1fe628ce4a5123 Mon Sep 17 00:00:00 2001 From: nabarun Date: Mon, 18 Apr 2022 18:04:52 +0530 Subject: [PATCH 06/10] Implement float, boolean and reference types for attributes keyValueInput --- gql/util.go | 23 + .../vulcanize/nameservice/v1beta1/query.proto | 12 +- x/nameservice/keeper/grpc_query.go | 38 +- x/nameservice/types/query.pb.go | 601 +++++++++++++++--- 4 files changed, 579 insertions(+), 95 deletions(-) diff --git a/gql/util.go b/gql/util.go index c25a0d19..c2cbeb29 100644 --- a/gql/util.go +++ b/gql/util.go @@ -279,12 +279,35 @@ func parseRequestAttributes(attrs []*KeyValueInput) []*nstypes.QueryListRecordsR if value.Value.String != nil { kvPair.Value.String_ = *value.Value.String + kvPair.Value.Type = "string" } if value.Value.Int != nil { kvPair.Value.Int = int64(*value.Value.Int) + kvPair.Value.Type = "int" } + if value.Value.Float != nil { + kvPair.Value.Float = *value.Value.Float + kvPair.Value.Type = "float" + } + + if value.Value.Boolean != nil { + kvPair.Value.Boolean = *value.Value.Boolean + kvPair.Value.Type = "boolean" + } + + if value.Value.Reference != nil { + reference := &nstypes.QueryListRecordsRequest_ReferenceInput{ + Id: value.Value.Reference.ID, + } + + kvPair.Value.Reference = reference + kvPair.Value.Type = "reference" + } + + // TODO: Handle arrays. + kvPairs = append(kvPairs, kvPair) } diff --git a/proto/vulcanize/nameservice/v1beta1/query.proto b/proto/vulcanize/nameservice/v1beta1/query.proto index 2dd1638e..95b8eb54 100644 --- a/proto/vulcanize/nameservice/v1beta1/query.proto +++ b/proto/vulcanize/nameservice/v1beta1/query.proto @@ -68,9 +68,17 @@ message QueryParamsResponse{ // QueryListRecordsRequest is request type for nameservice records list message QueryListRecordsRequest{ + message ReferenceInput { + string id = 1; + } message ValueInput { - string string = 1; - int64 int = 2; + string type = 1; + string string = 2; + int64 int = 3; + double float = 4; + bool boolean = 5; + ReferenceInput reference = 6; + repeated ValueInput values = 7; } message KeyValueInput { string key = 1; diff --git a/x/nameservice/keeper/grpc_query.go b/x/nameservice/keeper/grpc_query.go index 4913b592..8319db36 100644 --- a/x/nameservice/keeper/grpc_query.go +++ b/x/nameservice/keeper/grpc_query.go @@ -170,14 +170,21 @@ func MatchOnAttributes(record *types.RecordType, attributes []*types.QueryListRe return false } - if attr.Value.Int != 0 { + if attr.Value.Type == "int" { recAttrValInt, ok := recAttrVal.(int) if !ok || int(attr.Value.GetInt()) != recAttrValInt { return false } } - if attr.Value.String_ != "" { + if attr.Value.Type == "float" { + recAttrValFloat, ok := recAttrVal.(float64) + if !ok || attr.Value.GetFloat() != recAttrValFloat { + return false + } + } + + if attr.Value.Type == "string" { recAttrValString, ok := recAttrVal.(string) if !ok { return false @@ -188,7 +195,32 @@ func MatchOnAttributes(record *types.RecordType, attributes []*types.QueryListRe } } - // TODO: Handle other attribute value types. + if attr.Value.Type == "boolean" { + recAttrValBool, ok := recAttrVal.(bool) + if !ok || attr.Value.GetBoolean() != recAttrValBool { + return false + } + } + + if attr.Value.Type == "reference" { + obj, ok := recAttrVal.(map[string]interface{}) + if !ok { + // Attr value is not an object. + return false + } + + if _, ok := obj["/"].(string); !ok { + // Attr value is not a reference. + return false + } + + recAttrValRefID := obj["/"].(string) + if recAttrValRefID != attr.Value.GetReference().GetId() { + return false + } + } + + // TODO: Handle arrays. } return true diff --git a/x/nameservice/types/query.pb.go b/x/nameservice/types/query.pb.go index c96e6f62..89aaf4c4 100644 --- a/x/nameservice/types/query.pb.go +++ b/x/nameservice/types/query.pb.go @@ -5,6 +5,7 @@ package types import ( context "context" + encoding_binary "encoding/binary" fmt "fmt" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -176,16 +177,67 @@ func (m *QueryListRecordsRequest) GetPagination() *query.PageRequest { return nil } +type QueryListRecordsRequest_ReferenceInput struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (m *QueryListRecordsRequest_ReferenceInput) Reset() { + *m = QueryListRecordsRequest_ReferenceInput{} +} +func (m *QueryListRecordsRequest_ReferenceInput) String() string { return proto.CompactTextString(m) } +func (*QueryListRecordsRequest_ReferenceInput) ProtoMessage() {} +func (*QueryListRecordsRequest_ReferenceInput) Descriptor() ([]byte, []int) { + return fileDescriptor_73d2465766c8f876, []int{2, 0} +} +func (m *QueryListRecordsRequest_ReferenceInput) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryListRecordsRequest_ReferenceInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryListRecordsRequest_ReferenceInput.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryListRecordsRequest_ReferenceInput) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryListRecordsRequest_ReferenceInput.Merge(m, src) +} +func (m *QueryListRecordsRequest_ReferenceInput) XXX_Size() int { + return m.Size() +} +func (m *QueryListRecordsRequest_ReferenceInput) XXX_DiscardUnknown() { + xxx_messageInfo_QueryListRecordsRequest_ReferenceInput.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryListRecordsRequest_ReferenceInput proto.InternalMessageInfo + +func (m *QueryListRecordsRequest_ReferenceInput) GetId() string { + if m != nil { + return m.Id + } + return "" +} + type QueryListRecordsRequest_ValueInput struct { - String_ string `protobuf:"bytes,1,opt,name=string,proto3" json:"string,omitempty"` - Int int64 `protobuf:"varint,2,opt,name=int,proto3" json:"int,omitempty"` + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + String_ string `protobuf:"bytes,2,opt,name=string,proto3" json:"string,omitempty"` + Int int64 `protobuf:"varint,3,opt,name=int,proto3" json:"int,omitempty"` + Float float64 `protobuf:"fixed64,4,opt,name=float,proto3" json:"float,omitempty"` + Boolean bool `protobuf:"varint,5,opt,name=boolean,proto3" json:"boolean,omitempty"` + Reference *QueryListRecordsRequest_ReferenceInput `protobuf:"bytes,6,opt,name=reference,proto3" json:"reference,omitempty"` + Values []*QueryListRecordsRequest_ValueInput `protobuf:"bytes,7,rep,name=values,proto3" json:"values,omitempty"` } func (m *QueryListRecordsRequest_ValueInput) Reset() { *m = QueryListRecordsRequest_ValueInput{} } func (m *QueryListRecordsRequest_ValueInput) String() string { return proto.CompactTextString(m) } func (*QueryListRecordsRequest_ValueInput) ProtoMessage() {} func (*QueryListRecordsRequest_ValueInput) Descriptor() ([]byte, []int) { - return fileDescriptor_73d2465766c8f876, []int{2, 0} + return fileDescriptor_73d2465766c8f876, []int{2, 1} } func (m *QueryListRecordsRequest_ValueInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -214,6 +266,13 @@ func (m *QueryListRecordsRequest_ValueInput) XXX_DiscardUnknown() { var xxx_messageInfo_QueryListRecordsRequest_ValueInput proto.InternalMessageInfo +func (m *QueryListRecordsRequest_ValueInput) GetType() string { + if m != nil { + return m.Type + } + return "" +} + func (m *QueryListRecordsRequest_ValueInput) GetString_() string { if m != nil { return m.String_ @@ -228,6 +287,34 @@ func (m *QueryListRecordsRequest_ValueInput) GetInt() int64 { return 0 } +func (m *QueryListRecordsRequest_ValueInput) GetFloat() float64 { + if m != nil { + return m.Float + } + return 0 +} + +func (m *QueryListRecordsRequest_ValueInput) GetBoolean() bool { + if m != nil { + return m.Boolean + } + return false +} + +func (m *QueryListRecordsRequest_ValueInput) GetReference() *QueryListRecordsRequest_ReferenceInput { + if m != nil { + return m.Reference + } + return nil +} + +func (m *QueryListRecordsRequest_ValueInput) GetValues() []*QueryListRecordsRequest_ValueInput { + if m != nil { + return m.Values + } + return nil +} + type QueryListRecordsRequest_KeyValueInput struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value *QueryListRecordsRequest_ValueInput `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` @@ -237,7 +324,7 @@ func (m *QueryListRecordsRequest_KeyValueInput) Reset() { *m = QueryList func (m *QueryListRecordsRequest_KeyValueInput) String() string { return proto.CompactTextString(m) } func (*QueryListRecordsRequest_KeyValueInput) ProtoMessage() {} func (*QueryListRecordsRequest_KeyValueInput) Descriptor() ([]byte, []int) { - return fileDescriptor_73d2465766c8f876, []int{2, 1} + return fileDescriptor_73d2465766c8f876, []int{2, 2} } func (m *QueryListRecordsRequest_KeyValueInput) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1294,6 +1381,7 @@ func init() { proto.RegisterType((*QueryParamsRequest)(nil), "vulcanize.nameservice.v1beta1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "vulcanize.nameservice.v1beta1.QueryParamsResponse") proto.RegisterType((*QueryListRecordsRequest)(nil), "vulcanize.nameservice.v1beta1.QueryListRecordsRequest") + proto.RegisterType((*QueryListRecordsRequest_ReferenceInput)(nil), "vulcanize.nameservice.v1beta1.QueryListRecordsRequest.ReferenceInput") proto.RegisterType((*QueryListRecordsRequest_ValueInput)(nil), "vulcanize.nameservice.v1beta1.QueryListRecordsRequest.ValueInput") proto.RegisterType((*QueryListRecordsRequest_KeyValueInput)(nil), "vulcanize.nameservice.v1beta1.QueryListRecordsRequest.KeyValueInput") proto.RegisterType((*QueryListRecordsResponse)(nil), "vulcanize.nameservice.v1beta1.QueryListRecordsResponse") @@ -1324,90 +1412,96 @@ func init() { } var fileDescriptor_73d2465766c8f876 = []byte{ - // 1327 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6c, 0x1b, 0x45, - 0x14, 0xce, 0xc4, 0x4d, 0xda, 0x3c, 0xd3, 0x94, 0x0e, 0x51, 0x9b, 0x6e, 0x5b, 0xa7, 0x6c, 0xff, - 0x1c, 0x88, 0x77, 0x63, 0x97, 0xa6, 0x6d, 0x2a, 0x10, 0x71, 0x1a, 0xa2, 0x94, 0x82, 0xc8, 0x82, - 0x08, 0xe2, 0x40, 0xb5, 0xb6, 0x07, 0x67, 0x89, 0xbd, 0xe3, 0xee, 0xce, 0x26, 0x75, 0xab, 0x5e, - 0x38, 0xf4, 0x86, 0x84, 0xc4, 0x19, 0x04, 0x12, 0xa7, 0x4a, 0xc0, 0xb5, 0x77, 0x2e, 0x11, 0xa7, - 0x4a, 0x70, 0xe0, 0x14, 0x50, 0x82, 0xc4, 0xbd, 0x47, 0x4e, 0x68, 0x67, 0x66, 0xd7, 0xbb, 0x89, - 0x13, 0xaf, 0x9d, 0x20, 0x71, 0xf2, 0xee, 0xcc, 0xfb, 0xde, 0x7b, 0xdf, 0x7b, 0x6f, 0xde, 0xbc, - 0x35, 0x8c, 0xaf, 0x7a, 0xb5, 0xb2, 0x69, 0x5b, 0x0f, 0x88, 0x6e, 0x9b, 0x75, 0xe2, 0x12, 0x67, - 0xd5, 0x2a, 0x13, 0x7d, 0x35, 0x5f, 0x22, 0xcc, 0xcc, 0xeb, 0xf7, 0x3c, 0xe2, 0x34, 0xb5, 0x86, -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d, 0x62, 0xf8, 0x8f, 0xf8, 0x2d, 0x80, 0x56, 0x24, - 0x47, 0x53, 0x9c, 0xd6, 0x25, 0x4d, 0x04, 0x4d, 0xf3, 0x83, 0xa6, 0x89, 0xec, 0xb7, 0x28, 0x55, - 0x89, 0xb4, 0x63, 0x44, 0x90, 0xca, 0x14, 0x40, 0xcb, 0x26, 0x3e, 0x01, 0x83, 0x2e, 0x73, 0x2c, - 0xbb, 0xca, 0x03, 0x35, 0x64, 0xc8, 0x37, 0xdf, 0xbe, 0x65, 0x33, 0x6e, 0x3f, 0x65, 0xf8, 0x8f, - 0xca, 0x03, 0x38, 0x1a, 0x73, 0xd7, 0x17, 0x59, 0x21, 0x4d, 0x89, 0xf3, 0x1f, 0xf1, 0x12, 0x0c, - 0xac, 0xfa, 0xfb, 0x1c, 0x96, 0x2e, 0xcc, 0xf4, 0x18, 0x95, 0x48, 0x48, 0x84, 0x3e, 0xf5, 0x09, - 0x82, 0xd1, 0x9d, 0xd2, 0x32, 0xd7, 0x73, 0x70, 0xd8, 0x11, 0x4b, 0x32, 0x1b, 0x9d, 0x92, 0x2d, - 0x14, 0x14, 0x0f, 0xad, 0x6f, 0x8c, 0xf5, 0x19, 0x01, 0x16, 0xcf, 0xc7, 0xe2, 0x2b, 0x18, 0x5c, - 0xee, 0x18, 0x5f, 0xe1, 0x43, 0x34, 0xc0, 0x6a, 0x16, 0x4e, 0x70, 0x5f, 0xa5, 0x99, 0xe6, 0x42, - 0x25, 0x28, 0x9d, 0x61, 0xe8, 0xb7, 0x2a, 0x32, 0x60, 0xfd, 0x56, 0x45, 0xfd, 0x44, 0x56, 0x59, - 0x54, 0x52, 0x92, 0x9a, 0x85, 0x41, 0xe1, 0x58, 0xc2, 0x02, 0x8e, 0x71, 0x92, 0x50, 0x95, 0x81, - 0x12, 0xd3, 0x5f, 0xa4, 0x76, 0x65, 0x57, 0x6f, 0xb6, 0x15, 0x58, 0x7f, 0xaf, 0x05, 0xa6, 0xfe, - 0x80, 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, 0x66, 0xf7, 0x01, 0x0e, 0x39, 0x5d, 0xe3, - 0x9c, 0xf2, 0x58, 0xef, 0xc0, 0x29, 0x1c, 0xf8, 0x25, 0xad, 0xe2, 0xed, 0xf5, 0xcd, 0x0c, 0x7a, - 0xb6, 0x99, 0x41, 0x7f, 0x6e, 0x66, 0xd0, 0x97, 0x5b, 0x99, 0xbe, 0x67, 0x5b, 0x99, 0xbe, 0xdf, - 0xb7, 0x32, 0x7d, 0x1f, 0x4f, 0x46, 0x3e, 0xd7, 0xd8, 0xb2, 0xe9, 0xb8, 0x96, 0xab, 0x13, 0xb6, - 0x4c, 0x9c, 0xba, 0x65, 0x33, 0xfd, 0x7e, 0x4c, 0x3d, 0xff, 0x78, 0x2b, 0x0d, 0xf2, 0xff, 0xe3, - 0xae, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xa9, 0x7d, 0xf0, 0x84, 0x8c, 0x14, 0x00, 0x00, + // 1414 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6c, 0x1b, 0xc5, + 0x1b, 0xcf, 0x24, 0xb1, 0xd3, 0x7c, 0xf9, 0x37, 0xfd, 0x77, 0x88, 0x5a, 0x77, 0xdb, 0x3a, 0x61, + 0xfb, 0x72, 0xa0, 0xde, 0x6d, 0x52, 0xfa, 0x16, 0x88, 0xba, 0x0d, 0x51, 0x4b, 0x41, 0x74, 0x41, + 0x04, 0x38, 0x50, 0xad, 0xed, 0xa9, 0xb3, 0x74, 0x3d, 0xe3, 0xee, 0xce, 0xa6, 0x75, 0xab, 0x5e, + 0x38, 0xf4, 0x8c, 0xc4, 0x19, 0x04, 0x12, 0xa7, 0x4a, 0xc0, 0x85, 0x43, 0xc5, 0x95, 0x4b, 0xc5, + 0xa9, 0x12, 0x1c, 0x38, 0x15, 0xd4, 0x22, 0x71, 0xef, 0x91, 0x13, 0xda, 0x99, 0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, 0xf4, 0xd1, 0xb1, 0xc4, 0x75, 0x8d, + 0x2f, 0xdb, 0x9e, 0xef, 0xf8, 0x26, 0xe1, 0xcb, 0xc4, 0x6b, 0x3a, 0x94, 0x9b, 0xb7, 0x53, 0xe6, + 0xc5, 0xe5, 0xad, 0x9a, 0x17, 0x7f, 0x5b, 0x1e, 0xff, 0x27, 0x00, 0x00, 0xff, 0xff, 0x94, 0xc7, + 0x31, 0xc3, 0xb3, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1989,6 +2083,36 @@ func (m *QueryListRecordsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *QueryListRecordsRequest_ReferenceInput) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryListRecordsRequest_ReferenceInput) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListRecordsRequest_ReferenceInput) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryListRecordsRequest_ValueInput) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2009,16 +2133,65 @@ func (m *QueryListRecordsRequest_ValueInput) MarshalToSizedBuffer(dAtA []byte) ( _ = i var l int _ = l + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if m.Reference != nil { + { + size, err := m.Reference.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.Boolean { + i-- + if m.Boolean { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if m.Float != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Float)))) + i-- + dAtA[i] = 0x21 + } if m.Int != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.Int)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x18 } if len(m.String_) > 0 { i -= len(m.String_) copy(dAtA[i:], m.String_) i = encodeVarintQuery(dAtA, i, uint64(len(m.String_))) i-- + dAtA[i] = 0x12 + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Type))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -2912,12 +3085,29 @@ func (m *QueryListRecordsRequest) Size() (n int) { return n } +func (m *QueryListRecordsRequest_ReferenceInput) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryListRecordsRequest_ValueInput) Size() (n int) { if m == nil { return 0 } var l int _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } l = len(m.String_) if l > 0 { n += 1 + l + sovQuery(uint64(l)) @@ -2925,6 +3115,22 @@ func (m *QueryListRecordsRequest_ValueInput) Size() (n int) { if m.Int != 0 { n += 1 + sovQuery(uint64(m.Int)) } + if m.Float != 0 { + n += 9 + } + if m.Boolean { + n += 2 + } + if m.Reference != nil { + l = m.Reference.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.Values) > 0 { + for _, e := range m.Values { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } return n } @@ -3540,6 +3746,88 @@ func (m *QueryListRecordsRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryListRecordsRequest_ReferenceInput) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReferenceInput: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReferenceInput: 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 ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryListRecordsRequest_ValueInput) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3570,6 +3858,38 @@ func (m *QueryListRecordsRequest_ValueInput) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) } @@ -3601,7 +3921,7 @@ func (m *QueryListRecordsRequest_ValueInput) Unmarshal(dAtA []byte) error { } m.String_ = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Int", wireType) } @@ -3620,6 +3940,107 @@ func (m *QueryListRecordsRequest_ValueInput) Unmarshal(dAtA []byte) error { break } } + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Float", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.Float = float64(math.Float64frombits(v)) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Boolean", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Boolean = bool(v != 0) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Reference == nil { + m.Reference = &QueryListRecordsRequest_ReferenceInput{} + } + if err := m.Reference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, &QueryListRecordsRequest_ValueInput{}) + if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) From 7f70108a4a43d3890c40acd77a9441d3a6b94185 Mon Sep 17 00:00:00 2001 From: nabarun Date: Tue, 19 Apr 2022 12:46:24 +0530 Subject: [PATCH 07/10] nameservice: implement processing record and authority expiry --- init.sh | 9 ++ x/nameservice/abci.go | 3 + x/nameservice/keeper/keeper.go | 97 ++++++++++++++++++++++ x/nameservice/keeper/naming_keeper.go | 113 +++++++++++++++++++++++++- 4 files changed, 219 insertions(+), 3 deletions(-) diff --git a/init.sh b/init.sh index e1026075..bbc2a636 100755 --- a/init.sh +++ b/init.sh @@ -34,10 +34,19 @@ cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["gov"]["deposit_para cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json # Custom modules cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["record_rent"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json +cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_rent"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_commit_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_reveal_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_minimum_bid"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json +if [[ "$TEST_EXPIRY" == "true" ]]; then + echo "Setting timers for expiry tests." + + cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["record_rent_duration"]="60s"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json + cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_grace_period"]="60s"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json + cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_rent_duration"]="60s"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json +fi + if [[ "$TEST_AUCTION_ENABLED" == "true" ]]; then echo "Enabling auction and setting timers." diff --git a/x/nameservice/abci.go b/x/nameservice/abci.go index dae9935c..7deb1556 100644 --- a/x/nameservice/abci.go +++ b/x/nameservice/abci.go @@ -13,5 +13,8 @@ func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { // EndBlocker Called every block, update validator set func EndBlocker(ctx sdk.Context, k keeper.Keeper) []abci.ValidatorUpdate { + k.ProcessRecordExpiryQueue(ctx) + k.ProcessAuthorityExpiryQueue(ctx) + return []abci.ValidatorUpdate{} } diff --git a/x/nameservice/keeper/keeper.go b/x/nameservice/keeper/keeper.go index 6e16c96a..8004a746 100644 --- a/x/nameservice/keeper/keeper.go +++ b/x/nameservice/keeper/keeper.go @@ -1,6 +1,7 @@ package keeper import ( + "bytes" "fmt" "sort" "time" @@ -302,6 +303,102 @@ func (k Keeper) InsertRecordExpiryQueue(ctx sdk.Context, val types.Record) { k.SetRecordExpiryQueueTimeSlice(ctx, expiryTime, timeSlice) } +// DeleteRecordExpiryQueue deletes a record CID from the record expiry queue. +func (k Keeper) DeleteRecordExpiryQueue(ctx sdk.Context, record types.Record) { + expiryTime, err := time.Parse(time.RFC3339, record.ExpiryTime) + + if err != nil { + panic(err) + } + + timeSlice := k.GetRecordExpiryQueueTimeSlice(ctx, expiryTime) + var newTimeSlice []string + + for _, cid := range timeSlice { + if !bytes.Equal([]byte(cid), []byte(record.Id)) { + newTimeSlice = append(newTimeSlice, cid) + } + } + + if len(newTimeSlice) == 0 { + k.DeleteRecordExpiryQueueTimeSlice(ctx, expiryTime) + } else { + k.SetRecordExpiryQueueTimeSlice(ctx, expiryTime, newTimeSlice) + } +} + +// RecordExpiryQueueIterator returns all the record expiry queue timeslices from time 0 until endTime. +func (k Keeper) RecordExpiryQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator { + store := ctx.KVStore(k.storeKey) + rangeEndBytes := sdk.InclusiveEndBytes(getRecordExpiryQueueTimeKey(endTime)) + return store.Iterator(PrefixExpiryTimeToRecordsIndex, rangeEndBytes) +} + +// GetAllExpiredRecords returns a concatenated list of all the timeslices before currTime. +func (k Keeper) GetAllExpiredRecords(ctx sdk.Context, currTime time.Time) (expiredRecordCIDs []string) { + // Gets an iterator for all timeslices from time 0 until the current block header time. + itr := k.RecordExpiryQueueIterator(ctx, ctx.BlockHeader().Time) + defer itr.Close() + + for ; itr.Valid(); itr.Next() { + timeslice, err := helpers.BytesArrToStringArr(itr.Value()) + + if err != nil { + panic(err) + } + + expiredRecordCIDs = append(expiredRecordCIDs, timeslice...) + } + + return expiredRecordCIDs +} + +// ProcessRecordExpiryQueue tries to renew expiring records (by collecting rent) else marks them as deleted. +func (k Keeper) ProcessRecordExpiryQueue(ctx sdk.Context) { + cids := k.GetAllExpiredRecords(ctx, ctx.BlockHeader().Time) + for _, cid := range cids { + record := k.GetRecord(ctx, cid) + + // If record doesn't have an associated bond or if bond no longer exists, mark it deleted. + if record.BondId == "" || !k.bondKeeper.HasBond(ctx, record.BondId) { + record.Deleted = true + k.PutRecord(ctx, record) + k.DeleteRecordExpiryQueue(ctx, record) + + return + } + + // Try to renew the record by taking rent. + k.TryTakeRecordRent(ctx, record) + } +} + +// TryTakeRecordRent tries to take rent from the record bond. +func (k Keeper) TryTakeRecordRent(ctx sdk.Context, record types.Record) { + params := k.GetParams(ctx) + rent := params.RecordRent + sdkErr := k.bondKeeper.TransferCoinsToModuleAccount(ctx, record.BondId, types.RecordRentModuleAccountName, sdk.NewCoins(rent)) + + if sdkErr != nil { + // Insufficient funds, mark record as deleted. + record.Deleted = true + k.PutRecord(ctx, record) + k.DeleteRecordExpiryQueue(ctx, record) + + return + } + + // Delete old expiry queue entry, create new one. + k.DeleteRecordExpiryQueue(ctx, record) + record.ExpiryTime = ctx.BlockHeader().Time.Add(params.RecordRentDuration).Format(time.RFC3339) + k.InsertRecordExpiryQueue(ctx, record) + + // Save record. + record.Deleted = false + k.PutRecord(ctx, record) + k.AddBondToRecordIndexEntry(ctx, record.BondId, record.Id) +} + // GetModuleBalances gets the nameservice module account(s) balances. func (k Keeper) GetModuleBalances(ctx sdk.Context) []*types.AccountBalance { var balances []*types.AccountBalance diff --git a/x/nameservice/keeper/naming_keeper.go b/x/nameservice/keeper/naming_keeper.go index df710ad4..c5d776b6 100644 --- a/x/nameservice/keeper/naming_keeper.go +++ b/x/nameservice/keeper/naming_keeper.go @@ -1,7 +1,12 @@ package keeper import ( + "bytes" "fmt" + "net/url" + "strings" + "time" + "github.com/cosmos/cosmos-sdk/codec" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -9,9 +14,6 @@ import ( auctiontypes "github.com/tharsis/ethermint/x/auction/types" "github.com/tharsis/ethermint/x/nameservice/helpers" "github.com/tharsis/ethermint/x/nameservice/types" - "net/url" - "strings" - "time" ) func getAuthorityPubKey(pubKey cryptotypes.PubKey) string { @@ -596,6 +598,111 @@ func (k Keeper) SetAuthorityExpiryQueueTimeSlice(ctx sdk.Context, timestamp time store.Set(getAuthorityExpiryQueueTimeKey(timestamp), bz) } +// ProcessAuthorityExpiryQueue tries to renew expiring authorities (by collecting rent) else marks them as expired. +func (k Keeper) ProcessAuthorityExpiryQueue(ctx sdk.Context) { + names := k.GetAllExpiredAuthorities(ctx, ctx.BlockHeader().Time) + for _, name := range names { + authority := k.GetNameAuthority(ctx, name) + + // If authority doesn't have an associated bond or if bond no longer exists, mark it expired. + if authority.BondId == "" || !k.bondKeeper.HasBond(ctx, authority.BondId) { + authority.Status = types.AuthorityExpired + k.SetNameAuthority(ctx, name, &authority) + k.DeleteAuthorityExpiryQueue(ctx, name, authority) + + ctx.Logger().Info(fmt.Sprintf("Marking authority expired as no bond present: %s", name)) + + return + } + + // Try to renew the authority by taking rent. + k.TryTakeAuthorityRent(ctx, name, authority) + } +} + +// DeleteAuthorityExpiryQueueTimeSlice deletes a specific authority expiry queue timeslice. +func (k Keeper) DeleteAuthorityExpiryQueueTimeSlice(ctx sdk.Context, timestamp time.Time) { + store := ctx.KVStore(k.storeKey) + store.Delete(getAuthorityExpiryQueueTimeKey(timestamp)) +} + +// DeleteAuthorityExpiryQueue deletes an authority name from the authority expiry queue. +func (k Keeper) DeleteAuthorityExpiryQueue(ctx sdk.Context, name string, authority types.NameAuthority) { + timeSlice := k.GetAuthorityExpiryQueueTimeSlice(ctx, authority.ExpiryTime) + newTimeSlice := []string{} + + for _, existingName := range timeSlice { + if !bytes.Equal([]byte(existingName), []byte(name)) { + newTimeSlice = append(newTimeSlice, existingName) + } + } + + if len(newTimeSlice) == 0 { + k.DeleteAuthorityExpiryQueueTimeSlice(ctx, authority.ExpiryTime) + } else { + k.SetAuthorityExpiryQueueTimeSlice(ctx, authority.ExpiryTime, newTimeSlice) + } +} + +// GetAllExpiredAuthorities returns a concatenated list of all the timeslices before currTime. +func (k Keeper) GetAllExpiredAuthorities(ctx sdk.Context, currTime time.Time) (expiredAuthorityNames []string) { + // Gets an iterator for all timeslices from time 0 until the current block header time. + itr := k.AuthorityExpiryQueueIterator(ctx, ctx.BlockHeader().Time) + defer itr.Close() + + for ; itr.Valid(); itr.Next() { + timeslice := []string{} + timeslice, err := helpers.BytesArrToStringArr(itr.Value()) + + if err != nil { + panic(err) + } + + expiredAuthorityNames = append(expiredAuthorityNames, timeslice...) + } + + return expiredAuthorityNames +} + +// AuthorityExpiryQueueIterator returns all the authority expiry queue timeslices from time 0 until endTime. +func (k Keeper) AuthorityExpiryQueueIterator(ctx sdk.Context, endTime time.Time) sdk.Iterator { + store := ctx.KVStore(k.storeKey) + rangeEndBytes := sdk.InclusiveEndBytes(getAuthorityExpiryQueueTimeKey(endTime)) + return store.Iterator(PrefixExpiryTimeToAuthoritiesIndex, rangeEndBytes) +} + +// TryTakeAuthorityRent tries to take rent from the authority bond. +func (k Keeper) TryTakeAuthorityRent(ctx sdk.Context, name string, authority types.NameAuthority) { + ctx.Logger().Info(fmt.Sprintf("Trying to take rent for authority: %s", name)) + + params := k.GetParams(ctx) + rent := params.AuthorityRent + sdkErr := k.bondKeeper.TransferCoinsToModuleAccount(ctx, authority.BondId, types.AuthorityRentModuleAccountName, sdk.NewCoins(rent)) + + if sdkErr != nil { + // Insufficient funds, mark authority as expired. + authority.Status = types.AuthorityExpired + k.SetNameAuthority(ctx, name, &authority) + k.DeleteAuthorityExpiryQueue(ctx, name, authority) + + ctx.Logger().Info(fmt.Sprintf("Insufficient funds in owner account to pay authority rent, marking as expired: %s", name)) + + return + } + + // Delete old expiry queue entry, create new one. + k.DeleteAuthorityExpiryQueue(ctx, name, authority) + authority.ExpiryTime = ctx.BlockTime().Add(params.AuthorityRentDuration) + k.InsertAuthorityExpiryQueue(ctx, name, authority.ExpiryTime) + + // Save authority. + authority.Status = types.AuthorityActive + k.SetNameAuthority(ctx, name, &authority) + k.AddBondToAuthorityIndexEntry(ctx, authority.BondId, name) + + ctx.Logger().Info(fmt.Sprintf("Authority rent paid successfully: %s", name)) +} + // ListNameAuthorityRecords - get all name authority records. func (k Keeper) ListNameAuthorityRecords(ctx sdk.Context) map[string]types.NameAuthority { nameAuthorityRecords := make(map[string]types.NameAuthority) From 92f07873f4dd15d1866060d947df41e8da3abaad Mon Sep 17 00:00:00 2001 From: nabarun Date: Wed, 20 Apr 2022 13:07:38 +0530 Subject: [PATCH 08/10] chore: replace with `wrn` with `crn` --- DXNS_MODULES_README.md | 8 +- app/app.go | 18 +- docs/api/proto-docs.md | 110 +++- gql/README.md | 8 +- gql/generated.go | 4 +- gql/gqlgen.yml | 2 +- gql/resolver.go | 4 +- .../{dxns => chiba-clonk}/schema.graphql | 2 +- init.sh | 2 +- .../vulcanize/nameservice/v1beta1/query.proto | 28 +- proto/vulcanize/nameservice/v1beta1/tx.proto | 6 +- x/nameservice/README.md | 30 +- x/nameservice/client/cli/query.go | 37 +- x/nameservice/client/cli/tx.go | 21 +- x/nameservice/client/testutil/grpc.go | 11 +- x/nameservice/client/testutil/query.go | 21 +- x/nameservice/client/testutil/tx.go | 12 +- x/nameservice/keeper/grpc_query.go | 20 +- x/nameservice/keeper/keeper.go | 4 +- x/nameservice/keeper/msg_server.go | 5 +- x/nameservice/keeper/naming_keeper.go | 108 ++-- x/nameservice/types/events.go | 2 +- x/nameservice/types/msg.go | 23 +- x/nameservice/types/query.pb.go | 472 +++++++++--------- x/nameservice/types/query.pb.gw.go | 105 ++-- x/nameservice/types/tx.pb.go | 156 +++--- 26 files changed, 624 insertions(+), 595 deletions(-) rename gql/vulcanize/{dxns => chiba-clonk}/schema.graphql (99%) diff --git a/DXNS_MODULES_README.md b/DXNS_MODULES_README.md index 835c84bd..07c96fec 100644 --- a/DXNS_MODULES_README.md +++ b/DXNS_MODULES_README.md @@ -1,11 +1,11 @@ -# Vulcanize dxns gql +# Vulcanize chiba-clonk gql > Browser : http://localhost:9473 for gql ## Start server ```shell -./build/chibaclonkd start --gql-playground --gql-server +./build/chibaclonkd start --gql-playground --gql-server ``` Basic node status: @@ -100,7 +100,7 @@ Query records. ```graphql { - queryRecords(attributes: [{ key: "type", value: { string: "wrn:bot" } }]) { + queryRecords(attributes: [{ key: "type", value: { string: "crn:bot" } }]) { id names bondId @@ -316,7 +316,7 @@ LookUp Names ```graphql { - lookupNames(names: ["wrn://hello/test"]){ + lookupNames(names: ["crn://hello/test"]){ latest{ id height diff --git a/app/app.go b/app/app.go index 4d4636b9..c174003f 100644 --- a/app/app.go +++ b/app/app.go @@ -165,7 +165,7 @@ var ( // Ethermint modules evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, - // Vulcanize DXNS modules + // Vulcanize chiba-clonk modules auction.AppModuleBasic{}, bond.AppModuleBasic{}, nameservice.AppModuleBasic{}, @@ -244,7 +244,7 @@ type EthermintApp struct { EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper - // DXNS keepers + // chiba-clonk keepers AuctionKeeper auctionkeeper.Keeper BondKeeper bondkeeper.Keeper NameServiceKeeper nameservicekeeper.Keeper @@ -300,7 +300,7 @@ func NewEthermintApp( ibchost.StoreKey, ibctransfertypes.StoreKey, // ethermint keys evmtypes.StoreKey, feemarkettypes.StoreKey, - // dxns keys + // chiba-clonk keys auctiontypes.StoreKey, bondtypes.StoreKey, nameservicetypes.StoreKey, @@ -378,7 +378,7 @@ func NewEthermintApp( appCodec, keys[feemarkettypes.StoreKey], app.GetSubspace(feemarkettypes.ModuleName), ) - // Create Vulcanize dxns keepers + // Create Vulcanize chiba-clonk keepers app.AuctionKeeper = auctionkeeper.NewKeeper( app.AccountKeeper, app.BankKeeper, keys[auctiontypes.StoreKey], appCodec, app.GetSubspace(auctiontypes.ModuleName), @@ -486,7 +486,7 @@ func NewEthermintApp( // Ethermint app modules evm.NewAppModule(app.EvmKeeper, app.AccountKeeper), feemarket.NewAppModule(app.FeeMarketKeeper), - // DXNs modules + // chiba-clonk modules auction.NewAppModule(appCodec, app.AuctionKeeper), bond.NewAppModule(appCodec, app.BondKeeper), nameservice.NewAppModule(app.NameServiceKeeper), @@ -520,7 +520,7 @@ func NewEthermintApp( feegrant.ModuleName, paramstypes.ModuleName, vestingtypes.ModuleName, - // DXNS modules + // chiba-clonk modules auctiontypes.ModuleName, bondtypes.ModuleName, nameservicetypes.ModuleName, @@ -549,7 +549,7 @@ func NewEthermintApp( paramstypes.ModuleName, upgradetypes.ModuleName, vestingtypes.ModuleName, - // DXNS modules + // chiba-clonk modules auctiontypes.ModuleName, bondtypes.ModuleName, nameservicetypes.ModuleName, @@ -582,7 +582,7 @@ func NewEthermintApp( // Ethermint modules evmtypes.ModuleName, feemarkettypes.ModuleName, - // DXNS modules + // chiba-clonk modules auctiontypes.ModuleName, bondtypes.ModuleName, nameservicetypes.ModuleName, @@ -843,7 +843,7 @@ func initParamsKeeper( // ethermint subspaces paramsKeeper.Subspace(evmtypes.ModuleName) paramsKeeper.Subspace(feemarkettypes.ModuleName) - // dxns subspaces + // chiba-clonk subspaces paramsKeeper.Subspace(auctiontypes.ModuleName) paramsKeeper.Subspace(bondtypes.ModuleName) paramsKeeper.Subspace(nameservicetypes.ModuleName) diff --git a/docs/api/proto-docs.md b/docs/api/proto-docs.md index 1b082abc..b94fcb27 100644 --- a/docs/api/proto-docs.md +++ b/docs/api/proto-docs.md @@ -179,17 +179,20 @@ - [QueryListNameRecordsRequest](#vulcanize.nameservice.v1beta1.QueryListNameRecordsRequest) - [QueryListNameRecordsResponse](#vulcanize.nameservice.v1beta1.QueryListNameRecordsResponse) - [QueryListRecordsRequest](#vulcanize.nameservice.v1beta1.QueryListRecordsRequest) + - [QueryListRecordsRequest.KeyValueInput](#vulcanize.nameservice.v1beta1.QueryListRecordsRequest.KeyValueInput) + - [QueryListRecordsRequest.ReferenceInput](#vulcanize.nameservice.v1beta1.QueryListRecordsRequest.ReferenceInput) + - [QueryListRecordsRequest.ValueInput](#vulcanize.nameservice.v1beta1.QueryListRecordsRequest.ValueInput) - [QueryListRecordsResponse](#vulcanize.nameservice.v1beta1.QueryListRecordsResponse) - - [QueryLookupWrn](#vulcanize.nameservice.v1beta1.QueryLookupWrn) - - [QueryLookupWrnResponse](#vulcanize.nameservice.v1beta1.QueryLookupWrnResponse) + - [QueryLookupCrn](#vulcanize.nameservice.v1beta1.QueryLookupCrn) + - [QueryLookupCrnResponse](#vulcanize.nameservice.v1beta1.QueryLookupCrnResponse) - [QueryParamsRequest](#vulcanize.nameservice.v1beta1.QueryParamsRequest) - [QueryParamsResponse](#vulcanize.nameservice.v1beta1.QueryParamsResponse) - [QueryRecordByBondIdRequest](#vulcanize.nameservice.v1beta1.QueryRecordByBondIdRequest) - [QueryRecordByBondIdResponse](#vulcanize.nameservice.v1beta1.QueryRecordByBondIdResponse) - [QueryRecordByIdRequest](#vulcanize.nameservice.v1beta1.QueryRecordByIdRequest) - [QueryRecordByIdResponse](#vulcanize.nameservice.v1beta1.QueryRecordByIdResponse) - - [QueryResolveWrn](#vulcanize.nameservice.v1beta1.QueryResolveWrn) - - [QueryResolveWrnResponse](#vulcanize.nameservice.v1beta1.QueryResolveWrnResponse) + - [QueryResolveCrn](#vulcanize.nameservice.v1beta1.QueryResolveCrn) + - [QueryResolveCrnResponse](#vulcanize.nameservice.v1beta1.QueryResolveCrnResponse) - [QueryWhoisRequest](#vulcanize.nameservice.v1beta1.QueryWhoisRequest) - [QueryWhoisResponse](#vulcanize.nameservice.v1beta1.QueryWhoisResponse) @@ -2362,11 +2365,12 @@ Params defines the nameservice module records | ----- | ---- | ----- | ----------- | | `id` | [string](#string) | | | | `bond_id` | [string](#string) | | | -| `create_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | -| `expiry_time` | [google.protobuf.Timestamp](#google.protobuf.Timestamp) | | | +| `create_time` | [string](#string) | | | +| `expiry_time` | [string](#string) | | | | `deleted` | [bool](#bool) | | | | `owners` | [string](#string) | repeated | | -| `attributes` | [bytes](#bytes) | | | +| `attributes` | [string](#string) | | | +| `names` | [string](#string) | repeated | | @@ -2597,6 +2601,8 @@ QueryListRecordsRequest is request type for nameservice records list | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | +| `attributes` | [QueryListRecordsRequest.KeyValueInput](#vulcanize.nameservice.v1beta1.QueryListRecordsRequest.KeyValueInput) | repeated | | +| `all` | [bool](#bool) | | | | `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | @@ -2604,6 +2610,58 @@ QueryListRecordsRequest is request type for nameservice records list + + +### QueryListRecordsRequest.KeyValueInput + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `key` | [string](#string) | | | +| `value` | [QueryListRecordsRequest.ValueInput](#vulcanize.nameservice.v1beta1.QueryListRecordsRequest.ValueInput) | | | + + + + + + + + +### QueryListRecordsRequest.ReferenceInput + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [string](#string) | | | + + + + + + + + +### QueryListRecordsRequest.ValueInput + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `type` | [string](#string) | | | +| `string` | [string](#string) | | | +| `int` | [int64](#int64) | | | +| `float` | [double](#double) | | | +| `boolean` | [bool](#bool) | | | +| `reference` | [QueryListRecordsRequest.ReferenceInput](#vulcanize.nameservice.v1beta1.QueryListRecordsRequest.ReferenceInput) | | | +| `values` | [QueryListRecordsRequest.ValueInput](#vulcanize.nameservice.v1beta1.QueryListRecordsRequest.ValueInput) | repeated | | + + + + + + ### QueryListRecordsResponse @@ -2620,25 +2678,25 @@ QueryListRecordsResponse is response type for nameservice records list - + -### QueryLookupWrn -QueryLookupWrn is request type for LookupWrn +### QueryLookupCrn +QueryLookupCrn is request type for LookupCrn | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `wrn` | [string](#string) | | | +| `crn` | [string](#string) | | | - + -### QueryLookupWrnResponse -QueryLookupWrnResponse is response type for QueryLookupWrn +### QueryLookupCrnResponse +QueryLookupCrnResponse is response type for QueryLookupCrn | Field | Type | Label | Description | @@ -2737,25 +2795,25 @@ QueryRecordByIdResponse is response type for nameservice records by id - + -### QueryResolveWrn -QueryResolveWrn is request type for ResolveWrn +### QueryResolveCrn +QueryResolveCrn is request type for ResolveCrn | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `wrn` | [string](#string) | | | +| `crn` | [string](#string) | | | - + -### QueryResolveWrnResponse -QueryResolveWrnResponse is response type for QueryResolveWrn +### QueryResolveCrnResponse +QueryResolveCrnResponse is response type for QueryResolveCrn | Field | Type | Label | Description | @@ -2817,8 +2875,8 @@ Query defines the gRPC querier service for nameservice module | `GetNameServiceModuleBalance` | [GetNameServiceModuleBalanceRequest](#vulcanize.nameservice.v1beta1.GetNameServiceModuleBalanceRequest) | [GetNameServiceModuleBalanceResponse](#vulcanize.nameservice.v1beta1.GetNameServiceModuleBalanceResponse) | Get nameservice module balance | GET|/vulcanize/nameservice/v1beta1/balance| | `ListNameRecords` | [QueryListNameRecordsRequest](#vulcanize.nameservice.v1beta1.QueryListNameRecordsRequest) | [QueryListNameRecordsResponse](#vulcanize.nameservice.v1beta1.QueryListNameRecordsResponse) | List name records | GET|/vulcanize/nameservice/v1beta1/names| | `Whois` | [QueryWhoisRequest](#vulcanize.nameservice.v1beta1.QueryWhoisRequest) | [QueryWhoisResponse](#vulcanize.nameservice.v1beta1.QueryWhoisResponse) | Whois method retrieve the name authority info | GET|/vulcanize/nameservice/v1beta1/whois/{name}| -| `LookupWrn` | [QueryLookupWrn](#vulcanize.nameservice.v1beta1.QueryLookupWrn) | [QueryLookupWrnResponse](#vulcanize.nameservice.v1beta1.QueryLookupWrnResponse) | LookupWrn | GET|/vulcanize/nameservice/v1beta1/lookup| -| `ResolveWrn` | [QueryResolveWrn](#vulcanize.nameservice.v1beta1.QueryResolveWrn) | [QueryResolveWrnResponse](#vulcanize.nameservice.v1beta1.QueryResolveWrnResponse) | ResolveWrn | GET|/vulcanize/nameservice/v1beta1/resolve| +| `LookupCrn` | [QueryLookupCrn](#vulcanize.nameservice.v1beta1.QueryLookupCrn) | [QueryLookupCrnResponse](#vulcanize.nameservice.v1beta1.QueryLookupCrnResponse) | LookupCrn | GET|/vulcanize/nameservice/v1beta1/lookup| +| `ResolveCrn` | [QueryResolveCrn](#vulcanize.nameservice.v1beta1.QueryResolveCrn) | [QueryResolveCrnResponse](#vulcanize.nameservice.v1beta1.QueryResolveCrnResponse) | ResolveCrn | GET|/vulcanize/nameservice/v1beta1/resolve| | `GetRecordExpiryQueue` | [QueryGetRecordExpiryQueue](#vulcanize.nameservice.v1beta1.QueryGetRecordExpiryQueue) | [QueryGetRecordExpiryQueueResponse](#vulcanize.nameservice.v1beta1.QueryGetRecordExpiryQueueResponse) | GetRecordExpiryQueue | GET|/vulcanize/nameservice/v1beta1/record-expiry| | `GetAuthorityExpiryQueue` | [QueryGetAuthorityExpiryQueue](#vulcanize.nameservice.v1beta1.QueryGetAuthorityExpiryQueue) | [QueryGetAuthorityExpiryQueueResponse](#vulcanize.nameservice.v1beta1.QueryGetAuthorityExpiryQueueResponse) | GetAuthorityExpiryQueue | GET|/vulcanize/nameservice/v1beta1/authority-expiry| @@ -2868,7 +2926,7 @@ MsgDeleteNameAuthority is SDK message for DeleteNameAuthority | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `wrn` | [string](#string) | | | +| `crn` | [string](#string) | | | | `signer` | [string](#string) | | | @@ -3053,7 +3111,7 @@ MsgSetName | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `wrn` | [string](#string) | | | +| `crn` | [string](#string) | | | | `cid` | [string](#string) | | | | `signer` | [string](#string) | | | @@ -3134,7 +3192,7 @@ Msg | `DissociateBond` | [MsgDissociateBond](#vulcanize.nameservice.v1beta1.MsgDissociateBond) | [MsgDissociateBondResponse](#vulcanize.nameservice.v1beta1.MsgDissociateBondResponse) | DissociateBond | | | `DissociateRecords` | [MsgDissociateRecords](#vulcanize.nameservice.v1beta1.MsgDissociateRecords) | [MsgDissociateRecordsResponse](#vulcanize.nameservice.v1beta1.MsgDissociateRecordsResponse) | DissociateRecords | | | `ReAssociateRecords` | [MsgReAssociateRecords](#vulcanize.nameservice.v1beta1.MsgReAssociateRecords) | [MsgReAssociateRecordsResponse](#vulcanize.nameservice.v1beta1.MsgReAssociateRecordsResponse) | ReAssociateRecords | | -| `SetName` | [MsgSetName](#vulcanize.nameservice.v1beta1.MsgSetName) | [MsgSetNameResponse](#vulcanize.nameservice.v1beta1.MsgSetNameResponse) | SetName will store the name with given wrn and name | | +| `SetName` | [MsgSetName](#vulcanize.nameservice.v1beta1.MsgSetName) | [MsgSetNameResponse](#vulcanize.nameservice.v1beta1.MsgSetNameResponse) | SetName will store the name with given crn and name | | | `ReserveName` | [MsgReserveAuthority](#vulcanize.nameservice.v1beta1.MsgReserveAuthority) | [MsgReserveAuthorityResponse](#vulcanize.nameservice.v1beta1.MsgReserveAuthorityResponse) | Reserve name | | | `DeleteName` | [MsgDeleteNameAuthority](#vulcanize.nameservice.v1beta1.MsgDeleteNameAuthority) | [MsgDeleteNameAuthorityResponse](#vulcanize.nameservice.v1beta1.MsgDeleteNameAuthorityResponse) | Delete Name method will remove authority name | | | `SetAuthorityBond` | [MsgSetAuthorityBond](#vulcanize.nameservice.v1beta1.MsgSetAuthorityBond) | [MsgSetAuthorityBondResponse](#vulcanize.nameservice.v1beta1.MsgSetAuthorityBondResponse) | SetAuthorityBond | | diff --git a/gql/README.md b/gql/README.md index 835c84bd..07c96fec 100644 --- a/gql/README.md +++ b/gql/README.md @@ -1,11 +1,11 @@ -# Vulcanize dxns gql +# Vulcanize chiba-clonk gql > Browser : http://localhost:9473 for gql ## Start server ```shell -./build/chibaclonkd start --gql-playground --gql-server +./build/chibaclonkd start --gql-playground --gql-server ``` Basic node status: @@ -100,7 +100,7 @@ Query records. ```graphql { - queryRecords(attributes: [{ key: "type", value: { string: "wrn:bot" } }]) { + queryRecords(attributes: [{ key: "type", value: { string: "crn:bot" } }]) { id names bondId @@ -316,7 +316,7 @@ LookUp Names ```graphql { - lookupNames(names: ["wrn://hello/test"]){ + lookupNames(names: ["crn://hello/test"]){ latest{ id height diff --git a/gql/generated.go b/gql/generated.go index 43e8f4da..8e030164 100644 --- a/gql/generated.go +++ b/gql/generated.go @@ -988,7 +988,7 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er } var sources = []*ast.Source{ - {Name: "vulcanize/dxns/schema.graphql", Input: `# Reference to another record. + {Name: "vulcanize/chiba-clonk/schema.graphql", Input: `# Reference to another record. type Reference { id: String! # ID of linked record. } @@ -1096,7 +1096,7 @@ type PeerInfo { remote_ip: String! } -# Vulcanize DXNS status. +# Vulcanize chiba-clonk status. type Status { version: String! node: NodeInfo! diff --git a/gql/gqlgen.yml b/gql/gqlgen.yml index 2354079b..c50c7b44 100644 --- a/gql/gqlgen.yml +++ b/gql/gqlgen.yml @@ -4,7 +4,7 @@ # for detailed .gqlgen.yml documentation. schema: - - vulcanize/dxns/*.graphql + - vulcanize/chiba-clonk/*.graphql exec: filename: generated.go model: diff --git a/gql/resolver.go b/gql/resolver.go index 74abec0b..7b02db5d 100644 --- a/gql/resolver.go +++ b/gql/resolver.go @@ -76,7 +76,7 @@ func (q queryResolver) ResolveNames(ctx context.Context, names []string) ([]*Rec nsQueryClient := nstypes.NewQueryClient(q.ctx) var gqlResponse []*Record for _, name := range names { - res, err := nsQueryClient.ResolveWrn(context.Background(), &nstypes.QueryResolveWrn{Wrn: name}) + res, err := nsQueryClient.ResolveCrn(context.Background(), &nstypes.QueryResolveCrn{Crn: name}) if err != nil { // Return nil for record not found. gqlResponse = append(gqlResponse, nil) @@ -98,7 +98,7 @@ func (q queryResolver) LookupNames(ctx context.Context, names []string) ([]*Name var gqlResponse []*NameRecord for _, name := range names { - res, err := nsQueryClient.LookupWrn(context.Background(), &nstypes.QueryLookupWrn{Wrn: name}) + res, err := nsQueryClient.LookupCrn(context.Background(), &nstypes.QueryLookupCrn{Crn: name}) if err != nil { // Return nil for name not found. gqlResponse = append(gqlResponse, nil) diff --git a/gql/vulcanize/dxns/schema.graphql b/gql/vulcanize/chiba-clonk/schema.graphql similarity index 99% rename from gql/vulcanize/dxns/schema.graphql rename to gql/vulcanize/chiba-clonk/schema.graphql index b167c659..c1134277 100644 --- a/gql/vulcanize/dxns/schema.graphql +++ b/gql/vulcanize/chiba-clonk/schema.graphql @@ -106,7 +106,7 @@ type PeerInfo { remote_ip: String! } -# Vulcanize DXNS status. +# Vulcanize chiba-clonk status. type Status { version: String! node: NodeInfo! diff --git a/init.sh b/init.sh index bbc2a636..bfd5f72d 100755 --- a/init.sh +++ b/init.sh @@ -39,7 +39,7 @@ cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["para cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_reveal_fee"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["authority_auction_minimum_bid"]["denom"]="aphoton"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json -if [[ "$TEST_EXPIRY" == "true" ]]; then +if [[ "$TEST_NAMESERVICE_EXPIRY" == "true" ]]; then echo "Setting timers for expiry tests." cat $HOME/.chibaclonkd/config/genesis.json | jq '.app_state["nameservice"]["params"]["record_rent_duration"]="60s"' > $HOME/.chibaclonkd/config/tmp_genesis.json && mv $HOME/.chibaclonkd/config/tmp_genesis.json $HOME/.chibaclonkd/config/genesis.json diff --git a/proto/vulcanize/nameservice/v1beta1/query.proto b/proto/vulcanize/nameservice/v1beta1/query.proto index 95b8eb54..c6dd8e08 100644 --- a/proto/vulcanize/nameservice/v1beta1/query.proto +++ b/proto/vulcanize/nameservice/v1beta1/query.proto @@ -39,12 +39,12 @@ service Query { rpc Whois(QueryWhoisRequest) returns (QueryWhoisResponse){ option (google.api.http).get = "/vulcanize/nameservice/v1beta1/whois/{name}"; } - // LookupWrn - rpc LookupWrn(QueryLookupWrn) returns (QueryLookupWrnResponse){ + // LookupCrn + rpc LookupCrn(QueryLookupCrn) returns (QueryLookupCrnResponse){ option (google.api.http).get = "/vulcanize/nameservice/v1beta1/lookup"; } - // ResolveWrn - rpc ResolveWrn(QueryResolveWrn) returns (QueryResolveWrnResponse){ + // ResolveCrn + rpc ResolveCrn(QueryResolveCrn) returns (QueryResolveCrnResponse){ option (google.api.http).get = "/vulcanize/nameservice/v1beta1/resolve"; } // GetRecordExpiryQueue @@ -178,23 +178,23 @@ message QueryWhoisResponse{ ]; } -// QueryLookupWrn is request type for LookupWrn -message QueryLookupWrn{ - string wrn = 1; +// QueryLookupCrn is request type for LookupCrn +message QueryLookupCrn{ + string crn = 1; } -// QueryLookupWrnResponse is response type for QueryLookupWrn -message QueryLookupWrnResponse{ +// QueryLookupCrnResponse is response type for QueryLookupCrn +message QueryLookupCrnResponse{ NameRecord name = 1; } -// QueryResolveWrn is request type for ResolveWrn -message QueryResolveWrn{ - string wrn = 1; +// QueryResolveCrn is request type for ResolveCrn +message QueryResolveCrn{ + string crn = 1; } -// QueryResolveWrnResponse is response type for QueryResolveWrn -message QueryResolveWrnResponse{ +// QueryResolveCrnResponse is response type for QueryResolveCrn +message QueryResolveCrnResponse{ Record record = 1; } diff --git a/proto/vulcanize/nameservice/v1beta1/tx.proto b/proto/vulcanize/nameservice/v1beta1/tx.proto index 5662aa6f..1961eadd 100644 --- a/proto/vulcanize/nameservice/v1beta1/tx.proto +++ b/proto/vulcanize/nameservice/v1beta1/tx.proto @@ -20,7 +20,7 @@ service Msg { rpc DissociateRecords(MsgDissociateRecords) returns (MsgDissociateRecordsResponse){} // ReAssociateRecords rpc ReAssociateRecords(MsgReAssociateRecords) returns (MsgReAssociateRecordsResponse){} - // SetName will store the name with given wrn and name + // SetName will store the name with given crn and name rpc SetName(MsgSetName) returns (MsgSetNameResponse){} // Reserve name rpc ReserveName(MsgReserveAuthority) returns (MsgReserveAuthorityResponse){} @@ -56,7 +56,7 @@ message Payload { // MsgSetName message MsgSetName{ - string wrn = 1; + string crn = 1; string cid = 2; string signer = 3; } @@ -92,7 +92,7 @@ message MsgSetAuthorityBondResponse{ // MsgDeleteNameAuthority is SDK message for DeleteNameAuthority message MsgDeleteNameAuthority{ - string wrn = 1; + string crn = 1; string signer = 2; } diff --git a/x/nameservice/README.md b/x/nameservice/README.md index d20ecf56..92b49c7c 100644 --- a/x/nameservice/README.md +++ b/x/nameservice/README.md @@ -1,17 +1,17 @@ # Build chain -```bash -# it will create binary in build folder with `ethermintd` -$ make build +```bash +# it will create binary in build folder with `ethermintd` +$ make build ``` # Setup Chain ```bash -./build/chibaclonkd keys add root +./build/chibaclonkd keys add root ./build/chibaclonkd init test-moniker --chain-id ethermint_9000-1 ./build/chibaclonkd add-genesis-account $(./build/chibaclonkd keys show root -a) 1000000000000000000aphoton,1000000000000000000stake -./build/chibaclonkd gentx root 1000000000000000000stake --chain-id ethermint_9000-1 +./build/chibaclonkd gentx root 1000000000000000000stake --chain-id ethermint_9000-1 ./build/chibaclonkd collect-gentxs ./build/chibaclonkd start ``` @@ -78,7 +78,7 @@ $ ./build/chibaclonkd tx nameservice set ~/Desktop/examples/records/example1.yml ## Get records list ```bash -$ ./build/chibaclonkd q nameservice list -o json | jq +$ ./build/chibaclonkd q nameservice list -o json | jq [ { "id": "bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae", @@ -181,8 +181,8 @@ $ ./build/chibaclonkd q nameservice balance -o json | jq . ## add bond to the authority ```bash -$ ./build/chibaclonkd tx nameservice authority-bond [Authority Name] [Bond ID ] --from root --chain-id ethermint_9000-1 -y -o json | jq . -$ ./build/chibaclonkd tx nameservice authority-bond hello 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id ethermint_9000-1 -y -o json | jq . +$ ./build/chibaclonkd tx nameservice authority-bond [Authority Name] [Bond ID ] --from root --chain-id ethermint_9000-1 -y -o json | jq . +$ ./build/chibaclonkd tx nameservice authority-bond hello 95f68b1b862bfd1609b0c9aaf7300287b92fec90ac64027092c3e723af36e83d --from root --chain-id ethermint_9000-1 -y -o json | jq . ``` ## Query the records by associate bond id @@ -247,12 +247,12 @@ txhash: 7AFEF524CB0D92D6576FC08601A787786E802449888FD8DDAA7635698CC85060 "timestamp": "" } -``` +``` ## dissociate-records => remove all record from bond ```bash -$./build/chibaclonkd tx nameservice dissociate-records c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id ethermint_9000-1 -y -o json | jq . +$./build/chibaclonkd tx nameservice dissociate-records c3f7a78c5042d2003880962ba31ff3b01fcf5942960e0bc3ca331f816346a440 --from root --chain-id ethermint_9000-1 -y -o json | jq . { "height": "0", "txhash": "0316F503E5DEA47CB108AE6C7C7FFAF3F71CC56BC22F63CB97322E1BE48B33B9", @@ -274,14 +274,14 @@ $./build/chibaclonkd tx nameservice dissociate-records c3f7a78c5042d2003880962ba > When a record is expires , needs to renew record ```bash -$ ./build/chibaclonkd tx nameservice renew-record bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id ethermint_9000-1 +$ ./build/chibaclonkd tx nameservice renew-record bafyreih7un2ntk235wshncebus5emlozdhdixrrv675my5umb6fgdergae --from root --chain-id ethermint_9000-1 ``` ## Set the authority name ```bash -$ ./build/chibaclonkd tx nameservice set-name wrn://hello/test test_hello_cid --from root --chain-id ethermint_9000-1 -y -o json | jq . +$ ./build/chibaclonkd tx nameservice set-name crn://hello/test test_hello_cid --from root --chain-id ethermint_9000-1 -y -o json | jq . { "height": "0", "txhash": "66A63C73B076EEE9A2F7605354448EDEB161F0115D4D03AF68C01BA28DB97486", @@ -301,7 +301,7 @@ $ ./build/chibaclonkd tx nameservice set-name wrn://hello/test test_hello_cid - ## Delete the name ```bash -$./build/chibaclonkd tx nameservice delete-name wrn://hello/test --from root --chain-id ethermint_9000-1 -y +$./build/chibaclonkd tx nameservice delete-name crn://hello/test --from root --chain-id ethermint_9000-1 -y code: 0 codespace: "" data: "" @@ -320,7 +320,7 @@ txhash: A3FF4C46BAC7BD6E54BBB743A49830AE8C6F6FE59282384789CBA323C1FE540C ## List of Authorities Expire Queue ```bash -$ ./build/chibaclonkd q nameservice authority-expiry -o json | jq . +$ ./build/chibaclonkd q nameservice authority-expiry -o json | jq . { "authorities": [], "pagination": null @@ -331,7 +331,7 @@ $ ./build/chibaclonkd q nameservice authority-expiry -o json | jq . ## List of Records Expire Queue ```bash -$ ./build/chibaclonkd q nameservice record-expiry -o json | jq . +$ ./build/chibaclonkd q nameservice record-expiry -o json | jq . { "records": [], "pagination": null diff --git a/x/nameservice/client/cli/query.go b/x/nameservice/client/cli/query.go index be981bad..71257932 100644 --- a/x/nameservice/client/cli/query.go +++ b/x/nameservice/client/cli/query.go @@ -3,12 +3,13 @@ package cli import ( "encoding/json" "fmt" + "strings" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/version" "github.com/spf13/cobra" "github.com/tharsis/ethermint/x/nameservice/types" - "strings" ) // GetQueryCmd returns the cli query commands for this module @@ -23,7 +24,7 @@ func GetQueryCmd() *cobra.Command { bondQueryCmd.AddCommand( GetCmdWhoIs(), GetCmdResolve(), - GetCmdLookupWRN(), + GetCmdLookupCRN(), GetRecordExpiryQueue(), GetAuthorityExpiryQueue(), GetQueryParamsCmd(), @@ -68,15 +69,15 @@ $ %s query %s whois [name] return cmd } -// GetCmdLookupWRN queries naming info for a WRN. -func GetCmdLookupWRN() *cobra.Command { +// GetCmdLookupCRN queries naming info for a CRN. +func GetCmdLookupCRN() *cobra.Command { cmd := &cobra.Command{ - Use: "lookup [wrn]", - Short: "Get naming info for WRN.", + Use: "lookup [crn]", + Short: "Get naming info for CRN.", Long: strings.TrimSpace( - fmt.Sprintf(`Get naming info for WRN. + fmt.Sprintf(`Get naming info for CRN. Example: -$ %s query %s lookup [wrn] +$ %s query %s lookup [crn] `, version.AppName, types.ModuleName, ), @@ -88,7 +89,7 @@ $ %s query %s lookup [wrn] return err } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.LookupWrn(cmd.Context(), &types.QueryLookupWrn{Wrn: args[0]}) + res, err := queryClient.LookupCrn(cmd.Context(), &types.QueryLookupCrn{Crn: args[0]}) if err != nil { return err } @@ -141,7 +142,7 @@ func GetCmdList() *cobra.Command { Long: strings.TrimSpace( fmt.Sprintf(`Get the records. Example: -$ %s query %s list +$ %s query %s list `, version.AppName, types.ModuleName, ), @@ -184,7 +185,7 @@ func GetCmdGetResource() *cobra.Command { Long: strings.TrimSpace( fmt.Sprintf(`Get the record by id. Example: -$ %s query %s get [ID] +$ %s query %s get [ID] `, version.AppName, types.ModuleName, ), @@ -207,15 +208,15 @@ $ %s query %s get [ID] return cmd } -// GetCmdResolve resolves a WRN to a record. +// GetCmdResolve resolves a CRN to a record. func GetCmdResolve() *cobra.Command { cmd := &cobra.Command{ - Use: "resolve [wrn]", - Short: "Resolve WRN to record.", + Use: "resolve [crn]", + Short: "Resolve CRN to record.", Long: strings.TrimSpace( - fmt.Sprintf(`Resolve WRN to record. + fmt.Sprintf(`Resolve CRN to record. Example: -$ %s query %s resolve [wrn] +$ %s query %s resolve [crn] `, version.AppName, types.ModuleName, ), @@ -227,7 +228,7 @@ $ %s query %s resolve [wrn] return err } queryClient := types.NewQueryClient(clientCtx) - record, err := queryClient.ResolveWrn(cmd.Context(), &types.QueryResolveWrn{Wrn: args[0]}) + record, err := queryClient.ResolveCrn(cmd.Context(), &types.QueryResolveCrn{Crn: args[0]}) if err != nil { return err } @@ -246,7 +247,7 @@ func GetCmdQueryByBond() *cobra.Command { Long: strings.TrimSpace( fmt.Sprintf(`Get the record by bond id. Example: -$ %s query %s query-by-bond [bond id] +$ %s query %s query-by-bond [bond id] `, version.AppName, types.ModuleName, ), diff --git a/x/nameservice/client/cli/tx.go b/x/nameservice/client/cli/tx.go index d8e38f06..02840a76 100644 --- a/x/nameservice/client/cli/tx.go +++ b/x/nameservice/client/cli/tx.go @@ -2,6 +2,9 @@ package cli import ( "fmt" + "io/ioutil" + "strings" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" sdk "github.com/cosmos/cosmos-sdk/types" @@ -10,8 +13,6 @@ import ( "github.com/tharsis/ethermint/server/flags" "github.com/tharsis/ethermint/x/nameservice/types" "gopkg.in/yaml.v3" - "io/ioutil" - "strings" ) // NewTxCmd returns a root CLI command handler for all x/bond transaction commands. @@ -241,12 +242,12 @@ $ %s tx %s reassociate-records [old-bond-id] [new-bond-id] // GetCmdSetName is the CLI command for mapping a name to a CID. func GetCmdSetName() *cobra.Command { cmd := &cobra.Command{ - Use: "set-name [wrn] [cid]", - Short: "Set WRN to CID mapping.", + Use: "set-name [crn] [cid]", + Short: "Set CRN to CID mapping.", Long: strings.TrimSpace( - fmt.Sprintf(`Set name with wrn and cid. + fmt.Sprintf(`Set name with crn and cid. Example: -$ %s tx %s set-name [wrn] [cid] +$ %s tx %s set-name [crn] [cid] `, version.AppName, types.ModuleName, ), @@ -345,12 +346,12 @@ $ %s tx %s authority-bond [name] [bond-id] func GetCmdDeleteName() *cobra.Command { cmd := &cobra.Command{ - Use: "delete-name [wrn]", - Short: "Delete WRN.", + Use: "delete-name [crn]", + Short: "Delete CRN.", Long: strings.TrimSpace( - fmt.Sprintf(`Delete WRN. + fmt.Sprintf(`Delete CRN. Example: -$ %s tx %s delete-name [wrn] +$ %s tx %s delete-name [crn] `, version.AppName, types.ModuleName, ), diff --git a/x/nameservice/client/testutil/grpc.go b/x/nameservice/client/testutil/grpc.go index 569b147f..e4c51016 100644 --- a/x/nameservice/client/testutil/grpc.go +++ b/x/nameservice/client/testutil/grpc.go @@ -3,6 +3,9 @@ package testutil import ( "encoding/json" "fmt" + "os" + "time" + "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" sdk "github.com/cosmos/cosmos-sdk/types" @@ -10,8 +13,6 @@ import ( tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/tharsis/ethermint/x/nameservice/client/cli" nstypes "github.com/tharsis/ethermint/x/nameservice/types" - "os" - "time" ) func (s *IntegrationTestSuite) TestGRPCQueryParams() { @@ -130,7 +131,7 @@ func (s *IntegrationTestSuite) TestGRPCQueryWhoIs() { func (s *IntegrationTestSuite) TestGRPCQueryLookup() { val := s.network.Validators[0] sr := s.Require() - reqUrl := val.APIAddress + "/vulcanize/nameservice/v1beta1/lookup?wrn=%s" + reqUrl := val.APIAddress + "/vulcanize/nameservice/v1beta1/lookup?crn=%s" var authorityName = "QueryLookUp" testCases := []struct { @@ -165,13 +166,13 @@ func (s *IntegrationTestSuite) TestGRPCQueryLookup() { s.Run(tc.name, func() { if !tc.expectErr { tc.preRun(authorityName) - tc.url = fmt.Sprintf(reqUrl, fmt.Sprintf("wrn://%s/", authorityName)) + tc.url = fmt.Sprintf(reqUrl, fmt.Sprintf("crn://%s/", authorityName)) } resp, _ := rest.GetRequest(tc.url) if tc.expectErr { sr.Contains(string(resp), tc.errorMsg) } else { - var response nstypes.QueryLookupWrnResponse + var response nstypes.QueryLookupCrnResponse err := val.ClientCtx.Codec.UnmarshalJSON(resp, &response) sr.NoError(err) sr.NotZero(len(response.Name.Latest.Id)) diff --git a/x/nameservice/client/testutil/query.go b/x/nameservice/client/testutil/query.go index 05829ab0..c2824b85 100644 --- a/x/nameservice/client/testutil/query.go +++ b/x/nameservice/client/testutil/query.go @@ -3,14 +3,15 @@ package testutil import ( "encoding/json" "fmt" + "os" + "time" + "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" sdk "github.com/cosmos/cosmos-sdk/types" tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/tharsis/ethermint/x/nameservice/client/cli" "github.com/tharsis/ethermint/x/nameservice/types" - "os" - "time" ) func (s *IntegrationTestSuite) TestGetCmdQueryParams() { @@ -302,7 +303,7 @@ func (s *IntegrationTestSuite) TestGetCmdWhoIs() { } } -func (s *IntegrationTestSuite) TestGetCmdLookupWRN() { +func (s *IntegrationTestSuite) TestGetCmdLookupCRN() { val := s.network.Validators[0] sr := s.Require() var authorityName = "test1" @@ -314,7 +315,7 @@ func (s *IntegrationTestSuite) TestGetCmdLookupWRN() { preRun func(authorityName string) }{ { - "invalid request without wrn", + "invalid request without crn", []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, true, 0, @@ -324,7 +325,7 @@ func (s *IntegrationTestSuite) TestGetCmdLookupWRN() { }, { "success query with name", - []string{fmt.Sprintf("wrn://%s/", authorityName), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, + []string{fmt.Sprintf("crn://%s/", authorityName), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, 1, func(authorityName string) { @@ -337,10 +338,10 @@ func (s *IntegrationTestSuite) TestGetCmdLookupWRN() { for _, tc := range testCases { s.Run(tc.name, func() { if !tc.expErr { - // set-name with wrn and bond-id + // set-name with crn and bond-id tc.preRun(authorityName) } - cmd := cli.GetCmdLookupWRN() + cmd := cli.GetCmdLookupCRN() clientCtx := val.ClientCtx out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) @@ -348,7 +349,7 @@ func (s *IntegrationTestSuite) TestGetCmdLookupWRN() { sr.Error(err) } else { sr.NoError(err) - var response types.QueryLookupWrnResponse + var response types.QueryLookupCrnResponse err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), &response) sr.NoError(err) nameRecord := response.GetName() @@ -364,7 +365,7 @@ func (s *IntegrationTestSuite) TestGetCmdLookupWRN() { noOfRecords int }{ { - "invalid request without wrn", + "invalid request without crn", []string{"invalid", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, true, 0, @@ -565,7 +566,7 @@ func createNameRecord(authorityName string, s *IntegrationTestSuite) { sr.Zero(d.Code) args = []string{ - fmt.Sprintf("wrn://%s/", authorityName), + fmt.Sprintf("crn://%s/", authorityName), "test_hello_cid", fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), diff --git a/x/nameservice/client/testutil/tx.go b/x/nameservice/client/testutil/tx.go index ea277252..afc9aaab 100644 --- a/x/nameservice/client/testutil/tx.go +++ b/x/nameservice/client/testutil/tx.go @@ -313,7 +313,7 @@ func (s *IntegrationTestSuite) TestGetCmdSetName() { { "success", []string{ - fmt.Sprintf("wrn://%s/", authorityName), + fmt.Sprintf("crn://%s/", authorityName), "test_hello_cid", fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), @@ -488,7 +488,7 @@ func (s *IntegrationTestSuite) TestGetCmdDeleteName() { preRun func(authorityName string, s *IntegrationTestSuite) }{ { - "invalid request without wrn", + "invalid request without crn", []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), @@ -521,7 +521,7 @@ func (s *IntegrationTestSuite) TestGetCmdDeleteName() { s.Run(fmt.Sprintf("Case %s", tc.name), func() { if !tc.err { tc.preRun(authorityName, s) - tc.args = append([]string{fmt.Sprintf("wrn://%s/", authorityName)}, tc.args...) + tc.args = append([]string{fmt.Sprintf("crn://%s/", authorityName)}, tc.args...) } clientCtx := val.ClientCtx cmd := cli.GetCmdDeleteName() @@ -551,7 +551,7 @@ func (s *IntegrationTestSuite) TestGetCmdDissociateBond() { postRun func(recordId string, s *IntegrationTestSuite) }{ { - "invalid request without wrn", + "invalid request without crn", []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), @@ -670,7 +670,7 @@ func (s *IntegrationTestSuite) TestGetCmdDissociateBond() { // postRun func(recordId string, s *IntegrationTestSuite) // }{ // { -// "invalid request without wrn", +// "invalid request without crn", // []string{ // fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), // fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), @@ -794,7 +794,7 @@ func (s *IntegrationTestSuite) TestGetCmdAssociateBond() { postRun func(recordId, bondId string, s *IntegrationTestSuite) }{ { - "invalid request without wrn", + "invalid request without crn", []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, accountName), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), diff --git a/x/nameservice/keeper/grpc_query.go b/x/nameservice/keeper/grpc_query.go index 8319db36..35620223 100644 --- a/x/nameservice/keeper/grpc_query.go +++ b/x/nameservice/keeper/grpc_query.go @@ -79,27 +79,27 @@ func (q Querier) Whois(c context.Context, request *types.QueryWhoisRequest) (*ty return &types.QueryWhoisResponse{NameAuthority: nameAuthority}, nil } -func (q Querier) LookupWrn(c context.Context, req *types.QueryLookupWrn) (*types.QueryLookupWrnResponse, error) { +func (q Querier) LookupCrn(c context.Context, req *types.QueryLookupCrn) (*types.QueryLookupCrnResponse, error) { ctx := sdk.UnwrapSDKContext(c) - wrn := req.GetWrn() - if !q.Keeper.HasNameRecord(ctx, wrn) { - return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "WRN not found.") + crn := req.GetCrn() + if !q.Keeper.HasNameRecord(ctx, crn) { + return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "CRN not found.") } - nameRecord := q.Keeper.GetNameRecord(ctx, wrn) + nameRecord := q.Keeper.GetNameRecord(ctx, crn) if nameRecord == nil { return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "name record not found.") } - return &types.QueryLookupWrnResponse{Name: nameRecord}, nil + return &types.QueryLookupCrnResponse{Name: nameRecord}, nil } -func (q Querier) ResolveWrn(c context.Context, req *types.QueryResolveWrn) (*types.QueryResolveWrnResponse, error) { +func (q Querier) ResolveCrn(c context.Context, req *types.QueryResolveCrn) (*types.QueryResolveCrnResponse, error) { ctx := sdk.UnwrapSDKContext(c) - wrn := req.GetWrn() - record := q.Keeper.ResolveWRN(ctx, wrn) + crn := req.GetCrn() + record := q.Keeper.ResolveCRN(ctx, crn) if record == nil { return nil, sdkerrors.Wrap(sdkerrors.ErrUnknownRequest, "record not found.") } - return &types.QueryResolveWrnResponse{Record: record}, nil + return &types.QueryResolveCrnResponse{Record: record}, nil } func (q Querier) GetRecordExpiryQueue(c context.Context, _ *types.QueryGetRecordExpiryQueue) (*types.QueryGetRecordExpiryQueueResponse, error) { diff --git a/x/nameservice/keeper/keeper.go b/x/nameservice/keeper/keeper.go index 8004a746..2dd0303f 100644 --- a/x/nameservice/keeper/keeper.go +++ b/x/nameservice/keeper/keeper.go @@ -29,8 +29,8 @@ var ( // PrefixNameAuthorityRecordIndex is the prefix for the name -> NameAuthority index. PrefixNameAuthorityRecordIndex = []byte{0x01} - // PrefixWRNToNameRecordIndex is the prefix for the WRN -> NamingRecord index. - PrefixWRNToNameRecordIndex = []byte{0x02} + // PrefixCRNToNameRecordIndex is the prefix for the CRN -> NamingRecord index. + PrefixCRNToNameRecordIndex = []byte{0x02} // PrefixBondIDToRecordsIndex is the prefix for the Bond ID -> [Record] index. PrefixBondIDToRecordsIndex = []byte{0x03} diff --git a/x/nameservice/keeper/msg_server.go b/x/nameservice/keeper/msg_server.go index 3701c0d9..2c726fe1 100644 --- a/x/nameservice/keeper/msg_server.go +++ b/x/nameservice/keeper/msg_server.go @@ -2,6 +2,7 @@ package keeper import ( "context" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/tharsis/ethermint/x/nameservice/types" ) @@ -64,7 +65,7 @@ func (m msgServer) SetName(c context.Context, msg *types.MsgSetName) (*types.Msg sdk.NewEvent( types.EventTypeSetRecord, sdk.NewAttribute(types.AttributeKeySigner, msg.Signer), - sdk.NewAttribute(types.AttributeKeyWRN, msg.Wrn), + sdk.NewAttribute(types.AttributeKeyCRN, msg.Crn), sdk.NewAttribute(types.AttributeKeyCID, msg.Cid), ), sdk.NewEvent( @@ -146,7 +147,7 @@ func (m msgServer) DeleteName(c context.Context, msg *types.MsgDeleteNameAuthori sdk.NewEvent( types.EventTypeDeleteName, sdk.NewAttribute(types.AttributeKeySigner, msg.Signer), - sdk.NewAttribute(types.AttributeKeyWRN, msg.Wrn), + sdk.NewAttribute(types.AttributeKeyCRN, msg.Crn), ), sdk.NewEvent( sdk.EventTypeMessage, diff --git a/x/nameservice/keeper/naming_keeper.go b/x/nameservice/keeper/naming_keeper.go index c5d776b6..cc61f567 100644 --- a/x/nameservice/keeper/naming_keeper.go +++ b/x/nameservice/keeper/naming_keeper.go @@ -28,9 +28,9 @@ func GetNameAuthorityIndexKey(name string) []byte { return append(PrefixNameAuthorityRecordIndex, []byte(name)...) } -// GetNameRecordIndexKey Generates WRN -> NameRecord index key. -func GetNameRecordIndexKey(wrn string) []byte { - return append(PrefixWRNToNameRecordIndex, []byte(wrn)...) +// GetNameRecordIndexKey Generates CRN -> NameRecord index key. +func GetNameRecordIndexKey(crn string) []byte { + return append(PrefixCRNToNameRecordIndex, []byte(crn)...) } func GetCIDToNamesIndexKey(id string) []byte { @@ -103,35 +103,35 @@ func RemoveBondToAuthorityIndexEntry(store sdk.KVStore, bondID string, name stri store.Delete(getBondIDToAuthoritiesIndexKey(bondID, name)) } -func (k Keeper) updateBlockChangeSetForName(ctx sdk.Context, wrn string) { +func (k Keeper) updateBlockChangeSetForName(ctx sdk.Context, crn string) { changeSet := k.getOrCreateBlockChangeSet(ctx, ctx.BlockHeight()) - changeSet.Names = append(changeSet.Names, wrn) + changeSet.Names = append(changeSet.Names, crn) k.saveBlockChangeSet(ctx, changeSet) } -func (k Keeper) getAuthority(ctx sdk.Context, wrn string) (string, *url.URL, *types.NameAuthority, error) { - parsedWRN, err := url.Parse(wrn) +func (k Keeper) getAuthority(ctx sdk.Context, crn string) (string, *url.URL, *types.NameAuthority, error) { + parsedCRN, err := url.Parse(crn) if err != nil { - return "", nil, nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid WRN.") + return "", nil, nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid CRN.") } - name := parsedWRN.Host + name := parsedCRN.Host if !k.HasNameAuthority(ctx, name) { return name, nil, nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Name authority not found.") } authority := k.GetNameAuthority(ctx, name) - return name, parsedWRN, &authority, nil + return name, parsedCRN, &authority, nil } -func (k Keeper) checkWRNAccess(ctx sdk.Context, signer sdk.AccAddress, wrn string) error { - name, parsedWRN, authority, err := k.getAuthority(ctx, wrn) +func (k Keeper) checkCRNAccess(ctx sdk.Context, signer sdk.AccAddress, crn string) error { + name, parsedCRN, authority, err := k.getAuthority(ctx, crn) if err != nil { return err } - formattedWRN := fmt.Sprintf("wrn://%s%s", name, parsedWRN.RequestURI()) - if formattedWRN != wrn { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid WRN.") + formattedCRN := fmt.Sprintf("crn://%s%s", name, parsedCRN.RequestURI()) + if formattedCRN != crn { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid CRN.") } if authority.OwnerAddress != signer.String() { @@ -161,14 +161,14 @@ func (k Keeper) checkWRNAccess(ctx sdk.Context, signer sdk.AccAddress, wrn strin } // HasNameRecord - checks if a name record exists. -func (k Keeper) HasNameRecord(ctx sdk.Context, wrn string) bool { +func (k Keeper) HasNameRecord(ctx sdk.Context, crn string) bool { store := ctx.KVStore(k.storeKey) - return store.Has(GetNameRecordIndexKey(wrn)) + return store.Has(GetNameRecordIndexKey(crn)) } // GetNameRecord - gets a name record from the store. -func GetNameRecord(store sdk.KVStore, codec codec.BinaryCodec, wrn string) *types.NameRecord { - nameRecordKey := GetNameRecordIndexKey(wrn) +func GetNameRecord(store sdk.KVStore, codec codec.BinaryCodec, crn string) *types.NameRecord { + nameRecordKey := GetNameRecordIndexKey(crn) if !store.Has(nameRecordKey) { return nil } @@ -181,14 +181,14 @@ func GetNameRecord(store sdk.KVStore, codec codec.BinaryCodec, wrn string) *type } // GetNameRecord - gets a name record from the store. -func (k Keeper) GetNameRecord(ctx sdk.Context, wrn string) *types.NameRecord { - _, _, authority, err := k.getAuthority(ctx, wrn) +func (k Keeper) GetNameRecord(ctx sdk.Context, crn string) *types.NameRecord { + _, _, authority, err := k.getAuthority(ctx, crn) if err != nil || authority.Status != types.AuthorityActive { // If authority is not active (or any other error), lookup fails. return nil } - nameRecord := GetNameRecord(ctx.KVStore(k.storeKey), k.cdc, wrn) + nameRecord := GetNameRecord(ctx.KVStore(k.storeKey), k.cdc, crn) // Name record may not exist. if nameRecord == nil { @@ -205,12 +205,12 @@ func (k Keeper) GetNameRecord(ctx sdk.Context, wrn string) *types.NameRecord { } // RemoveRecordToNameMapping removes a name from the record ID -> []names index. -func RemoveRecordToNameMapping(store sdk.KVStore, id string, wrn string) { +func RemoveRecordToNameMapping(store sdk.KVStore, id string, crn string) { reverseNameIndexKey := GetCIDToNamesIndexKey(id) names, _ := helpers.BytesArrToStringArr(store.Get(reverseNameIndexKey)) nameSet := helpers.SliceToSet(names) - nameSet.Remove(wrn) + nameSet.Remove(crn) if nameSet.Cardinality() == 0 { // Delete as storing empty slice throws error from baseapp. @@ -222,7 +222,7 @@ func RemoveRecordToNameMapping(store sdk.KVStore, id string, wrn string) { } // AddRecordToNameMapping adds a name to the record ID -> []names index. -func AddRecordToNameMapping(store sdk.KVStore, id string, wrn string) { +func AddRecordToNameMapping(store sdk.KVStore, id string, crn string) { reverseNameIndexKey := GetCIDToNamesIndexKey(id) var names []string @@ -231,14 +231,14 @@ func AddRecordToNameMapping(store sdk.KVStore, id string, wrn string) { } nameSet := helpers.SliceToSet(names) - nameSet.Add(wrn) + nameSet.Add(crn) bz, _ := helpers.StrArrToBytesArr(helpers.SetToSlice(nameSet)) store.Set(reverseNameIndexKey, bz) } // SetNameRecord - sets a name record. -func SetNameRecord(store sdk.KVStore, codec codec.BinaryCodec, wrn string, id string, height int64) { - nameRecordIndexKey := GetNameRecordIndexKey(wrn) +func SetNameRecord(store sdk.KVStore, codec codec.BinaryCodec, crn string, id string, height int64) { + nameRecordIndexKey := GetNameRecordIndexKey(crn) var nameRecord types.NameRecord if store.Has(nameRecordIndexKey) { @@ -248,7 +248,7 @@ func SetNameRecord(store sdk.KVStore, codec codec.BinaryCodec, wrn string, id st // Update old CID -> []Name index. if nameRecord.Latest.Id != "" || len(nameRecord.Latest.Id) != 0 { - RemoveRecordToNameMapping(store, nameRecord.Latest.Id, wrn) + RemoveRecordToNameMapping(store, nameRecord.Latest.Id, crn) } } @@ -261,35 +261,35 @@ func SetNameRecord(store sdk.KVStore, codec codec.BinaryCodec, wrn string, id st // Update new CID -> []Name index. if id != "" { - AddRecordToNameMapping(store, id, wrn) + AddRecordToNameMapping(store, id, crn) } } // SetNameRecord - sets a name record. -func (k Keeper) SetNameRecord(ctx sdk.Context, wrn string, id string) { - SetNameRecord(ctx.KVStore(k.storeKey), k.cdc, wrn, id, ctx.BlockHeight()) +func (k Keeper) SetNameRecord(ctx sdk.Context, crn string, id string) { + SetNameRecord(ctx.KVStore(k.storeKey), k.cdc, crn, id, ctx.BlockHeight()) // Update changeSet for name. - k.updateBlockChangeSetForName(ctx, wrn) + k.updateBlockChangeSetForName(ctx, crn) } -// ProcessSetName creates a WRN -> Record ID mapping. +// ProcessSetName creates a CRN -> Record ID mapping. func (k Keeper) ProcessSetName(ctx sdk.Context, msg types.MsgSetName) error { signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return err } - err = k.checkWRNAccess(ctx, signerAddress, msg.Wrn) + err = k.checkCRNAccess(ctx, signerAddress, msg.Crn) if err != nil { return err } - nameRecord := k.GetNameRecord(ctx, msg.Wrn) + nameRecord := k.GetNameRecord(ctx, msg.Crn) if nameRecord != nil && nameRecord.Latest.Id == msg.Cid { return nil } - k.SetNameRecord(ctx, msg.Wrn, msg.Cid) + k.SetNameRecord(ctx, msg.Crn, msg.Cid) return nil } @@ -298,7 +298,7 @@ func (k Keeper) ProcessSetName(ctx sdk.Context, msg types.MsgSetName) error { func (k Keeper) ListNameRecords(ctx sdk.Context) []types.NameEntry { var nameEntries []types.NameEntry store := ctx.KVStore(k.storeKey) - itr := sdk.KVStorePrefixIterator(store, PrefixWRNToNameRecordIndex) + itr := sdk.KVStorePrefixIterator(store, PrefixCRNToNameRecordIndex) defer itr.Close() for ; itr.Valid(); itr.Next() { bz := store.Get(itr.Key()) @@ -306,7 +306,7 @@ func (k Keeper) ListNameRecords(ctx sdk.Context) []types.NameEntry { var record types.NameRecord k.cdc.MustUnmarshal(bz, &record) nameEntries = append(nameEntries, types.NameEntry{ - Name: string(itr.Key()[len(PrefixWRNToNameRecordIndex):]), + Name: string(itr.Key()[len(PrefixCRNToNameRecordIndex):]), Entry: &record, }) } @@ -427,13 +427,13 @@ func (k Keeper) createAuthority(ctx sdk.Context, name string, owner string, isRo // ProcessReserveAuthority reserves a name authority. func (k Keeper) ProcessReserveAuthority(ctx sdk.Context, msg types.MsgReserveAuthority) error { - wrn := fmt.Sprintf("wrn://%s", msg.GetName()) - parsedWrn, err := url.Parse(wrn) + crn := fmt.Sprintf("crn://%s", msg.GetName()) + parsedCrn, err := url.Parse(crn) if err != nil { return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid name") } - name := parsedWrn.Host - if fmt.Sprintf("wrn://%s", name) != wrn { + name := parsedCrn.Host + if fmt.Sprintf("crn://%s", name) != crn { return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Invalid name") } if strings.Contains(name, ".") { @@ -484,23 +484,23 @@ func (k Keeper) ProcessSetAuthorityBond(ctx sdk.Context, msg types.MsgSetAuthori return nil } -// ProcessDeleteName removes a WRN -> Record ID mapping. +// ProcessDeleteName removes a CRN -> Record ID mapping. func (k Keeper) ProcessDeleteName(ctx sdk.Context, msg types.MsgDeleteNameAuthority) error { signerAddress, err := sdk.AccAddressFromBech32(msg.Signer) if err != nil { return err } - err = k.checkWRNAccess(ctx, signerAddress, msg.Wrn) + err = k.checkCRNAccess(ctx, signerAddress, msg.Crn) if err != nil { return err } - if !k.HasNameRecord(ctx, msg.Wrn) { + if !k.HasNameRecord(ctx, msg.Crn) { return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "Name not found.") } // Set CID to empty string. - k.SetNameRecord(ctx, msg.Wrn, "") + k.SetNameRecord(ctx, msg.Crn, "") return nil } @@ -526,9 +526,9 @@ func (k Keeper) GetAuthorityExpiryQueue(ctx sdk.Context) []*types.ExpiryQueueRec return authorities } -// ResolveWRN resolves a WRN to a record. -func (k Keeper) ResolveWRN(ctx sdk.Context, wrn string) *types.Record { - _, _, authority, err := k.getAuthority(ctx, wrn) +// ResolveCRN resolves a CRN to a record. +func (k Keeper) ResolveCRN(ctx sdk.Context, crn string) *types.Record { + _, _, authority, err := k.getAuthority(ctx, crn) if err != nil || authority.Status != types.AuthorityActive { // If authority is not active (or any other error), resolution fails. return nil @@ -536,7 +536,7 @@ func (k Keeper) ResolveWRN(ctx sdk.Context, wrn string) *types.Record { // Name should not resolve if it's stale. // i.e. authority was registered later than the name. - record, nameRecord := ResolveWRN(ctx.KVStore(k.storeKey), wrn, k, ctx) + record, nameRecord := ResolveCRN(ctx.KVStore(k.storeKey), crn, k, ctx) if authority.Height > nameRecord.Latest.Height { return nil } @@ -544,9 +544,9 @@ func (k Keeper) ResolveWRN(ctx sdk.Context, wrn string) *types.Record { return record } -// ResolveWRN resolves a WRN to a record. -func ResolveWRN(store sdk.KVStore, wrn string, k Keeper, c sdk.Context) (*types.Record, *types.NameRecord) { - nameKey := GetNameRecordIndexKey(wrn) +// ResolveCRN resolves a CRN to a record. +func ResolveCRN(store sdk.KVStore, crn string, k Keeper, c sdk.Context) (*types.Record, *types.NameRecord) { + nameKey := GetNameRecordIndexKey(crn) if store.Has(nameKey) { bz := store.Get(nameKey) diff --git a/x/nameservice/types/events.go b/x/nameservice/types/events.go index a93683a7..d376f131 100644 --- a/x/nameservice/types/events.go +++ b/x/nameservice/types/events.go @@ -19,7 +19,7 @@ const ( AttributeKeyNewBondId = "new-bond-id" AttributeKeyCID = "cid" AttributeKeyName = "name" - AttributeKeyWRN = "wrn" + AttributeKeyCRN = "crn" AttributeKeyRecordId = "record-id" AttributeValueCategory = ModuleName ) diff --git a/x/nameservice/types/msg.go b/x/nameservice/types/msg.go index ee710f14..309ab017 100644 --- a/x/nameservice/types/msg.go +++ b/x/nameservice/types/msg.go @@ -1,9 +1,10 @@ package types import ( + "net/url" + sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "net/url" ) var ( @@ -14,9 +15,9 @@ var ( ) // NewMsgSetName is the constructor function for MsgSetName. -func NewMsgSetName(wrn string, cid string, signer sdk.AccAddress) MsgSetName { +func NewMsgSetName(crn string, cid string, signer sdk.AccAddress) MsgSetName { return MsgSetName{ - Wrn: wrn, + Crn: crn, Cid: cid, Signer: signer.String(), } @@ -31,8 +32,8 @@ func (msg MsgSetName) Type() string { return "set-name" } // ValidateBasic Implements Msg. func (msg MsgSetName) ValidateBasic() error { - if msg.Wrn == "" { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "WRN is required.") + if msg.Crn == "" { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "CRN is required.") } if msg.Cid == "" { @@ -144,9 +145,9 @@ func (msg MsgSetAuthorityBond) GetSigners() []sdk.AccAddress { } // NewMsgDeleteNameAuthority is the constructor function for MsgDeleteNameAuthority. -func NewMsgDeleteNameAuthority(wrn string, signer sdk.AccAddress) MsgDeleteNameAuthority { +func NewMsgDeleteNameAuthority(crn string, signer sdk.AccAddress) MsgDeleteNameAuthority { return MsgDeleteNameAuthority{ - Wrn: wrn, + Crn: crn, Signer: signer.String(), } } @@ -159,17 +160,17 @@ func (msg MsgDeleteNameAuthority) Type() string { return "delete-name" } // ValidateBasic Implements Msg. func (msg MsgDeleteNameAuthority) ValidateBasic() error { - if len(msg.Wrn) == 0 { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "wrn is required.") + if len(msg.Crn) == 0 { + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "crn is required.") } if len(msg.Signer) == 0 { return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer.") } - _, err := url.Parse(msg.Wrn) + _, err := url.Parse(msg.Crn) if err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid wrn.") + return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid crn.") } return nil diff --git a/x/nameservice/types/query.pb.go b/x/nameservice/types/query.pb.go index 89aaf4c4..064ac626 100644 --- a/x/nameservice/types/query.pb.go +++ b/x/nameservice/types/query.pb.go @@ -944,23 +944,23 @@ func (m *QueryWhoisResponse) GetNameAuthority() NameAuthority { return NameAuthority{} } -// QueryLookupWrn is request type for LookupWrn -type QueryLookupWrn struct { - Wrn string `protobuf:"bytes,1,opt,name=wrn,proto3" json:"wrn,omitempty"` +// QueryLookupCrn is request type for LookupCrn +type QueryLookupCrn struct { + Crn string `protobuf:"bytes,1,opt,name=crn,proto3" json:"crn,omitempty"` } -func (m *QueryLookupWrn) Reset() { *m = QueryLookupWrn{} } -func (m *QueryLookupWrn) String() string { return proto.CompactTextString(m) } -func (*QueryLookupWrn) ProtoMessage() {} -func (*QueryLookupWrn) Descriptor() ([]byte, []int) { +func (m *QueryLookupCrn) Reset() { *m = QueryLookupCrn{} } +func (m *QueryLookupCrn) String() string { return proto.CompactTextString(m) } +func (*QueryLookupCrn) ProtoMessage() {} +func (*QueryLookupCrn) Descriptor() ([]byte, []int) { return fileDescriptor_73d2465766c8f876, []int{15} } -func (m *QueryLookupWrn) XXX_Unmarshal(b []byte) error { +func (m *QueryLookupCrn) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryLookupWrn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryLookupCrn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryLookupWrn.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryLookupCrn.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -970,42 +970,42 @@ func (m *QueryLookupWrn) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *QueryLookupWrn) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLookupWrn.Merge(m, src) +func (m *QueryLookupCrn) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLookupCrn.Merge(m, src) } -func (m *QueryLookupWrn) XXX_Size() int { +func (m *QueryLookupCrn) XXX_Size() int { return m.Size() } -func (m *QueryLookupWrn) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLookupWrn.DiscardUnknown(m) +func (m *QueryLookupCrn) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLookupCrn.DiscardUnknown(m) } -var xxx_messageInfo_QueryLookupWrn proto.InternalMessageInfo +var xxx_messageInfo_QueryLookupCrn proto.InternalMessageInfo -func (m *QueryLookupWrn) GetWrn() string { +func (m *QueryLookupCrn) GetCrn() string { if m != nil { - return m.Wrn + return m.Crn } return "" } -// QueryLookupWrnResponse is response type for QueryLookupWrn -type QueryLookupWrnResponse struct { +// QueryLookupCrnResponse is response type for QueryLookupCrn +type QueryLookupCrnResponse struct { Name *NameRecord `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` } -func (m *QueryLookupWrnResponse) Reset() { *m = QueryLookupWrnResponse{} } -func (m *QueryLookupWrnResponse) String() string { return proto.CompactTextString(m) } -func (*QueryLookupWrnResponse) ProtoMessage() {} -func (*QueryLookupWrnResponse) Descriptor() ([]byte, []int) { +func (m *QueryLookupCrnResponse) Reset() { *m = QueryLookupCrnResponse{} } +func (m *QueryLookupCrnResponse) String() string { return proto.CompactTextString(m) } +func (*QueryLookupCrnResponse) ProtoMessage() {} +func (*QueryLookupCrnResponse) Descriptor() ([]byte, []int) { return fileDescriptor_73d2465766c8f876, []int{16} } -func (m *QueryLookupWrnResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryLookupCrnResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryLookupWrnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryLookupCrnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryLookupWrnResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryLookupCrnResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1015,42 +1015,42 @@ func (m *QueryLookupWrnResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *QueryLookupWrnResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryLookupWrnResponse.Merge(m, src) +func (m *QueryLookupCrnResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryLookupCrnResponse.Merge(m, src) } -func (m *QueryLookupWrnResponse) XXX_Size() int { +func (m *QueryLookupCrnResponse) XXX_Size() int { return m.Size() } -func (m *QueryLookupWrnResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryLookupWrnResponse.DiscardUnknown(m) +func (m *QueryLookupCrnResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryLookupCrnResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryLookupWrnResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryLookupCrnResponse proto.InternalMessageInfo -func (m *QueryLookupWrnResponse) GetName() *NameRecord { +func (m *QueryLookupCrnResponse) GetName() *NameRecord { if m != nil { return m.Name } return nil } -// QueryResolveWrn is request type for ResolveWrn -type QueryResolveWrn struct { - Wrn string `protobuf:"bytes,1,opt,name=wrn,proto3" json:"wrn,omitempty"` +// QueryResolveCrn is request type for ResolveCrn +type QueryResolveCrn struct { + Crn string `protobuf:"bytes,1,opt,name=crn,proto3" json:"crn,omitempty"` } -func (m *QueryResolveWrn) Reset() { *m = QueryResolveWrn{} } -func (m *QueryResolveWrn) String() string { return proto.CompactTextString(m) } -func (*QueryResolveWrn) ProtoMessage() {} -func (*QueryResolveWrn) Descriptor() ([]byte, []int) { +func (m *QueryResolveCrn) Reset() { *m = QueryResolveCrn{} } +func (m *QueryResolveCrn) String() string { return proto.CompactTextString(m) } +func (*QueryResolveCrn) ProtoMessage() {} +func (*QueryResolveCrn) Descriptor() ([]byte, []int) { return fileDescriptor_73d2465766c8f876, []int{17} } -func (m *QueryResolveWrn) XXX_Unmarshal(b []byte) error { +func (m *QueryResolveCrn) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryResolveWrn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryResolveCrn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryResolveWrn.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryResolveCrn.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1060,42 +1060,42 @@ func (m *QueryResolveWrn) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *QueryResolveWrn) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResolveWrn.Merge(m, src) +func (m *QueryResolveCrn) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryResolveCrn.Merge(m, src) } -func (m *QueryResolveWrn) XXX_Size() int { +func (m *QueryResolveCrn) XXX_Size() int { return m.Size() } -func (m *QueryResolveWrn) XXX_DiscardUnknown() { - xxx_messageInfo_QueryResolveWrn.DiscardUnknown(m) +func (m *QueryResolveCrn) XXX_DiscardUnknown() { + xxx_messageInfo_QueryResolveCrn.DiscardUnknown(m) } -var xxx_messageInfo_QueryResolveWrn proto.InternalMessageInfo +var xxx_messageInfo_QueryResolveCrn proto.InternalMessageInfo -func (m *QueryResolveWrn) GetWrn() string { +func (m *QueryResolveCrn) GetCrn() string { if m != nil { - return m.Wrn + return m.Crn } return "" } -// QueryResolveWrnResponse is response type for QueryResolveWrn -type QueryResolveWrnResponse struct { +// QueryResolveCrnResponse is response type for QueryResolveCrn +type QueryResolveCrnResponse struct { Record *Record `protobuf:"bytes,1,opt,name=record,proto3" json:"record,omitempty"` } -func (m *QueryResolveWrnResponse) Reset() { *m = QueryResolveWrnResponse{} } -func (m *QueryResolveWrnResponse) String() string { return proto.CompactTextString(m) } -func (*QueryResolveWrnResponse) ProtoMessage() {} -func (*QueryResolveWrnResponse) Descriptor() ([]byte, []int) { +func (m *QueryResolveCrnResponse) Reset() { *m = QueryResolveCrnResponse{} } +func (m *QueryResolveCrnResponse) String() string { return proto.CompactTextString(m) } +func (*QueryResolveCrnResponse) ProtoMessage() {} +func (*QueryResolveCrnResponse) Descriptor() ([]byte, []int) { return fileDescriptor_73d2465766c8f876, []int{18} } -func (m *QueryResolveWrnResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryResolveCrnResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryResolveWrnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryResolveCrnResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryResolveWrnResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryResolveCrnResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1105,19 +1105,19 @@ func (m *QueryResolveWrnResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *QueryResolveWrnResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResolveWrnResponse.Merge(m, src) +func (m *QueryResolveCrnResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryResolveCrnResponse.Merge(m, src) } -func (m *QueryResolveWrnResponse) XXX_Size() int { +func (m *QueryResolveCrnResponse) XXX_Size() int { return m.Size() } -func (m *QueryResolveWrnResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryResolveWrnResponse.DiscardUnknown(m) +func (m *QueryResolveCrnResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryResolveCrnResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryResolveWrnResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryResolveCrnResponse proto.InternalMessageInfo -func (m *QueryResolveWrnResponse) GetRecord() *Record { +func (m *QueryResolveCrnResponse) GetRecord() *Record { if m != nil { return m.Record } @@ -1396,10 +1396,10 @@ func init() { proto.RegisterType((*QueryListNameRecordsResponse)(nil), "vulcanize.nameservice.v1beta1.QueryListNameRecordsResponse") proto.RegisterType((*QueryWhoisRequest)(nil), "vulcanize.nameservice.v1beta1.QueryWhoisRequest") proto.RegisterType((*QueryWhoisResponse)(nil), "vulcanize.nameservice.v1beta1.QueryWhoisResponse") - proto.RegisterType((*QueryLookupWrn)(nil), "vulcanize.nameservice.v1beta1.QueryLookupWrn") - proto.RegisterType((*QueryLookupWrnResponse)(nil), "vulcanize.nameservice.v1beta1.QueryLookupWrnResponse") - proto.RegisterType((*QueryResolveWrn)(nil), "vulcanize.nameservice.v1beta1.QueryResolveWrn") - proto.RegisterType((*QueryResolveWrnResponse)(nil), "vulcanize.nameservice.v1beta1.QueryResolveWrnResponse") + proto.RegisterType((*QueryLookupCrn)(nil), "vulcanize.nameservice.v1beta1.QueryLookupCrn") + proto.RegisterType((*QueryLookupCrnResponse)(nil), "vulcanize.nameservice.v1beta1.QueryLookupCrnResponse") + proto.RegisterType((*QueryResolveCrn)(nil), "vulcanize.nameservice.v1beta1.QueryResolveCrn") + proto.RegisterType((*QueryResolveCrnResponse)(nil), "vulcanize.nameservice.v1beta1.QueryResolveCrnResponse") proto.RegisterType((*QueryGetRecordExpiryQueue)(nil), "vulcanize.nameservice.v1beta1.QueryGetRecordExpiryQueue") proto.RegisterType((*QueryGetRecordExpiryQueueResponse)(nil), "vulcanize.nameservice.v1beta1.QueryGetRecordExpiryQueueResponse") proto.RegisterType((*ExpiryQueueRecord)(nil), "vulcanize.nameservice.v1beta1.ExpiryQueueRecord") @@ -1412,96 +1412,96 @@ func init() { } var fileDescriptor_73d2465766c8f876 = []byte{ - // 1414 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6c, 0x1b, 0xc5, - 0x1b, 0xcf, 0x24, 0xb1, 0xd3, 0x7c, 0xf9, 0x37, 0xfd, 0x77, 0x88, 0x5a, 0x77, 0xdb, 0x3a, 0x61, - 0xfb, 0x72, 0xa0, 0xde, 0x6d, 0x52, 0xfa, 0x16, 0x88, 0xba, 0x0d, 0x51, 0x4b, 0x41, 0x74, 0x41, - 0x04, 0x38, 0x50, 0xad, 0xed, 0xa9, 0xb3, 0x74, 0x3d, 0xe3, 0xee, 0xce, 0xa6, 0x75, 0xab, 0x5e, - 0x38, 0xf4, 0x8c, 0xc4, 0x19, 0x04, 0x12, 0xa7, 0x4a, 0xc0, 0x85, 0x43, 0xc5, 0x95, 0x4b, 0xc5, - 0xa9, 0x12, 0x1c, 0x38, 0x15, 0xd4, 0x22, 0x71, 0xef, 0x91, 0x13, 0xda, 0x99, 0xd9, 0xf5, 0x6e, - 0xe2, 0xc4, 0x6b, 0x27, 0x48, 0x9c, 0x3c, 0x3b, 0xfb, 0x3d, 0x7e, 0xbf, 0xef, 0x31, 0xfb, 0x8d, - 0x61, 0x76, 0x25, 0x70, 0x6b, 0x36, 0x75, 0xee, 0x10, 0x93, 0xda, 0x4d, 0xe2, 0x13, 0x6f, 0xc5, - 0xa9, 0x11, 0x73, 0x65, 0xae, 0x4a, 0xb8, 0x3d, 0x67, 0xde, 0x0c, 0x88, 0xd7, 0x36, 0x5a, 0x1e, - 0xe3, 0x0c, 0xef, 0x8f, 0x45, 0x8d, 0x84, 0xa8, 0xa1, 0x44, 0x35, 0x73, 0x63, 0x4b, 0x49, 0x15, - 0x61, 0x4f, 0xdb, 0xd7, 0x60, 0xac, 0xe1, 0x12, 0xd3, 0x6e, 0x39, 0xa6, 0x4d, 0x29, 0xe3, 0x36, - 0x77, 0x18, 0xf5, 0xd5, 0xdb, 0x97, 0x6a, 0xcc, 0x6f, 0x32, 0xdf, 0xac, 0xda, 0x3e, 0x91, 0x30, - 0x62, 0x53,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, 0x76, 0xea, 0xda, 0x8f, 0xc3, 0x00, 0x1d, 0x58, - 0x18, 0xc3, 0x28, 0x6f, 0xb7, 0x88, 0x12, 0x10, 0x6b, 0xbc, 0x0b, 0xf2, 0x3e, 0xf7, 0x1c, 0xda, - 0x10, 0x08, 0xc7, 0x2d, 0xf5, 0x14, 0xc2, 0x76, 0x28, 0x17, 0xe8, 0x46, 0xac, 0x70, 0x89, 0xa7, - 0x20, 0x77, 0xdd, 0x65, 0x36, 0x2f, 0x8c, 0xce, 0xa0, 0x12, 0xb2, 0xe4, 0x03, 0x2e, 0xc0, 0x58, - 0x95, 0x31, 0x97, 0xd8, 0xb4, 0x90, 0x13, 0x14, 0xa3, 0x47, 0x5c, 0x83, 0x71, 0x2f, 0x82, 0x57, - 0xc8, 0x0b, 0x96, 0x0b, 0x03, 0x46, 0x37, 0x4d, 0xd3, 0xea, 0xd8, 0xc5, 0x1f, 0x42, 0x7e, 0x25, - 0x24, 0xe8, 0x17, 0xc6, 0x44, 0xfe, 0xce, 0x0f, 0xe8, 0x21, 0x91, 0x3c, 0x65, 0x50, 0xbb, 0x03, - 0xdb, 0x53, 0x59, 0x0d, 0x43, 0x72, 0x83, 0xb4, 0x55, 0xf4, 0xc2, 0x25, 0x5e, 0x82, 0x9c, 0x10, - 0x16, 0xb1, 0xdb, 0x12, 0xe7, 0xd2, 0x9e, 0xfe, 0x00, 0x41, 0x61, 0xad, 0xb4, 0x6a, 0x89, 0x05, - 0x18, 0xf3, 0xe4, 0x96, 0x2a, 0xda, 0x5e, 0x3d, 0x21, 0x0d, 0x54, 0x46, 0x1f, 0x3d, 0x99, 0x1e, - 0xb2, 0x22, 0x5d, 0xbc, 0x98, 0x2a, 0x43, 0xc9, 0xe0, 0x48, 0xcf, 0x32, 0x94, 0x18, 0x92, 0x75, - 0xa8, 0x97, 0x60, 0x97, 0xc0, 0xaa, 0xdc, 0xb4, 0x2f, 0xd5, 0xa3, 0x0e, 0x5b, 0x55, 0x8f, 0xfa, -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0xea, 0x3a, 0xdf, 0x9c, 0xce, 0x02, 0xa0, 0x9b, - 0xa6, 0xf6, 0xfa, 0xa0, 0x9a, 0x31, 0x89, 0x57, 0x04, 0x09, 0x03, 0x1f, 0xcd, 0x74, 0xa8, 0x94, - 0x89, 0x30, 0x11, 0x1e, 0x25, 0xbb, 0xd7, 0x9b, 0x27, 0xce, 0x65, 0xc4, 0xd4, 0x4d, 0x59, 0xbb, - 0xb0, 0x09, 0xe5, 0x98, 0xd3, 0x29, 0xc1, 0x69, 0x0e, 0x9b, 0x3d, 0x38, 0xc5, 0x03, 0xbf, 0xa2, - 0x55, 0xb9, 0xfc, 0xe8, 0x69, 0x11, 0x3d, 0x7e, 0x5a, 0x44, 0x7f, 0x3c, 0x2d, 0xa2, 0xcf, 0x9e, - 0x15, 0x87, 0x1e, 0x3f, 0x2b, 0x0e, 0xfd, 0xf6, 0xac, 0x38, 0xf4, 0xd1, 0xb1, 0xc4, 0x75, 0x8d, - 0x2f, 0xdb, 0x9e, 0xef, 0xf8, 0x26, 0xe1, 0xcb, 0xc4, 0x6b, 0x3a, 0x94, 0x9b, 0xb7, 0x53, 0xe6, - 0xc5, 0xe5, 0xad, 0x9a, 0x17, 0x7f, 0x5b, 0x1e, 0xff, 0x27, 0x00, 0x00, 0xff, 0xff, 0x94, 0xc7, - 0x31, 0xc3, 0xb3, 0x15, 0x00, 0x00, + // 1412 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6c, 0x1b, 0x45, + 0x18, 0xce, 0x24, 0xb1, 0xd3, 0xfc, 0xa1, 0x29, 0x1d, 0xa2, 0xd6, 0xdd, 0xb6, 0x4e, 0xd8, 0xbe, + 0x1c, 0xa8, 0x77, 0x9b, 0x94, 0xbe, 0x05, 0xa2, 0x4e, 0x43, 0xd4, 0x52, 0x10, 0x5d, 0x10, 0x05, + 0x0e, 0x54, 0xeb, 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c, 0xae, 0xbf, 0x07, 0x2f, 0xa4, 0x76, 0xfd, + 0x16, 0xa3, 0x3e, 0xc1, 0xaf, 0x42, 0xbe, 0x25, 0x76, 0x0a, 0x68, 0x06, 0x95, 0x26, 0xe6, 0x0f, + 0x19, 0x1b, 0x46, 0xc3, 0x50, 0xea, 0x4a, 0x49, 0xff, 0x31, 0x07, 0xbb, 0x85, 0xd9, 0xcb, 0xae, + 0xcf, 0x2d, 0xe2, 0x30, 0xaf, 0x16, 0x79, 0xc4, 0x35, 0x00, 0x9b, 0x73, 0xcf, 0xad, 0x06, 0x9c, + 0x84, 0xe6, 0x47, 0x4a, 0x13, 0xf3, 0x17, 0x7a, 0x98, 0x5f, 0xc7, 0x96, 0xf1, 0x26, 0x69, 0xbf, + 0x6f, 0x37, 0x02, 0x72, 0x91, 0xb6, 0x02, 0x6e, 0x25, 0xec, 0xe2, 0xe7, 0x61, 0xc4, 0x6e, 0x34, + 0x0a, 0xc3, 0x33, 0xa8, 0xb4, 0xcd, 0x0a, 0x97, 0xf8, 0x0d, 0x80, 0x4e, 0x24, 0x0b, 0x23, 0x82, + 0xd6, 0x61, 0x43, 0x06, 0xcd, 0x08, 0x83, 0x66, 0xc8, 0xec, 0x77, 0x28, 0xd5, 0x89, 0xf2, 0x63, + 0x25, 0x34, 0xb5, 0x19, 0x98, 0xb4, 0xc8, 0x75, 0xe2, 0x11, 0xea, 0x48, 0xbf, 0x78, 0x12, 0x86, + 0xdd, 0x9a, 0x08, 0xd4, 0xb8, 0x35, 0xec, 0xd6, 0xb4, 0x9f, 0x86, 0x01, 0x3a, 0xb0, 0x30, 0x86, + 0x51, 0xde, 0x6e, 0x11, 0x25, 0x20, 0xd6, 0x78, 0x17, 0xe4, 0x7d, 0xee, 0xb9, 0xb4, 0x2e, 0x10, + 0x8e, 0x5b, 0xea, 0x29, 0x84, 0xed, 0x52, 0x2e, 0xd0, 0x8d, 0x58, 0xe1, 0x12, 0x4f, 0x41, 0xee, + 0x7a, 0x83,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 0x9c, 0xe6, 0xb0, 0xd9, 0x83, 0x53, 0x3c, 0xf0, 0x2b, 0x5a, 0x95, 0x4b, + 0x0f, 0x9f, 0x14, 0xd1, 0xa3, 0x27, 0x45, 0xf4, 0xe7, 0x93, 0x22, 0xfa, 0xfc, 0x69, 0x71, 0xe8, + 0xd1, 0xd3, 0xe2, 0xd0, 0xef, 0x4f, 0x8b, 0x43, 0x1f, 0x1d, 0x4b, 0x5c, 0xd7, 0xf8, 0xb2, 0xed, + 0xf9, 0xae, 0x6f, 0x12, 0xbe, 0x4c, 0xbc, 0xa6, 0x4b, 0xb9, 0x79, 0x2b, 0x65, 0x5e, 0x5c, 0xde, + 0xaa, 0x79, 0xf1, 0xb7, 0xe5, 0xf1, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x17, 0xf0, 0x11, + 0xb3, 0x15, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1530,10 +1530,10 @@ type QueryClient interface { ListNameRecords(ctx context.Context, in *QueryListNameRecordsRequest, opts ...grpc.CallOption) (*QueryListNameRecordsResponse, error) // Whois method retrieve the name authority info Whois(ctx context.Context, in *QueryWhoisRequest, opts ...grpc.CallOption) (*QueryWhoisResponse, error) - // LookupWrn - LookupWrn(ctx context.Context, in *QueryLookupWrn, opts ...grpc.CallOption) (*QueryLookupWrnResponse, error) - // ResolveWrn - ResolveWrn(ctx context.Context, in *QueryResolveWrn, opts ...grpc.CallOption) (*QueryResolveWrnResponse, error) + // LookupCrn + LookupCrn(ctx context.Context, in *QueryLookupCrn, opts ...grpc.CallOption) (*QueryLookupCrnResponse, error) + // ResolveCrn + ResolveCrn(ctx context.Context, in *QueryResolveCrn, opts ...grpc.CallOption) (*QueryResolveCrnResponse, error) // GetRecordExpiryQueue GetRecordExpiryQueue(ctx context.Context, in *QueryGetRecordExpiryQueue, opts ...grpc.CallOption) (*QueryGetRecordExpiryQueueResponse, error) // GetAuthorityExpiryQueue @@ -1611,18 +1611,18 @@ func (c *queryClient) Whois(ctx context.Context, in *QueryWhoisRequest, opts ... return out, nil } -func (c *queryClient) LookupWrn(ctx context.Context, in *QueryLookupWrn, opts ...grpc.CallOption) (*QueryLookupWrnResponse, error) { - out := new(QueryLookupWrnResponse) - err := c.cc.Invoke(ctx, "/vulcanize.nameservice.v1beta1.Query/LookupWrn", in, out, opts...) +func (c *queryClient) LookupCrn(ctx context.Context, in *QueryLookupCrn, opts ...grpc.CallOption) (*QueryLookupCrnResponse, error) { + out := new(QueryLookupCrnResponse) + err := c.cc.Invoke(ctx, "/vulcanize.nameservice.v1beta1.Query/LookupCrn", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) ResolveWrn(ctx context.Context, in *QueryResolveWrn, opts ...grpc.CallOption) (*QueryResolveWrnResponse, error) { - out := new(QueryResolveWrnResponse) - err := c.cc.Invoke(ctx, "/vulcanize.nameservice.v1beta1.Query/ResolveWrn", in, out, opts...) +func (c *queryClient) ResolveCrn(ctx context.Context, in *QueryResolveCrn, opts ...grpc.CallOption) (*QueryResolveCrnResponse, error) { + out := new(QueryResolveCrnResponse) + err := c.cc.Invoke(ctx, "/vulcanize.nameservice.v1beta1.Query/ResolveCrn", in, out, opts...) if err != nil { return nil, err } @@ -1663,10 +1663,10 @@ type QueryServer interface { ListNameRecords(context.Context, *QueryListNameRecordsRequest) (*QueryListNameRecordsResponse, error) // Whois method retrieve the name authority info Whois(context.Context, *QueryWhoisRequest) (*QueryWhoisResponse, error) - // LookupWrn - LookupWrn(context.Context, *QueryLookupWrn) (*QueryLookupWrnResponse, error) - // ResolveWrn - ResolveWrn(context.Context, *QueryResolveWrn) (*QueryResolveWrnResponse, error) + // LookupCrn + LookupCrn(context.Context, *QueryLookupCrn) (*QueryLookupCrnResponse, error) + // ResolveCrn + ResolveCrn(context.Context, *QueryResolveCrn) (*QueryResolveCrnResponse, error) // GetRecordExpiryQueue GetRecordExpiryQueue(context.Context, *QueryGetRecordExpiryQueue) (*QueryGetRecordExpiryQueueResponse, error) // GetAuthorityExpiryQueue @@ -1698,11 +1698,11 @@ func (*UnimplementedQueryServer) ListNameRecords(ctx context.Context, req *Query func (*UnimplementedQueryServer) Whois(ctx context.Context, req *QueryWhoisRequest) (*QueryWhoisResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Whois not implemented") } -func (*UnimplementedQueryServer) LookupWrn(ctx context.Context, req *QueryLookupWrn) (*QueryLookupWrnResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LookupWrn not implemented") +func (*UnimplementedQueryServer) LookupCrn(ctx context.Context, req *QueryLookupCrn) (*QueryLookupCrnResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LookupCrn not implemented") } -func (*UnimplementedQueryServer) ResolveWrn(ctx context.Context, req *QueryResolveWrn) (*QueryResolveWrnResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResolveWrn not implemented") +func (*UnimplementedQueryServer) ResolveCrn(ctx context.Context, req *QueryResolveCrn) (*QueryResolveCrnResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResolveCrn not implemented") } func (*UnimplementedQueryServer) GetRecordExpiryQueue(ctx context.Context, req *QueryGetRecordExpiryQueue) (*QueryGetRecordExpiryQueueResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetRecordExpiryQueue not implemented") @@ -1841,38 +1841,38 @@ func _Query_Whois_Handler(srv interface{}, ctx context.Context, dec func(interfa return interceptor(ctx, in, info, handler) } -func _Query_LookupWrn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryLookupWrn) +func _Query_LookupCrn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryLookupCrn) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).LookupWrn(ctx, in) + return srv.(QueryServer).LookupCrn(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vulcanize.nameservice.v1beta1.Query/LookupWrn", + FullMethod: "/vulcanize.nameservice.v1beta1.Query/LookupCrn", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).LookupWrn(ctx, req.(*QueryLookupWrn)) + return srv.(QueryServer).LookupCrn(ctx, req.(*QueryLookupCrn)) } return interceptor(ctx, in, info, handler) } -func _Query_ResolveWrn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryResolveWrn) +func _Query_ResolveCrn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryResolveCrn) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).ResolveWrn(ctx, in) + return srv.(QueryServer).ResolveCrn(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/vulcanize.nameservice.v1beta1.Query/ResolveWrn", + FullMethod: "/vulcanize.nameservice.v1beta1.Query/ResolveCrn", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ResolveWrn(ctx, req.(*QueryResolveWrn)) + return srv.(QueryServer).ResolveCrn(ctx, req.(*QueryResolveCrn)) } return interceptor(ctx, in, info, handler) } @@ -1946,12 +1946,12 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_Whois_Handler, }, { - MethodName: "LookupWrn", - Handler: _Query_LookupWrn_Handler, + MethodName: "LookupCrn", + Handler: _Query_LookupCrn_Handler, }, { - MethodName: "ResolveWrn", - Handler: _Query_ResolveWrn_Handler, + MethodName: "ResolveCrn", + Handler: _Query_ResolveCrn_Handler, }, { MethodName: "GetRecordExpiryQueue", @@ -2693,7 +2693,7 @@ func (m *QueryWhoisResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryLookupWrn) Marshal() (dAtA []byte, err error) { +func (m *QueryLookupCrn) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2703,27 +2703,27 @@ func (m *QueryLookupWrn) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryLookupWrn) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryLookupCrn) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryLookupWrn) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryLookupCrn) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Wrn) > 0 { - i -= len(m.Wrn) - copy(dAtA[i:], m.Wrn) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Wrn))) + if len(m.Crn) > 0 { + i -= len(m.Crn) + copy(dAtA[i:], m.Crn) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Crn))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryLookupWrnResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryLookupCrnResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2733,12 +2733,12 @@ func (m *QueryLookupWrnResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryLookupWrnResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryLookupCrnResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryLookupWrnResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryLookupCrnResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2758,7 +2758,7 @@ func (m *QueryLookupWrnResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryResolveWrn) Marshal() (dAtA []byte, err error) { +func (m *QueryResolveCrn) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2768,27 +2768,27 @@ func (m *QueryResolveWrn) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryResolveWrn) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryResolveCrn) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryResolveWrn) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryResolveCrn) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Wrn) > 0 { - i -= len(m.Wrn) - copy(dAtA[i:], m.Wrn) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Wrn))) + if len(m.Crn) > 0 { + i -= len(m.Crn) + copy(dAtA[i:], m.Crn) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Crn))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryResolveWrnResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryResolveCrnResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2798,12 +2798,12 @@ func (m *QueryResolveWrnResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryResolveWrnResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryResolveCrnResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryResolveWrnResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryResolveCrnResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3329,20 +3329,20 @@ func (m *QueryWhoisResponse) Size() (n int) { return n } -func (m *QueryLookupWrn) Size() (n int) { +func (m *QueryLookupCrn) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Wrn) + l = len(m.Crn) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryLookupWrnResponse) Size() (n int) { +func (m *QueryLookupCrnResponse) Size() (n int) { if m == nil { return 0 } @@ -3355,20 +3355,20 @@ func (m *QueryLookupWrnResponse) Size() (n int) { return n } -func (m *QueryResolveWrn) Size() (n int) { +func (m *QueryResolveCrn) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Wrn) + l = len(m.Crn) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryResolveWrnResponse) Size() (n int) { +func (m *QueryResolveCrnResponse) Size() (n int) { if m == nil { return 0 } @@ -5324,7 +5324,7 @@ func (m *QueryWhoisResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLookupWrn) Unmarshal(dAtA []byte) error { +func (m *QueryLookupCrn) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5347,15 +5347,15 @@ func (m *QueryLookupWrn) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLookupWrn: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLookupCrn: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLookupWrn: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLookupCrn: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Wrn", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Crn", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5383,7 +5383,7 @@ func (m *QueryLookupWrn) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Wrn = string(dAtA[iNdEx:postIndex]) + m.Crn = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5406,7 +5406,7 @@ func (m *QueryLookupWrn) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryLookupWrnResponse) Unmarshal(dAtA []byte) error { +func (m *QueryLookupCrnResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5429,10 +5429,10 @@ func (m *QueryLookupWrnResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryLookupWrnResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryLookupCrnResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryLookupWrnResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryLookupCrnResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5492,7 +5492,7 @@ func (m *QueryLookupWrnResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryResolveWrn) Unmarshal(dAtA []byte) error { +func (m *QueryResolveCrn) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5515,15 +5515,15 @@ func (m *QueryResolveWrn) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryResolveWrn: wiretype end group for non-group") + return fmt.Errorf("proto: QueryResolveCrn: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryResolveWrn: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryResolveCrn: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Wrn", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Crn", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5551,7 +5551,7 @@ func (m *QueryResolveWrn) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Wrn = string(dAtA[iNdEx:postIndex]) + m.Crn = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5574,7 +5574,7 @@ func (m *QueryResolveWrn) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryResolveWrnResponse) Unmarshal(dAtA []byte) error { +func (m *QueryResolveCrnResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5597,10 +5597,10 @@ func (m *QueryResolveWrnResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryResolveWrnResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryResolveCrnResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryResolveWrnResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryResolveCrnResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/nameservice/types/query.pb.gw.go b/x/nameservice/types/query.pb.gw.go index ca96f4d5..a6094b92 100644 --- a/x/nameservice/types/query.pb.gw.go +++ b/x/nameservice/types/query.pb.gw.go @@ -20,7 +20,6 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -31,7 +30,6 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage -var _ = metadata.Join func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest @@ -322,73 +320,73 @@ func local_request_Query_Whois_0(ctx context.Context, marshaler runtime.Marshale } var ( - filter_Query_LookupWrn_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_LookupCrn_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_Query_LookupWrn_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLookupWrn +func request_Query_LookupCrn_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLookupCrn var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LookupWrn_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LookupCrn_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.LookupWrn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.LookupCrn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_LookupWrn_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryLookupWrn +func local_request_Query_LookupCrn_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryLookupCrn var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LookupWrn_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_LookupCrn_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.LookupWrn(ctx, &protoReq) + msg, err := server.LookupCrn(ctx, &protoReq) return msg, metadata, err } var ( - filter_Query_ResolveWrn_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Query_ResolveCrn_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_Query_ResolveWrn_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryResolveWrn +func request_Query_ResolveCrn_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryResolveCrn var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ResolveWrn_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ResolveCrn_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ResolveWrn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ResolveCrn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_ResolveWrn_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryResolveWrn +func local_request_Query_ResolveCrn_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryResolveCrn var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ResolveWrn_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ResolveCrn_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ResolveWrn(ctx, &protoReq) + msg, err := server.ResolveCrn(ctx, &protoReq) return msg, metadata, err } @@ -468,14 +466,12 @@ func local_request_Query_GetAuthorityExpiryQueue_0(ctx context.Context, marshale // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -483,7 +479,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -497,8 +492,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ListRecords_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -506,7 +499,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ListRecords_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -520,8 +512,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_GetRecord_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -529,7 +519,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GetRecord_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -543,8 +532,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_GetRecordByBondId_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -552,7 +539,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GetRecordByBondId_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -566,8 +552,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_GetNameServiceModuleBalance_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -575,7 +559,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GetNameServiceModuleBalance_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -589,8 +572,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ListNameRecords_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -598,7 +579,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ListNameRecords_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -612,8 +592,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_Whois_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -621,7 +599,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_Whois_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -632,57 +609,49 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_LookupWrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_LookupCrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_LookupWrn_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + resp, md, err := local_request_Query_LookupCrn_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_LookupWrn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_LookupCrn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ResolveWrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ResolveCrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ResolveWrn_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + resp, md, err := local_request_Query_ResolveCrn_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_ResolveWrn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ResolveCrn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) mux.Handle("GET", pattern_Query_GetRecordExpiryQueue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -690,7 +659,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GetRecordExpiryQueue_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -704,8 +672,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_GetAuthorityExpiryQueue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -713,7 +679,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_GetAuthorityExpiryQueue_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -905,7 +870,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_LookupWrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_LookupCrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -914,18 +879,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_LookupWrn_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_LookupCrn_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_LookupWrn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_LookupCrn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ResolveWrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ResolveCrn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -934,14 +899,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ResolveWrn_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ResolveCrn_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_ResolveWrn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ResolveCrn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1003,9 +968,9 @@ var ( pattern_Query_Whois_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "nameservice", "v1beta1", "whois", "name"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_LookupWrn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "nameservice", "v1beta1", "lookup"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_LookupCrn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "nameservice", "v1beta1", "lookup"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_ResolveWrn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "nameservice", "v1beta1", "resolve"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ResolveCrn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "nameservice", "v1beta1", "resolve"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_GetRecordExpiryQueue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "nameservice", "v1beta1", "record-expiry"}, "", runtime.AssumeColonVerbOpt(true))) @@ -1027,9 +992,9 @@ var ( forward_Query_Whois_0 = runtime.ForwardResponseMessage - forward_Query_LookupWrn_0 = runtime.ForwardResponseMessage + forward_Query_LookupCrn_0 = runtime.ForwardResponseMessage - forward_Query_ResolveWrn_0 = runtime.ForwardResponseMessage + forward_Query_ResolveCrn_0 = runtime.ForwardResponseMessage forward_Query_GetRecordExpiryQueue_0 = runtime.ForwardResponseMessage diff --git a/x/nameservice/types/tx.pb.go b/x/nameservice/types/tx.pb.go index 909f765b..0dd83b57 100644 --- a/x/nameservice/types/tx.pb.go +++ b/x/nameservice/types/tx.pb.go @@ -181,7 +181,7 @@ func (m *Payload) GetSignatures() []Signature { // MsgSetName type MsgSetName struct { - Wrn string `protobuf:"bytes,1,opt,name=wrn,proto3" json:"wrn,omitempty"` + Crn string `protobuf:"bytes,1,opt,name=crn,proto3" json:"crn,omitempty"` Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` } @@ -219,9 +219,9 @@ func (m *MsgSetName) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSetName proto.InternalMessageInfo -func (m *MsgSetName) GetWrn() string { +func (m *MsgSetName) GetCrn() string { if m != nil { - return m.Wrn + return m.Crn } return "" } @@ -476,7 +476,7 @@ var xxx_messageInfo_MsgSetAuthorityBondResponse proto.InternalMessageInfo // MsgDeleteNameAuthority is SDK message for DeleteNameAuthority type MsgDeleteNameAuthority struct { - Wrn string `protobuf:"bytes,1,opt,name=wrn,proto3" json:"wrn,omitempty"` + Crn string `protobuf:"bytes,1,opt,name=crn,proto3" json:"crn,omitempty"` Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty"` } @@ -513,9 +513,9 @@ func (m *MsgDeleteNameAuthority) XXX_DiscardUnknown() { var xxx_messageInfo_MsgDeleteNameAuthority proto.InternalMessageInfo -func (m *MsgDeleteNameAuthority) GetWrn() string { +func (m *MsgDeleteNameAuthority) GetCrn() string { if m != nil { - return m.Wrn + return m.Crn } return "" } @@ -1059,62 +1059,62 @@ func init() { } var fileDescriptor_b66a805dda801ce9 = []byte{ - // 866 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0x8d, 0x9b, 0x7e, 0xc9, 0x97, 0x1b, 0xa8, 0x5a, 0x13, 0xaa, 0xe0, 0x52, 0x3b, 0xb8, 0x6a, - 0x15, 0x54, 0x11, 0xb7, 0x29, 0x88, 0xaa, 0x50, 0x89, 0x46, 0x80, 0x00, 0x29, 0x08, 0xb9, 0x0b, - 0x24, 0x36, 0x95, 0x13, 0x8f, 0x1c, 0x57, 0x89, 0x27, 0xf2, 0x38, 0x4d, 0x43, 0x25, 0xd8, 0x20, - 0x21, 0xb1, 0xe2, 0x29, 0x10, 0x2f, 0x81, 0xd8, 0x76, 0xd9, 0x25, 0xab, 0x08, 0xb5, 0x6f, 0x90, - 0x2d, 0x1b, 0xe4, 0x9f, 0xd8, 0xe3, 0xfc, 0x34, 0x3f, 0x74, 0x37, 0x9e, 0xb9, 0xe7, 0x9e, 0x73, - 0xcf, 0xcc, 0xf5, 0x0c, 0xac, 0x1d, 0x35, 0xaa, 0x65, 0xc5, 0xd0, 0xdf, 0x23, 0xc9, 0x50, 0x6a, - 0x88, 0x20, 0xf3, 0x48, 0x2f, 0x23, 0xe9, 0x68, 0xb3, 0x84, 0x2c, 0x65, 0x53, 0xb2, 0x8e, 0x73, - 0x75, 0x13, 0x5b, 0x98, 0x5d, 0xf6, 0xe3, 0x72, 0x54, 0x5c, 0xce, 0x8b, 0xe3, 0x52, 0x1a, 0xd6, - 0xb0, 0x13, 0x29, 0xd9, 0x23, 0x17, 0xc4, 0x49, 0x97, 0x27, 0xa7, 0x13, 0x39, 0x00, 0xf1, 0x3b, - 0x03, 0xd7, 0x8a, 0x44, 0xdb, 0x47, 0x96, 0x8c, 0xca, 0xd8, 0x54, 0xd9, 0x6d, 0x88, 0x97, 0xb0, - 0xa1, 0x1e, 0xe8, 0x6a, 0x9a, 0xc9, 0x30, 0xd9, 0x44, 0x41, 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 0x88, 0xc9, 0x57, 0xf2, 0x83, 0x81, 0x9b, 0xce, 0xae, - 0xef, 0xf5, 0x6a, 0x79, 0x06, 0x49, 0x03, 0x35, 0x0f, 0xc2, 0x7a, 0x56, 0x3b, 0x6d, 0xe1, 0x8e, - 0xab, 0xc7, 0x40, 0xcd, 0x42, 0x48, 0x52, 0x30, 0x21, 0x27, 0xfc, 0xb1, 0x9d, 0x06, 0x57, 0xd5, - 0x83, 0xf0, 0x46, 0x53, 0x69, 0x70, 0x55, 0x0d, 0xa7, 0x09, 0x26, 0xe4, 0x84, 0x3f, 0x1e, 0xba, - 0xe3, 0x02, 0x2c, 0x0f, 0x94, 0xdf, 0x2d, 0x30, 0xff, 0x27, 0x01, 0xd1, 0x22, 0xd1, 0x58, 0x0c, - 0x89, 0xe0, 0x92, 0x5a, 0x1f, 0xf1, 0x4f, 0xa6, 0xef, 0x09, 0x6e, 0x6b, 0x82, 0x60, 0xdf, 0xd7, - 0x08, 0xdb, 0x80, 0x24, 0xdd, 0xb7, 0xf7, 0x46, 0x67, 0xa1, 0xc2, 0xb9, 0x07, 0x13, 0x85, 0x53, - 0xb4, 0x27, 0x70, 0x3d, 0xdc, 0xa7, 0xd2, 0xe8, 0x4c, 0x21, 0x00, 0xf7, 0x70, 0x42, 0x00, 0x45, - 0xfe, 0x01, 0xe6, 0x7a, 0x1a, 0x6c, 0x63, 0x74, 0xb2, 0x30, 0x82, 0xdb, 0x9e, 0x14, 0x41, 0xf1, - 0x7f, 0x66, 0x60, 0xa1, 0xbf, 0xab, 0xb6, 0x26, 0xc9, 0xe8, 0x81, 0xb8, 0x47, 0x53, 0x80, 0x28, - 0x25, 0x5f, 0x18, 0x60, 0x07, 0x34, 0xd5, 0xfd, 0x71, 0xb6, 0xb5, 0x17, 0xc5, 0x3d, 0x9e, 0x06, - 0x45, 0x89, 0xd1, 0x21, 0xde, 0x7d, 0x1c, 0xdc, 0x1d, 0xeb, 0x30, 0xdb, 0xa1, 0xdc, 0xe6, 0xd8, - 0xa1, 0x14, 0xd5, 0x47, 0xfb, 0xd4, 0x3b, 0xd7, 0xb9, 0x43, 0x97, 0x1f, 0x47, 0x79, 0xf8, 0xf6, - 0xe7, 0x76, 0x26, 0xc7, 0x50, 0x02, 0x3e, 0x31, 0x00, 0xc1, 0x8d, 0xca, 0x8e, 0xd1, 0x47, 0x03, - 0xee, 0x5f, 0x6e, 0x77, 0x2a, 0x58, 0x58, 0xc6, 0x7c, 0xdf, 0xc3, 0x25, 0x3f, 0x96, 0xa3, 0x21, - 0xcc, 0x38, 0x6e, 0x0c, 0x7d, 0xa3, 0x44, 0x0a, 0xaf, 0x4e, 0xcf, 0x79, 0xe6, 0xec, 0x9c, 0x67, - 0x7e, 0x9f, 0xf3, 0xcc, 0xd7, 0x0b, 0x3e, 0x72, 0x76, 0xc1, 0x47, 0x7e, 0x5d, 0xf0, 0x91, 0x77, - 0x1b, 0x9a, 0x6e, 0x55, 0x1a, 0xa5, 0x5c, 0x19, 0xd7, 0x24, 0xab, 0xa2, 0x98, 0x44, 0x27, 0x12, - 0xb2, 0x2a, 0xc8, 0xac, 0xe9, 0x86, 0x25, 0x1d, 0x87, 0x9e, 0xff, 0x56, 0xab, 0x8e, 0x48, 0x29, - 0xe6, 0xbc, 0xf8, 0xb7, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x20, 0x34, 0xe4, 0xef, 0x81, 0x0c, - 0x00, 0x00, + // 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, +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0x45, 0x65, 0x2c, 0x0f, 0x3d, 0x5c, 0x8a, + 0x53, 0x39, 0x1a, 0xc1, 0x4c, 0xe3, 0xc6, 0xd8, 0x37, 0x4a, 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, } // Reference imports to suppress errors if they are not otherwise used. @@ -1141,7 +1141,7 @@ type MsgClient interface { DissociateRecords(ctx context.Context, in *MsgDissociateRecords, opts ...grpc.CallOption) (*MsgDissociateRecordsResponse, error) // ReAssociateRecords ReAssociateRecords(ctx context.Context, in *MsgReAssociateRecords, opts ...grpc.CallOption) (*MsgReAssociateRecordsResponse, error) - // SetName will store the name with given wrn and name + // SetName will store the name with given crn and name SetName(ctx context.Context, in *MsgSetName, opts ...grpc.CallOption) (*MsgSetNameResponse, error) // Reserve name ReserveName(ctx context.Context, in *MsgReserveAuthority, opts ...grpc.CallOption) (*MsgReserveAuthorityResponse, error) @@ -1263,7 +1263,7 @@ type MsgServer interface { DissociateRecords(context.Context, *MsgDissociateRecords) (*MsgDissociateRecordsResponse, error) // ReAssociateRecords ReAssociateRecords(context.Context, *MsgReAssociateRecords) (*MsgReAssociateRecordsResponse, error) - // SetName will store the name with given wrn and name + // SetName will store the name with given crn and name SetName(context.Context, *MsgSetName) (*MsgSetNameResponse, error) // Reserve name ReserveName(context.Context, *MsgReserveAuthority) (*MsgReserveAuthorityResponse, error) @@ -1694,10 +1694,10 @@ func (m *MsgSetName) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Wrn) > 0 { - i -= len(m.Wrn) - copy(dAtA[i:], m.Wrn) - i = encodeVarintTx(dAtA, i, uint64(len(m.Wrn))) + if len(m.Crn) > 0 { + i -= len(m.Crn) + copy(dAtA[i:], m.Crn) + i = encodeVarintTx(dAtA, i, uint64(len(m.Crn))) i-- dAtA[i] = 0xa } @@ -1888,10 +1888,10 @@ func (m *MsgDeleteNameAuthority) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x12 } - if len(m.Wrn) > 0 { - i -= len(m.Wrn) - copy(dAtA[i:], m.Wrn) - i = encodeVarintTx(dAtA, i, uint64(len(m.Wrn))) + if len(m.Crn) > 0 { + i -= len(m.Crn) + copy(dAtA[i:], m.Crn) + i = encodeVarintTx(dAtA, i, uint64(len(m.Crn))) i-- dAtA[i] = 0xa } @@ -2299,7 +2299,7 @@ func (m *MsgSetName) Size() (n int) { } var l int _ = l - l = len(m.Wrn) + l = len(m.Crn) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2389,7 +2389,7 @@ func (m *MsgDeleteNameAuthority) Size() (n int) { } var l int _ = l - l = len(m.Wrn) + l = len(m.Crn) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2901,7 +2901,7 @@ func (m *MsgSetName) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Wrn", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Crn", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2929,7 +2929,7 @@ func (m *MsgSetName) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Wrn = string(dAtA[iNdEx:postIndex]) + m.Crn = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -3489,7 +3489,7 @@ func (m *MsgDeleteNameAuthority) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Wrn", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Crn", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3517,7 +3517,7 @@ func (m *MsgDeleteNameAuthority) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Wrn = string(dAtA[iNdEx:postIndex]) + m.Crn = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { From 2ea883bc502be3b8f2e17f35b541db2ec6a21e6c Mon Sep 17 00:00:00 2001 From: nabarun Date: Wed, 20 Apr 2022 17:21:52 +0530 Subject: [PATCH 09/10] 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 FileDescriptor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8f, 0x83, 0xdf, 0xa7, 0x3a, 0xcc, 0x6e, - 0xa8, 0xb0, 0x3b, 0x75, 0x28, 0x43, 0xf5, 0xd2, 0x3d, 0xf5, 0xf4, 0x3a, 0xa7, 0x74, 0xc5, 0x69, - 0x94, 0x47, 0x6f, 0x7f, 0xe1, 0x60, 0x76, 0x0c, 0x23, 0xe0, 0x15, 0x07, 0x10, 0xde, 0xa8, 0xfc, - 0x14, 0x7d, 0x34, 0xe2, 0xfe, 0x15, 0x0e, 0xe7, 0x82, 0x45, 0x65, 0x2c, 0x0f, 0x3d, 0x5c, 0x8a, - 0x53, 0x39, 0x1a, 0xc1, 0x4c, 0xe3, 0xc6, 0xd8, 0x37, 0x4a, 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, 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3, + 0x08, 0x78, 0xc2, 0x01, 0x44, 0x37, 0x2a, 0x3f, 0x47, 0x1f, 0x4d, 0xb8, 0x7f, 0x85, 0x93, 0xa5, + 0x60, 0x71, 0x19, 0x6b, 0x63, 0x1f, 0x2e, 0x95, 0xb9, 0x1c, 0x8d, 0x61, 0xe6, 0x71, 0x63, 0xea, + 0x37, 0x4a, 0xa2, 0xfa, 0xc7, 0xcd, 0x9d, 0xc8, 0xdd, 0xde, 0x89, 0xdc, 0xdb, 0x3b, 0x91, 0x7b, + 0x7e, 0x2f, 0x26, 0x6e, 0xef, 0xc5, 0xc4, 0x9b, 0x7b, 0x31, 0xf1, 0xcf, 0xbe, 0x61, 0x3a, 0xcd, + 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:]) From 9d4c381e1a2d419da8fa7ccead5cc5cd6468162b Mon Sep 17 00:00:00 2001 From: nabarun Date: Thu, 21 Apr 2022 00:45:52 +0530 Subject: [PATCH 10/10] fix: increase timers for nameservice tests --- x/nameservice/client/testutil/grpc.go | 15 ++++++++------- x/nameservice/client/testutil/query.go | 6 +++--- x/nameservice/client/testutil/tx.go | 4 ++-- x/nameservice/keeper/grpc_query_test.go | 9 ++++++--- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/x/nameservice/client/testutil/grpc.go b/x/nameservice/client/testutil/grpc.go index e4c51016..fd7a16e3 100644 --- a/x/nameservice/client/testutil/grpc.go +++ b/x/nameservice/client/testutil/grpc.go @@ -52,8 +52,8 @@ func (s *IntegrationTestSuite) TestGRPCQueryParams() { sr.NoError(err) params := nstypes.DefaultParams() params.RecordRent = sdk.NewCoin(s.cfg.BondDenom, nstypes.DefaultRecordRent) - params.RecordRentDuration = 5 * time.Second - params.AuthorityGracePeriod = 5 * time.Second + params.RecordRentDuration = 10 * time.Second + params.AuthorityGracePeriod = 10 * time.Second sr.Equal(response.GetParams().String(), params.String()) } }) @@ -237,8 +237,8 @@ func (s *IntegrationTestSuite) TestGRPCQueryRecordExpiryQueue() { if !tc.expectErr { tc.preRun(s.bondId) } - // wait 7 seconds for records expires - time.Sleep(time.Second * 7) + // wait 12 seconds for records expires + time.Sleep(time.Second * 12) resp, _ := rest.GetRequest(tc.url) require := s.Require() if tc.expectErr { @@ -307,8 +307,8 @@ func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() { if !tc.expectErr { tc.preRun("QueryAuthorityExpiryQueue") } - // wait 7 seconds to name authorites expires - time.Sleep(time.Second * 7) + // wait 12 seconds to name authorites expires + time.Sleep(time.Second * 12) resp, _ := rest.GetRequest(tc.url) require := s.Require() @@ -318,7 +318,8 @@ func (s *IntegrationTestSuite) TestGRPCQueryAuthorityExpiryQueue() { var response nstypes.QueryGetAuthorityExpiryQueueResponse err := val.ClientCtx.Codec.UnmarshalJSON(resp, &response) sr.NoError(err) - sr.NotZero(len(response.GetAuthorities())) + // removed from expiry queue as no bond set + sr.Zero(len(response.GetAuthorities())) } }) } diff --git a/x/nameservice/client/testutil/query.go b/x/nameservice/client/testutil/query.go index c2824b85..0616fb0b 100644 --- a/x/nameservice/client/testutil/query.go +++ b/x/nameservice/client/testutil/query.go @@ -40,8 +40,8 @@ func (s *IntegrationTestSuite) TestGetCmdQueryParams() { sr.NoError(err) params := types.DefaultParams() params.RecordRent = sdk.NewCoin(s.cfg.BondDenom, types.DefaultRecordRent) - params.RecordRentDuration = 5 * time.Second - params.AuthorityGracePeriod = 5 * time.Second + params.RecordRentDuration = 10 * time.Second + params.AuthorityGracePeriod = 10 * time.Second sr.Equal(param.GetParams().String(), params.String()) }) } @@ -433,7 +433,7 @@ func (s *IntegrationTestSuite) GetRecordExpiryQueue() { s.Run(tc.name, func() { if !tc.expErr { tc.preRun(authorityName, s) - time.Sleep(time.Second * 7) + time.Sleep(time.Second * 12) } cmd := cli.GetRecordExpiryQueue() clientCtx := val.ClientCtx diff --git a/x/nameservice/client/testutil/tx.go b/x/nameservice/client/testutil/tx.go index afc9aaab..d45ecd9b 100644 --- a/x/nameservice/client/testutil/tx.go +++ b/x/nameservice/client/testutil/tx.go @@ -47,8 +47,8 @@ func (s *IntegrationTestSuite) SetupSuite() { s.Require().NoError(s.cfg.Codec.UnmarshalJSON(genesisState[nstypes.ModuleName], &nsData)) nsData.Params.RecordRent = sdk.NewCoin(s.cfg.BondDenom, nstypes.DefaultRecordRent) - nsData.Params.RecordRentDuration = 5 * time.Second - nsData.Params.AuthorityGracePeriod = 5 * time.Second + nsData.Params.RecordRentDuration = 10 * time.Second + nsData.Params.AuthorityGracePeriod = 10 * time.Second nsDataBz, err := s.cfg.Codec.MarshalJSON(&nsData) s.Require().NoError(err) genesisState[nstypes.ModuleName] = nsDataBz diff --git a/x/nameservice/keeper/grpc_query_test.go b/x/nameservice/keeper/grpc_query_test.go index 713a659f..331a2676 100644 --- a/x/nameservice/keeper/grpc_query_test.go +++ b/x/nameservice/keeper/grpc_query_test.go @@ -3,9 +3,10 @@ package keeper_test import ( "context" "fmt" + "os" + "github.com/tharsis/ethermint/x/nameservice/client/cli" nameservicetypes "github.com/tharsis/ethermint/x/nameservice/types" - "os" ) func (suite *KeeperTestSuite) TestGrpcQueryParams() { @@ -62,12 +63,13 @@ func (suite *KeeperTestSuite) TestGrpcGetRecordLists() { sr.NoError(err) payload, err := cli.GetPayloadFromFile(dir + "/../helpers/examples/example1.yml") sr.NoError(err) - err = suite.app.NameServiceKeeper.ProcessSetRecord(ctx, nameservicetypes.MsgSetRecord{ + record, err := suite.app.NameServiceKeeper.ProcessSetRecord(ctx, nameservicetypes.MsgSetRecord{ BondId: suite.bond.GetId(), Signer: suite.accounts[0].String(), Payload: payload.ToPayload(), }) sr.NoError(err) + sr.NotNil(record.Id) } resp, err := grpcClient.ListRecords(context.Background(), test.req) if test.expErr { @@ -192,12 +194,13 @@ func (suite *KeeperTestSuite) TestGrpcQueryNameserviceModuleBalance() { sr.NoError(err) payload, err := cli.GetPayloadFromFile(dir + "/../helpers/examples/example1.yml") sr.NoError(err) - err = suite.app.NameServiceKeeper.ProcessSetRecord(ctx, nameservicetypes.MsgSetRecord{ + record, err := suite.app.NameServiceKeeper.ProcessSetRecord(ctx, nameservicetypes.MsgSetRecord{ BondId: suite.bond.GetId(), Signer: suite.accounts[0].String(), Payload: payload.ToPayload(), }) sr.NoError(err) + sr.NotNil(record.Id) } resp, err := grpcClient.GetNameServiceModuleBalance(context.Background(), test.req) if test.expErr {