Skip to content

Commit

Permalink
removed stake client query
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarom Swisa authored and Yarom Swisa committed May 30, 2023
1 parent 32837f0 commit 75f8d7a
Show file tree
Hide file tree
Showing 9 changed files with 158 additions and 916 deletions.
160 changes: 30 additions & 130 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30041,87 +30041,6 @@ paths:
type: string
tags:
- Query
'/lavanet/lava/pairing/clients/{chainID}':
get:
summary: Queries a list of Clients items.
operationId: LavanetLavaPairingClients
responses:
'200':
description: A successful response.
schema:
type: object
properties:
stakeEntry:
type: array
items:
type: object
properties:
stake:
type: object
properties:
denom:
type: string
amount:
type: string
description: >-
Coin defines a token with a denomination and an amount.


NOTE: The amount field is an Int which implements the
custom method

signatures required by gogoproto.
address:
type: string
stake_applied_block:
type: string
format: uint64
endpoints:
type: array
items:
type: object
properties:
iPPORT:
type: string
useType:
type: string
geolocation:
type: string
format: uint64
geolocation:
type: string
format: uint64
chain:
type: string
moniker:
type: string
output:
type: string
default:
description: An unexpected error response.
schema:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
details:
type: array
items:
type: object
properties:
'@type':
type: string
additionalProperties: {}
parameters:
- name: chainID
in: path
required: true
type: string
tags:
- Query
/lavanet/lava/pairing/epoch_payments:
get:
summary: Queries a list of EpochPayments items.
Expand Down Expand Up @@ -30235,6 +30154,16 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
'/lavanet/lava/pairing/epoch_payments/{index}':
Expand Down Expand Up @@ -30557,6 +30486,16 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
'/lavanet/lava/pairing/provider_payment_storage/{index}':
Expand Down Expand Up @@ -30892,6 +30831,16 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
'/lavanet/lava/pairing/unique_payment_storage_client_provider/{index}':
Expand Down Expand Up @@ -55202,55 +55151,6 @@ definitions:
repeated Bar results = 1;
PageResponse page = 2;
}
lavanet.lava.pairing.QueryClientsResponse:
type: object
properties:
stakeEntry:
type: array
items:
type: object
properties:
stake:
type: object
properties:
denom:
type: string
amount:
type: string
description: >-
Coin defines a token with a denomination and an amount.


NOTE: The amount field is an Int which implements the custom
method

signatures required by gogoproto.
address:
type: string
stake_applied_block:
type: string
format: uint64
endpoints:
type: array
items:
type: object
properties:
iPPORT:
type: string
useType:
type: string
geolocation:
type: string
format: uint64
geolocation:
type: string
format: uint64
chain:
type: string
moniker:
type: string
output:
type: string
lavanet.lava.pairing.QueryGetEpochPaymentsResponse:
type: object
properties:
Expand Down
14 changes: 0 additions & 14 deletions proto/pairing/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ service Query {
option (google.api.http).get = "/lavanet/lava/pairing/providers/{chainID}";
}

// Queries a list of Clients items.
rpc Clients(QueryClientsRequest) returns (QueryClientsResponse) {
option (google.api.http).get = "/lavanet/lava/pairing/clients/{chainID}";
}

// Queries a list of GetPairing items.
rpc GetPairing(QueryGetPairingRequest) returns (QueryGetPairingResponse) {
option (google.api.http).get = "/lavanet/lava/pairing/get_pairing/{chainID}/{client}";
Expand Down Expand Up @@ -104,15 +99,6 @@ message QueryProvidersResponse {
string output =2;
}

message QueryClientsRequest {
string chainID = 1;
}

message QueryClientsResponse {
repeated lavanet.lava.epochstorage.StakeEntry stakeEntry =1 [(gogoproto.nullable) = false];
string output =2;
}

message QueryGetPairingRequest {
string chainID = 1;
string client = 2;
Expand Down
10 changes: 6 additions & 4 deletions scripts/scripts_archive/test_unstake_provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ GASPRICE="0.000000001ulava"
lavad tx gov submit-proposal spec-add ./cookbook/specs/spec_add_ethereum.json --from alice -y --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
lavad tx gov vote 1 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE

lavad tx gov submit-proposal plans-add ./cookbook/plans/default.json -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
lavad tx gov vote 2 yes -y --from alice --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE

sleep 4
STAKE="500000000000ulava"
lavad tx pairing stake-client "ETH1" $STAKE 1 -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
lavad tx pairing stake-client "ETH1" $STAKE 1 -y --from user2 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
lavad tx pairing stake-client "ETH1" $STAKE 1 -y --from user3 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
lavad tx pairing stake-client "ETH1" $STAKE 1 -y --from user4 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
lavad tx subscription buy DefaultPlan $(lavad keys show user1 -a) -y --from user1 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
lavad tx subscription buy DefaultPlan $(lavad keys show user2 -a) -y --from user2 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
lavad tx subscription buy DefaultPlan $(lavad keys show user3 -a) -y --from user3 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
lavad tx subscription buy DefaultPlan $(lavad keys show user4 -a) -y --from user4 --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE

# Ethereum providers
lavad tx pairing stake-provider "ETH1" $STAKE "127.0.0.1:2221,jsonrpc,1" 1 -y --from servicer1 --provider-moniker "dummyMoniker" --gas-adjustment "1.5" --gas "auto" --gas-prices $GASPRICE
Expand Down
20 changes: 0 additions & 20 deletions testutil/e2e/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,20 +237,6 @@ func (lt *lavaTest) checkStakeLava(
fmt.Println("provider", providerStakeEntry.Address, providerStakeEntry.Endpoints)
lt.providerType[providerStakeEntry.Address] = providerStakeEntry.Endpoints
}

// Query clients
clientQueryRes, err := pairingQueryClient.Clients(context.Background(), &pairingTypes.QueryClientsRequest{
ChainID: spec.GetIndex(),
})
if err != nil {
panic(err)
}
if len(clientQueryRes.StakeEntry) != clientCount {
panic("Staking Failed CLIENT")
}
for _, clientStakeEntry := range clientQueryRes.StakeEntry {
fmt.Println("client", clientStakeEntry)
}
}
utils.LavaFormatInfo(successMessage)
}
Expand Down Expand Up @@ -658,12 +644,6 @@ func grpcTests(rpcURL string, testDuration time.Duration) error {
if err != nil {
errors = append(errors, err.Error())
}
_, err = pairingQueryClient.Clients(context.Background(), &pairingTypes.QueryClientsRequest{
ChainID: spec.GetIndex(),
})
if err != nil {
errors = append(errors, err.Error())
}
}
}
if len(errors) > 0 {
Expand Down
5 changes: 0 additions & 5 deletions x/pairing/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,8 @@ func GetQueryCmd(queryRoute string) *cobra.Command {

cmd.AddCommand(CmdQueryParams())
cmd.AddCommand(CmdProviders())

cmd.AddCommand(CmdClients())

cmd.AddCommand(CmdGetPairing())

cmd.AddCommand(CmdVerifyPairing())

cmd.AddCommand(CmdListUniquePaymentStorageClientProvider())
cmd.AddCommand(CmdShowUniquePaymentStorageClientProvider())
cmd.AddCommand(CmdListProviderPaymentStorage())
Expand Down
45 changes: 0 additions & 45 deletions x/pairing/client/cli/query_clients.go

This file was deleted.

32 changes: 0 additions & 32 deletions x/pairing/keeper/grpc_query_clients.go

This file was deleted.

Loading

0 comments on commit 75f8d7a

Please sign in to comment.