Compare commits

..

21 Commits

Author SHA1 Message Date
Michael
ac4257d792 Update README.md 2022-09-26 20:49:00 -07:00
adf86b84d1 ignite version 2022-09-24 01:22:13 +00:00
b852ce1a18 add versions & clean up readme fmt 2022-09-24 01:05:44 +00:00
98ceab502b formatting updates 2022-09-24 00:56:36 +00:00
2ea722c81c fixes + test hw edge cases 2022-09-23 00:16:42 +00:00
fba158d4d1 CLI tests, updates, fixes (reflect hw options) 2022-09-22 23:59:03 +00:00
e57473e2d2 add hardware args to cli lease creation
[UNTESTED]
2022-09-22 23:43:15 +00:00
f25f798443 new auction tx & event emission includes hw specs
[UNTESTED]
2022-09-22 23:18:08 +00:00
98c082693d hardware specs mandatory in auction creation msg 2022-09-22 23:01:31 +00:00
0b040b4334 cpu cores field 2022-09-22 22:40:51 +00:00
2fbd031988 temp fix for params init, finish later 2022-09-22 21:48:07 +00:00
8b201e32de populate dev config params genesis state 2022-09-22 00:49:52 +00:00
5ebc67bfd6 fully migrate to colinearcore params
- No more auctionconfig
- Now includes GPU model list support
- CPU vendors are still hardcoded
2022-09-22 00:16:09 +00:00
bfa30082f1 emit subscribable events for core module auctions 2022-09-21 20:31:20 +00:00
d51de8f3bc makefile help command 2022-09-21 20:31:01 +00:00
1b40283f69 specifiable hardware device types (cpu, gpu) 2022-09-17 22:35:29 +00:00
00f2dec105 tests for ongoing auction info query 2022-09-17 21:36:00 +00:00
909bbafc22 finish ongoing auction info q implementation 2022-09-17 21:35:46 +00:00
2078809fe7 handle nil case for vprovs in getter 2022-09-17 21:33:43 +00:00
669837845d scaffold generalized ongoing auction info query 2022-09-17 21:13:49 +00:00
0d11ad94c9 license shorthand; add official language later 2022-09-15 20:37:02 +00:00
31 changed files with 2478 additions and 184 deletions

View File

@@ -1,7 +1,15 @@
SHELL = /bin/bash SHELL = /bin/bash
.DEFAULT_GOAL := serve .DEFAULT_GOAL := test
.PHONY: test .PHONY: test
help:
@echo '--------------'
@echo '* Help *'
@echo '--------------'
@echo
@echo "test: run all integration tests on served chain"
@echo "utest: run all inline Go unit tests"
test: test:
./tests/test_locking_funds.sh ./tests/test_locking_funds.sh
./tests/test_auction_flow.sh ./tests/test_auction_flow.sh

View File

@@ -1,11 +1,13 @@
# Colinear Chain # GPU Compute Chain
![Go](https://img.shields.io/badge/go-%2300ADD8.svg?style=for-the-badge&logo=go&logoColor=white) ![Go](https://img.shields.io/badge/1.18-%2300ADD8.svg?style=for-the-badge&logo=go&logoColor=white&label=go)
![Shell Script](https://img.shields.io/badge/shell_script-%23121011.svg?style=for-the-badge&logo=gnu-bash&logoColor=white) ![Cosmos-SDK](https://img.shields.io/badge/0.45.0-%23161931?style=for-the-badge&logoColor=white&label=Cosmos-SDK)
![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?style=for-the-badge&logo=docker&logoColor=white) ![Ignite CLI](https://img.shields.io/badge/0.23.0-rgb(85%2C%20123%2C%20244)?style=for-the-badge&logoColor=white&label=Ignite-CLI)
![Rocky Linux](https://img.shields.io/badge/-Rocky%20Linux-%2310B981?style=for-the-badge&logo=rockylinux&logoColor=white) ![Rocky Linux](https://img.shields.io/badge/9-%2310B981?style=for-the-badge&logo=rockylinux&logoColor=white&label=rocky%20linux)
This repository contains the base chain implementation that Colinear's compute marketplace uses as a settlement layer. ![](https://shields.io/badge/license-business%20source%20license-orange?style=for-the-badge)
This repository contains the base chain implementation used as a compute marketplace settlement layer.
## Technical Documentation ## Technical Documentation

View File

@@ -25,7 +25,22 @@ genesis:
staking: staking:
params: params:
bond_denom: "uclr" bond_denom: "uclr"
colinearcore:
params:
gpuModels:
gtx-1050-ti: 0
gtx-1650-ti: 0
auctionTime: 10
minLeasePeriod: 3600
maxLeasePeriod: 2678400
allowedAuctionDenoms:
- uclr
- uusdc
maxVerifiedProviders: 1000
providerMinLockedUClr: 500000000
providerLockedSlashUClr: 100000000
providerAuditFrequency: 400
providerAuditLength: 11
accounts: accounts:
- name: alice - name: alice
coins: ["20000000000uusdc", "200000000000uclr"] coins: ["20000000000uusdc", "200000000000uclr"]

View File

@@ -4,6 +4,54 @@ info:
name: '' name: ''
description: '' description: ''
paths: paths:
'/colinear/colinearcore/auction_info/{auctionId}':
get:
summary: Queries a list of AuctionInfo items.
operationId: ColinearColinearcoreAuctionInfo
responses:
'200':
description: A successful response.
schema:
type: object
properties:
bids:
type: array
items:
type: object
properties:
owner:
type: string
amount:
type: string
verifiedProviders:
type: array
items:
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: auctionId
in: path
required: true
type: string
tags:
- Query
'/colinear/colinearcore/locked_funds/{owner}': '/colinear/colinearcore/locked_funds/{owner}':
get: get:
summary: Queries a list of LockedFunds items. summary: Queries a list of LockedFunds items.
@@ -123,6 +171,27 @@ paths:
format: uint64 format: uint64
remaining: remaining:
type: string type: string
gpus:
type: array
items:
type: string
title: hardware specs
cpuCores:
type: string
format: uint64
cpuArch:
type: string
enum:
- ANY
- INTEL
- AMD
default: ANY
memMb:
type: string
format: uint64
storageGb:
type: string
format: uint64
pagination: pagination:
type: object type: object
properties: properties:
@@ -270,6 +339,27 @@ paths:
format: uint64 format: uint64
remaining: remaining:
type: string type: string
gpus:
type: array
items:
type: string
title: hardware specs
cpuCores:
type: string
format: uint64
cpuArch:
type: string
enum:
- ANY
- INTEL
- AMD
default: ANY
memMb:
type: string
format: uint64
storageGb:
type: string
format: uint64
default: default:
description: An unexpected error response. description: An unexpected error response.
schema: schema:
@@ -388,6 +478,64 @@ paths:
params: params:
description: params holds all the parameters of this module. description: params holds all the parameters of this module.
type: object type: object
properties:
gpuModels:
type: object
additionalProperties:
type: integer
format: int64
title: hardware options
auctionGas:
type: integer
format: int64
title: gas config
auctionTime:
type: integer
format: int64
title: auction config
minLeasePeriod:
type: integer
format: int64
maxLeasePeriod:
type: integer
format: int64
allowedAuctionDenoms:
type: array
items:
type: string
maxVerifiedProviders:
type: integer
format: int64
title: >-
Maximum number of verified providers; this is to prevent
buffer overflow
attacks since provider list is not committed to chain
state and costs 0 gas
providerMinLockedUClr:
type: integer
format: int64
title: |-
Minimum required staked CLR to be a provider (i.e. to bid)
500 CLR
providerLockedSlashUClr:
type: integer
format: int64
title: |-
Amount slashed when a provider is offline during an audit
100 CLR
providerAuditFrequency:
type: integer
format: int64
title: |-
Blocks between provider audits
400 blocks ~400-1200min
providerAuditLength:
type: integer
format: int64
title: |-
Blocks before an audit ping must be returned
3 blocks ~4-12sec
description: >- description: >-
QueryParamsResponse is response type for the Query/Params RPC QueryParamsResponse is response type for the Query/Params RPC
method. method.
@@ -30813,6 +30961,27 @@ definitions:
format: uint64 format: uint64
remaining: remaining:
type: string type: string
gpus:
type: array
items:
type: string
title: hardware specs
cpuCores:
type: string
format: uint64
cpuArch:
type: string
enum:
- ANY
- INTEL
- AMD
default: ANY
memMb:
type: string
format: uint64
storageGb:
type: string
format: uint64
colinear.colinearcore.Bid: colinear.colinearcore.Bid:
type: object type: object
properties: properties:
@@ -30820,6 +30989,13 @@ definitions:
type: string type: string
amount: amount:
type: string type: string
colinear.colinearcore.CpuArchitecture:
type: string
enum:
- ANY
- INTEL
- AMD
default: ANY
colinear.colinearcore.LockedUsers: colinear.colinearcore.LockedUsers:
type: object type: object
properties: properties:
@@ -30850,6 +31026,64 @@ definitions:
format: uint64 format: uint64
colinear.colinearcore.Params: colinear.colinearcore.Params:
type: object type: object
properties:
gpuModels:
type: object
additionalProperties:
type: integer
format: int64
title: hardware options
auctionGas:
type: integer
format: int64
title: gas config
auctionTime:
type: integer
format: int64
title: auction config
minLeasePeriod:
type: integer
format: int64
maxLeasePeriod:
type: integer
format: int64
allowedAuctionDenoms:
type: array
items:
type: string
maxVerifiedProviders:
type: integer
format: int64
title: >-
Maximum number of verified providers; this is to prevent buffer
overflow
attacks since provider list is not committed to chain state and costs
0 gas
providerMinLockedUClr:
type: integer
format: int64
title: |-
Minimum required staked CLR to be a provider (i.e. to bid)
500 CLR
providerLockedSlashUClr:
type: integer
format: int64
title: |-
Amount slashed when a provider is offline during an audit
100 CLR
providerAuditFrequency:
type: integer
format: int64
title: |-
Blocks between provider audits
400 blocks ~400-1200min
providerAuditLength:
type: integer
format: int64
title: |-
Blocks before an audit ping must be returned
3 blocks ~4-12sec
description: Params defines the parameters for the module. description: Params defines the parameters for the module.
colinear.colinearcore.QueryAllAuctionResponse: colinear.colinearcore.QueryAllAuctionResponse:
type: object type: object
@@ -30889,6 +31123,27 @@ definitions:
format: uint64 format: uint64
remaining: remaining:
type: string type: string
gpus:
type: array
items:
type: string
title: hardware specs
cpuCores:
type: string
format: uint64
cpuArch:
type: string
enum:
- ANY
- INTEL
- AMD
default: ANY
memMb:
type: string
format: uint64
storageGb:
type: string
format: uint64
pagination: pagination:
type: object type: object
properties: properties:
@@ -30926,6 +31181,22 @@ definitions:
type: string type: string
amount: amount:
type: string type: string
colinear.colinearcore.QueryAuctionInfoResponse:
type: object
properties:
bids:
type: array
items:
type: object
properties:
owner:
type: string
amount:
type: string
verifiedProviders:
type: array
items:
type: string
colinear.colinearcore.QueryGetAuctionResponse: colinear.colinearcore.QueryGetAuctionResponse:
type: object type: object
properties: properties:
@@ -30962,6 +31233,27 @@ definitions:
format: uint64 format: uint64
remaining: remaining:
type: string type: string
gpus:
type: array
items:
type: string
title: hardware specs
cpuCores:
type: string
format: uint64
cpuArch:
type: string
enum:
- ANY
- INTEL
- AMD
default: ANY
memMb:
type: string
format: uint64
storageGb:
type: string
format: uint64
colinear.colinearcore.QueryGetLockedUsersResponse: colinear.colinearcore.QueryGetLockedUsersResponse:
type: object type: object
properties: properties:
@@ -30992,6 +31284,64 @@ definitions:
params: params:
description: params holds all the parameters of this module. description: params holds all the parameters of this module.
type: object type: object
properties:
gpuModels:
type: object
additionalProperties:
type: integer
format: int64
title: hardware options
auctionGas:
type: integer
format: int64
title: gas config
auctionTime:
type: integer
format: int64
title: auction config
minLeasePeriod:
type: integer
format: int64
maxLeasePeriod:
type: integer
format: int64
allowedAuctionDenoms:
type: array
items:
type: string
maxVerifiedProviders:
type: integer
format: int64
title: >-
Maximum number of verified providers; this is to prevent buffer
overflow
attacks since provider list is not committed to chain state and
costs 0 gas
providerMinLockedUClr:
type: integer
format: int64
title: |-
Minimum required staked CLR to be a provider (i.e. to bid)
500 CLR
providerLockedSlashUClr:
type: integer
format: int64
title: |-
Amount slashed when a provider is offline during an audit
100 CLR
providerAuditFrequency:
type: integer
format: int64
title: |-
Blocks between provider audits
400 blocks ~400-1200min
providerAuditLength:
type: integer
format: int64
title: |-
Blocks before an audit ping must be returned
3 blocks ~4-12sec
description: QueryParamsResponse is response type for the Query/Params RPC method. description: QueryParamsResponse is response type for the Query/Params RPC method.
cosmos.base.query.v1beta1.PageRequest: cosmos.base.query.v1beta1.PageRequest:
type: object type: object

View File

@@ -4,6 +4,7 @@ package colinear.colinearcore;
option go_package = "colinear/x/colinearcore/types"; option go_package = "colinear/x/colinearcore/types";
import "colinearcore/bid.proto"; import "colinearcore/bid.proto";
import "colinearcore/hardware.proto";
message Auction { message Auction {
string index = 1; string index = 1;
@@ -17,4 +18,10 @@ message Auction {
uint64 leaseStart = 9; uint64 leaseStart = 9;
uint64 leaseEnd = 10; uint64 leaseEnd = 10;
string remaining = 11; string remaining = 11;
// hardware specs
repeated string gpus = 12;
uint64 cpuCores = 13;
CpuArchitecture cpuArch = 14;
uint64 memMb = 15;
uint64 storageGb = 16;
} }

View File

@@ -0,0 +1,10 @@
syntax = "proto3";
package colinear.colinearcore;
option go_package = "colinear/x/colinearcore/types";
enum CpuArchitecture {
ANY = 0;
INTEL = 1;
AMD = 2;
}

View File

@@ -8,5 +8,35 @@ option go_package = "colinear/x/colinearcore/types";
// Params defines the parameters for the module. // Params defines the parameters for the module.
message Params { message Params {
option (gogoproto.goproto_stringer) = false; option (gogoproto.goproto_stringer) = false;
// hardware options
map<string, uint32> gpuModels = 1; // maps GPU model to puzzle difficulty
// gas config
uint32 auctionGas = 2;
// auction config
uint32 auctionTime = 3;
uint32 minLeasePeriod = 4;
uint32 maxLeasePeriod = 5;
repeated string allowedAuctionDenoms = 6;
// Maximum number of verified providers; this is to prevent buffer overflow
// attacks since provider list is not committed to chain state and costs 0 gas
uint32 maxVerifiedProviders = 7;
// Minimum required staked CLR to be a provider (i.e. to bid)
// 500 CLR
uint32 providerMinLockedUClr = 8;
// Amount slashed when a provider is offline during an audit
// 100 CLR
uint32 providerLockedSlashUClr = 9;
// Blocks between provider audits
// 400 blocks ~400-1200min
uint32 providerAuditFrequency = 10;
// Blocks before an audit ping must be returned
// 3 blocks ~4-12sec
uint32 providerAuditLength = 11;
} }

View File

@@ -47,6 +47,11 @@ service Query {
option (google.api.http).get = "/colinear/colinearcore/locked_funds/{owner}"; option (google.api.http).get = "/colinear/colinearcore/locked_funds/{owner}";
} }
// Queries a list of AuctionInfo items.
rpc AuctionInfo(QueryAuctionInfoRequest) returns (QueryAuctionInfoResponse) {
option (google.api.http).get = "/colinear/colinearcore/auction_info/{auctionId}";
}
// this line is used by starport scaffolding # 2 // this line is used by starport scaffolding # 2
} }
@@ -103,4 +108,13 @@ message QueryLockedFundsResponse {
string amount = 1; string amount = 1;
} }
message QueryAuctionInfoRequest {
string auctionId = 1;
}
message QueryAuctionInfoResponse {
repeated Bid bids = 1;
repeated string verifiedProviders = 2;
}
// this line is used by starport scaffolding # 3 // this line is used by starport scaffolding # 3

View File

@@ -5,9 +5,11 @@ package colinear.colinearcore;
option go_package = "colinear/x/colinearcore/types"; option go_package = "colinear/x/colinearcore/types";
import "colinearcore/hardware.proto";
// Msg defines the Msg service. // Msg defines the Msg service.
service Msg { service Msg {
rpc NewAuction(MsgNewAuction) returns (MsgNewAuctionResponse); rpc NewAuction(MsgNewAuction) returns (MsgNewAuctionResponse);
rpc NewBid(MsgNewBid) returns (MsgNewBidResponse); rpc NewBid(MsgNewBid) returns (MsgNewBidResponse);
rpc LockFunds(MsgLockFunds) returns (MsgLockFundsResponse); rpc LockFunds(MsgLockFunds) returns (MsgLockFundsResponse);
rpc UnlockFunds(MsgUnlockFunds) returns (MsgUnlockFundsResponse); rpc UnlockFunds(MsgUnlockFunds) returns (MsgUnlockFundsResponse);
@@ -26,6 +28,12 @@ message MsgNewAuction {
// verified providers just specifies who's allowed to bid on the lease auction. // verified providers just specifies who's allowed to bid on the lease auction.
// STORED IN MEMORY. DOES NOT GET WRITTEN TO CHAIN STATE. // STORED IN MEMORY. DOES NOT GET WRITTEN TO CHAIN STATE.
repeated string verifiedProviders = 7; repeated string verifiedProviders = 7;
// hardware specs (mandatory)
repeated string gpus = 8;
uint64 cpuCores = 9;
CpuArchitecture cpuArch = 10;
uint64 memMb = 11;
uint64 storageGb = 12;
} }
message MsgNewAuctionResponse { message MsgNewAuctionResponse {

View File

@@ -10,16 +10,34 @@ colineard tx colinearcore unlock-all-funds -y --from alice \
| swallow "Unlock all funds before proceeding" | swallow "Unlock all funds before proceeding"
colineard tx colinearcore new-auction asdf asdf 2000 uusdc $(now + 3500) \ colineard tx colinearcore new-auction asdf asdf 2000 uusdc $(now + 3500) \
'[]' '["gtx-1050-ti"]' 4 0 1000 50 \
-y --from bob \ -y --from bob \
| expect_fail "Can't create auction below min lease period" | expect_fail "Can't create auction below min lease period"
colineard tx colinearcore new-auction asdf asdf 2000 uusdc $(now + 8200000) \ colineard tx colinearcore new-auction asdf asdf 2000 uusdc $(now + 8200000) \
'[]' '["gtx-1050-ti"]' 4 0 1000 50 \
-y --from bob \ -y --from bob \
| expect_fail "Can't create auction above max lease period" | expect_fail "Can't create auction above max lease period"
colineard tx colinearcore new-auction asdf asdf 2000 uusdc $(now + 3700) \
'[]' '[]' 4 0 1000 50 \
-y --from bob \
| expect_fail "Can't create an auction with 0 GPUs"
colineard tx colinearcore new-auction asdf asdf 2000 uusdc $(now + 3700) \
'[]' '["gtx-1050-ti"]' 0 0 1000 50 \
-y --from bob \
| expect_fail "Can't create an auction with 0 cores"
colineard tx colinearcore new-auction asdf asdf 2000 uusdc $(now + 3700) \
'[]' '["gtx-1050-ti"]' 0 0 1000 50 \
-y --from bob \
| expect_fail "Can't create an auction with sub-25GB storage"
before=$(get_balance $BOB uusdc) before=$(get_balance $BOB uusdc)
colineard tx colinearcore new-auction asdf asdf 2000 uusdc $(now + 3700) \ colineard tx colinearcore new-auction asdf asdf 2000 uusdc $(now + 3700) \
'[]' '["gtx-1050-ti"]' 4 0 1000 50 \
-y --from bob \ -y --from bob \
| expect_success "New auction is created" | expect_success "New auction is created"
@@ -61,7 +79,15 @@ colineard tx colinearcore new-bid $(get_last_auction_index) 0 \
colineard q colinearcore auction-bids $(get_last_auction_index) \ colineard q colinearcore auction-bids $(get_last_auction_index) \
| jq -M ".bids | length" \ | jq -M ".bids | length" \
| assert_eq 2 "Number of auction bids" | assert_eq 2 "Number of auction bids in auctionBids query"
colineard q colinearcore auction-info $(get_last_auction_index) \
| jq -rM ".bids | length" \
| assert_eq 2 "Number of auction bids in auctionInfo query"
colineard q colinearcore auction-info $(get_last_auction_index) \
| jq -rM ".verifiedProviders" \
| assert_eq "[]" "Verified Provider list in auctionInfo query"
before=$(get_balance $BOB uusdc) before=$(get_balance $BOB uusdc)

View File

@@ -17,7 +17,7 @@ colineard tx colinearcore lock-funds 550000000 -y --from bob \
| expect_success "Re-lock funds (Bob)" | expect_success "Re-lock funds (Bob)"
colineard tx colinearcore new-auction asdf asdf 200 uusdc $(now + 3700) \ colineard tx colinearcore new-auction asdf asdf 200 uusdc $(now + 3700) \
$ALICE \ '["'$ALICE'"]' '["gtx-1050-ti"]' 4 0 1000 50 \
-y --from bob \ -y --from bob \
| expect_success "New auction is created" | expect_success "New auction is created"

View File

@@ -1,35 +0,0 @@
package auctionconfig
// Allowed Denoms
// note: as a slice, values can't be immutable, but length can be
var AllowedAuctionDenoms = [...]string{"uusdc", "uclr"}
const (
// Times
AuctionTime = 10 // 10 blocks = ~10-30 seconds
// Lease Period Requirements (seconds)
MinLeasePeriod = 3_600 // 1 hour
MaxLeasePeriod = 8_035_200 // 3 months
// Maximum number of verified providers; this is to prevent buffer overflow
// attacks since provider list is not committed to chain state and costs 0 gas
MaxVerifiedProviders = 1000
// Minimum required staked CLR to be a provider (i.e. to bid)
// 500 CLR
ProviderMinLockedUClr = 500_000_000
// Amount slashed when a provider is offline during an audit
// 100 CLR
ProviderLockedSlashUClr = 100_000_000
// Blocks between provider audits
// 400 blocks ~400-1200min
ProviderAuditFrequency = 400
// Blocks before an audit ping must be returned
// 3 blocks ~4-12sec
ProviderAuditLength = 4
// Gas Fees
AuctionGas = 10
)

View File

@@ -33,6 +33,8 @@ func GetQueryCmd(queryRoute string) *cobra.Command {
cmd.AddCommand(CmdShowLockedUsers()) cmd.AddCommand(CmdShowLockedUsers())
cmd.AddCommand(CmdLockedFunds()) cmd.AddCommand(CmdLockedFunds())
cmd.AddCommand(CmdAuctionInfo())
// this line is used by starport scaffolding # 1 // this line is used by starport scaffolding # 1
return cmd return cmd

View File

@@ -0,0 +1,47 @@
package cli
import (
"strconv"
"colinear/x/colinearcore/types"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/spf13/cobra"
)
var _ = strconv.Itoa(0)
func CmdAuctionInfo() *cobra.Command {
cmd := &cobra.Command{
Use: "auction-info [auction-id]",
Short: "Query auctionInfo",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
reqAuctionId := args[0]
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)
params := &types.QueryAuctionInfoRequest{
AuctionId: reqAuctionId,
}
res, err := queryClient.AuctionInfo(cmd.Context(), params)
if err != nil {
return err
}
return clientCtx.PrintProto(res)
},
}
flags.AddQueryFlagsToCmd(cmd)
return cmd
}

View File

@@ -1,9 +1,9 @@
package cli package cli
import ( import (
"encoding/json"
"strconv" "strconv"
"colinear/x/colinearcore/auctionconfig"
"colinear/x/colinearcore/types" "colinear/x/colinearcore/types"
"github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client"
@@ -16,10 +16,12 @@ var _ = strconv.Itoa(0)
func CmdNewAuction() *cobra.Command { func CmdNewAuction() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "new-auction [name] [description] [ceiling] [denom] [end date] [verified providers (separated by spaces)...]", Use: "new-auction [name] [description] [ceiling] [denom] [end date] [verified providers (json string)] [gpus (json string)] [cpu cores] [cpu arch] [memory (MB)] [storage (GB)]",
Short: "Broadcast message newAuction", Short: "Broadcast message newAuction",
// Args: cobra.ExactArgs(5), Args: cobra.ExactArgs(11),
Args: cobra.RangeArgs(5, auctionconfig.MaxVerifiedProviders+5), // below: we're hardcoding the max providers param since we
// can't check chain params locally
// Args: cobra.RangeArgs(10, 1010),
RunE: func(cmd *cobra.Command, args []string) (err error) { RunE: func(cmd *cobra.Command, args []string) (err error) {
argName := args[0] argName := args[0]
argDescription := args[1] argDescription := args[1]
@@ -27,23 +29,56 @@ func CmdNewAuction() *cobra.Command {
argDenom := args[3] argDenom := args[3]
argLeaseEnd := args[4] argLeaseEnd := args[4]
vProvString := args[5]
gpusString := args[6]
cpuCores := args[7]
cpuArch := args[8]
memMb := args[9]
storageGb := args[10]
verifiedProviders := []string{} verifiedProviders := []string{}
if len(args) >= 6 { gpuModels := []string{}
// set to remaining arguments
verifiedProviders = args[5:]
}
clientCtx, err := client.GetClientTxContext(cmd) clientCtx, err := client.GetClientTxContext(cmd)
if err != nil { if err != nil {
return err return err
} }
// try to marshal JSON lists
if err := json.Unmarshal([]byte(vProvString), &verifiedProviders); err != nil {
return err
}
if err := json.Unmarshal([]byte(gpusString), &gpuModels); err != nil {
return err
}
// try to parse int strings
var le int var le int
le, err = strconv.Atoi(argLeaseEnd) le, err = strconv.Atoi(argLeaseEnd)
if err != nil { if err != nil {
return err return err
} }
nCpuCores, err := strconv.Atoi(cpuCores)
if err != nil {
return err
}
nCpuArch, err := strconv.Atoi(cpuArch)
if err != nil {
return err
}
nMemMb, err := strconv.Atoi(memMb)
if err != nil {
return err
}
nStorageGb, err := strconv.Atoi(storageGb)
if err != nil {
return err
}
msg := types.NewMsgNewAuction( msg := types.NewMsgNewAuction(
clientCtx.GetFromAddress().String(), clientCtx.GetFromAddress().String(),
argName, argName,
@@ -52,6 +87,11 @@ func CmdNewAuction() *cobra.Command {
argDenom, argDenom,
uint64(le), uint64(le),
verifiedProviders, verifiedProviders,
gpuModels,
uint64(nCpuCores),
types.CpuArchitecture(nCpuArch),
uint64(nMemMb),
uint64(nStorageGb),
) )
if err := msg.ValidateBasic(); err != nil { if err := msg.ValidateBasic(); err != nil {
return err return err

View File

@@ -81,6 +81,14 @@ func (k Keeper) FinalizeExpiredAuctions(ctx sdk.Context) {
// end auction // end auction
k.SetAuction(ctx, auction) k.SetAuction(ctx, auction)
// emit finalization event
ctx.EventManager().EmitEvent(
sdk.NewEvent(types.AuctionFinalizedEventType,
sdk.NewAttribute(types.AuctionFinalizedIndex, auction.Index),
),
)
} }
return nil return nil

View File

@@ -0,0 +1,44 @@
package keeper
import (
"context"
"fmt"
"colinear/x/colinearcore/memdb"
"colinear/x/colinearcore/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
func (k Keeper) AuctionInfo(goCtx context.Context, req *types.QueryAuctionInfoRequest) (*types.QueryAuctionInfoResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "invalid request")
}
ctx := sdk.UnwrapSDKContext(goCtx)
if exp, err := k.AuctionIsExpired(ctx, req.AuctionId); err != nil {
return nil, fmt.Errorf("unable to check auction expiry status: %s", err)
} else {
if exp {
return nil, fmt.Errorf("auction %s is finalized", req.AuctionId)
}
}
bids, err := memdb.AuctionDB.GetBids(req.AuctionId)
if err != nil {
return nil, fmt.Errorf("unable to get bids for auction %s: %s", req.AuctionId, err)
}
vProviders, err := memdb.AuctionDB.GetVerifiedProviders(req.AuctionId)
if err != nil {
return nil, fmt.Errorf("unable to get verified providers for auction %s: %s", req.AuctionId, err)
}
return &types.QueryAuctionInfoResponse{
Bids: bids,
VerifiedProviders: vProviders,
}, nil
}

View File

@@ -70,5 +70,13 @@ func (k msgServer) ClaimFunds(goCtx context.Context, msg *types.MsgClaimFunds) (
auction.Remaining = newRemaining.String() auction.Remaining = newRemaining.String()
k.Keeper.SetAuction(ctx, auction) k.Keeper.SetAuction(ctx, auction)
ctx.EventManager().EmitEvent(
sdk.NewEvent(types.LeaseFundsClaimedEventType,
sdk.NewAttribute(types.LeaseFundsClaimedEventCreator, msg.Creator),
sdk.NewAttribute(types.LeaseFundsClaimedAmountClaimed, subAmt.String()),
sdk.NewAttribute(types.LeaseFundsClaimedAmountRemaining, auction.Remaining),
),
)
return &types.MsgClaimFundsResponse{}, nil return &types.MsgClaimFundsResponse{}, nil
} }

View File

@@ -5,7 +5,6 @@ import (
"fmt" "fmt"
"math/big" "math/big"
"colinear/x/colinearcore/auctionconfig"
"colinear/x/colinearcore/types" "colinear/x/colinearcore/types"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
@@ -28,7 +27,7 @@ func (k msgServer) LockFunds(goCtx context.Context, msg *types.MsgLockFunds) (*t
// return nil, errors.New("unable to get locked users") // return nil, errors.New("unable to get locked users")
} }
required := big.NewInt(auctionconfig.ProviderMinLockedUClr) required := big.NewInt(int64(k.GetParams(ctx).ProviderMinLockedUClr))
paying := new(big.Int) paying := new(big.Int)
paying.SetString(msg.Amount, 10) paying.SetString(msg.Amount, 10)

View File

@@ -2,12 +2,12 @@ package keeper
import ( import (
"context" "context"
"encoding/json"
"errors" "errors"
"fmt" "fmt"
"math/big" "math/big"
"strconv" "strconv"
"colinear/x/colinearcore/auctionconfig"
"colinear/x/colinearcore/memdb" "colinear/x/colinearcore/memdb"
"colinear/x/colinearcore/types" "colinear/x/colinearcore/types"
@@ -26,27 +26,27 @@ func (k msgServer) NewAuction(goCtx context.Context, msg *types.MsgNewAuction) (
auctionLen := msg.LeaseEnd - uint64(ctx.BlockTime().Unix()) auctionLen := msg.LeaseEnd - uint64(ctx.BlockTime().Unix())
// check that submitted denom is allowed // check that submitted denom is allowed
for _, denom := range auctionconfig.AllowedAuctionDenoms { for _, denom := range k.GetParams(ctx).AllowedAuctionDenoms {
if msg.Denom == denom { if msg.Denom == denom {
goto found goto found
} }
} }
return nil, fmt.Errorf("denom %s is not allowed; must be in %v", msg.Denom, auctionconfig.AllowedAuctionDenoms) return nil, fmt.Errorf("denom %s is not allowed; must be in %v", msg.Denom, k.GetParams(ctx).AllowedAuctionDenoms)
found: found:
if auctionLen < auctionconfig.MinLeasePeriod { if uint32(auctionLen) < k.GetParams(ctx).MinLeasePeriod {
return nil, fmt.Errorf( return nil, fmt.Errorf(
"Auction length %d is below min lease period of %d", "Auction length %d is below min lease period of %d",
auctionLen, auctionLen,
auctionconfig.MinLeasePeriod, k.GetParams(ctx).MinLeasePeriod,
) )
} }
if auctionLen > auctionconfig.MaxLeasePeriod { if uint32(auctionLen) > k.GetParams(ctx).MaxLeasePeriod {
return nil, fmt.Errorf( return nil, fmt.Errorf(
"Auction length %d is above max lease period of %d", "Auction length %d is above max lease period of %d",
auctionLen, auctionLen,
auctionconfig.MaxLeasePeriod, k.GetParams(ctx).MaxLeasePeriod,
) )
} }
@@ -55,8 +55,8 @@ found:
return nil, fmt.Errorf("sender address `%s` format invalid (bech32 required)", msg.Creator) return nil, fmt.Errorf("sender address `%s` format invalid (bech32 required)", msg.Creator)
} }
if len(msg.VerifiedProviders) > auctionconfig.MaxVerifiedProviders { if uint32(len(msg.VerifiedProviders)) > k.GetParams(ctx).MaxVerifiedProviders {
return nil, fmt.Errorf("must submit no more than %d verified providers (got %d)", auctionconfig.MaxVerifiedProviders, len(msg.VerifiedProviders)) return nil, fmt.Errorf("must submit no more than %d verified providers (got %d)", k.GetParams(ctx).MaxVerifiedProviders, len(msg.VerifiedProviders))
} }
bech32Len := len("colinear") + 39 bech32Len := len("colinear") + 39
@@ -78,7 +78,7 @@ found:
Description: msg.Description, Description: msg.Description,
// best bid -> null // best bid -> null
// Best: new(types.Bid), // Best: new(types.Bid),
Deadline: uint64(ctx.BlockHeight()) + auctionconfig.AuctionTime, Deadline: uint64(ctx.BlockHeight()) + uint64(k.GetParams(ctx).AuctionTime),
Denom: msg.Denom, Denom: msg.Denom,
Owner: msg.Creator, Owner: msg.Creator,
Ceiling: msg.Ceiling, Ceiling: msg.Ceiling,
@@ -88,6 +88,16 @@ found:
LeaseEnd: msg.LeaseEnd, LeaseEnd: msg.LeaseEnd,
// remaining payout -> null // remaining payout -> null
// Remaining: "0", // Remaining: "0",
Gpus: msg.Gpus,
CpuArch: msg.CpuArch,
CpuCores: msg.CpuCores,
MemMb: msg.MemMb,
StorageGb: msg.StorageGb,
}
// validate hardware
if err := k.ValidateAuctionHardware(ctx, auction); err != nil {
return nil, err
} }
spendable := k.bank.SpendableCoins(ctx, senderAddr) spendable := k.bank.SpendableCoins(ctx, senderAddr)
@@ -112,7 +122,56 @@ found:
k.Keeper.SetNextAuction(ctx, types.NextAuction{AuctionId: next.AuctionId}) k.Keeper.SetNextAuction(ctx, types.NextAuction{AuctionId: next.AuctionId})
gpuList, err := json.Marshal(msg.Gpus)
if err != nil {
return nil, fmt.Errorf("failed to marshal gpu list %v", msg.Gpus)
}
ctx.EventManager().EmitEvent(
sdk.NewEvent(
types.AuctionCreatedEventType,
sdk.NewAttribute(types.AuctionCreatedIndex, auction.Index),
sdk.NewAttribute(types.AuctionCreatedEventCreator, msg.Creator),
sdk.NewAttribute(types.AuctionCreatedCeiling, msg.Ceiling),
sdk.NewAttribute(types.AuctionCreatedCpuCores, msg.CpuArch.String()),
sdk.NewAttribute(types.AuctionCreatedCpuArch, msg.CpuArch.String()),
sdk.NewAttribute(types.AuctionCreatedGpus, string(gpuList)),
sdk.NewAttribute(types.AuctionCreatedMemMb, fmt.Sprint(msg.MemMb)),
sdk.NewAttribute(types.AuctionCreatedStorage, fmt.Sprint(msg.StorageGb)),
),
)
return &types.MsgNewAuctionResponse{ return &types.MsgNewAuctionResponse{
AuctionId: strconv.FormatUint(next.AuctionId, 10), AuctionId: strconv.FormatUint(next.AuctionId, 10),
}, nil }, nil
} }
func (k *Keeper) ValidateAuctionHardware(ctx sdk.Context, a types.Auction) error {
if a.Gpus == nil {
return errors.New("GPU list not found")
}
// move these to module params later
if len(a.Gpus) == 0 || len(a.Gpus) > 20 {
return fmt.Errorf("must order between 1 and 20 GPUs (got %d)", len(a.Gpus))
}
for _, gpu := range a.Gpus {
if _, ok := k.GetParams(ctx).GpuModels[gpu]; !ok {
return fmt.Errorf("GPU model %s invalid", gpu)
}
}
// move these to module params later
if a.CpuCores < 1 || a.CpuCores > 12 {
return fmt.Errorf("CPU Cores must be between 1 and 12 (got %d)", a.CpuCores)
}
// move these to module params later
if a.StorageGb < 25 || a.StorageGb > 2000 {
return fmt.Errorf("storage must be between 25GB and 2TB (got %dGB)", a.StorageGb)
}
return nil
}

View File

@@ -7,7 +7,6 @@ import (
"math/big" "math/big"
"reflect" "reflect"
"colinear/x/colinearcore/auctionconfig"
"colinear/x/colinearcore/memdb" "colinear/x/colinearcore/memdb"
"colinear/x/colinearcore/types" "colinear/x/colinearcore/types"
@@ -22,13 +21,13 @@ func (k msgServer) NewBid(goCtx context.Context, msg *types.MsgNewBid) (*types.M
return nil, errors.New("unable to read locked providers (uninitialized)") return nil, errors.New("unable to read locked providers (uninitialized)")
} }
if lockedAmtStr, ok := lockedUsers.Users[msg.Creator]; !ok { if lockedAmtStr, ok := lockedUsers.Users[msg.Creator]; !ok {
return nil, fmt.Errorf("provider has not locked CLR tokens (min: %d uCLR)", auctionconfig.ProviderMinLockedUClr) return nil, fmt.Errorf("provider has not locked CLR tokens (min: %d uCLR)", k.GetParams(ctx).ProviderMinLockedUClr)
} else { } else {
lockedAmt := new(big.Int) lockedAmt := new(big.Int)
lockedAmt.SetString(lockedAmtStr, 10) lockedAmt.SetString(lockedAmtStr, 10)
required := big.NewInt(auctionconfig.ProviderMinLockedUClr) required := big.NewInt(int64(k.GetParams(ctx).ProviderMinLockedUClr))
if lockedAmt.Cmp(required) == -1 { if lockedAmt.Cmp(required) == -1 {
return nil, fmt.Errorf("provider has not locked enough CLR tokens (min: %d uCLR, locked: %s)", auctionconfig.ProviderMinLockedUClr, lockedAmt.String()) return nil, fmt.Errorf("provider has not locked enough CLR tokens (min: %d uCLR, locked: %s)", k.GetParams(ctx).ProviderMinLockedUClr, lockedAmt.String())
} }
} }
@@ -104,5 +103,15 @@ bidderVerified:
return nil, fmt.Errorf("failed to add bid: %s", err) return nil, fmt.Errorf("failed to add bid: %s", err)
} }
// emit bid event
ctx.EventManager().EmitEvent(
sdk.NewEvent(types.BidCreatedEventType,
sdk.NewAttribute(types.BidCreatedEventCreator, msg.Creator),
sdk.NewAttribute(types.BidCreatedAuctionIndex, msg.AuctionIndex),
sdk.NewAttribute(types.BidCreatedAmount, msg.Amount),
),
)
return &types.MsgNewBidResponse{}, nil return &types.MsgNewBidResponse{}, nil
} }

View File

@@ -226,6 +226,9 @@ func (b *auctionDB) GetVerifiedProviders(auctionId string) ([]string, error) {
return err return err
}) })
if err != nil { if err != nil {
if errors.Is(err, badger.ErrKeyNotFound) {
return []string{}, nil
}
return nil, err return nil, err
} }
if providers == nil { if providers == nil {

View File

@@ -34,6 +34,12 @@ type Auction struct {
LeaseStart uint64 `protobuf:"varint,9,opt,name=leaseStart,proto3" json:"leaseStart,omitempty"` LeaseStart uint64 `protobuf:"varint,9,opt,name=leaseStart,proto3" json:"leaseStart,omitempty"`
LeaseEnd uint64 `protobuf:"varint,10,opt,name=leaseEnd,proto3" json:"leaseEnd,omitempty"` LeaseEnd uint64 `protobuf:"varint,10,opt,name=leaseEnd,proto3" json:"leaseEnd,omitempty"`
Remaining string `protobuf:"bytes,11,opt,name=remaining,proto3" json:"remaining,omitempty"` Remaining string `protobuf:"bytes,11,opt,name=remaining,proto3" json:"remaining,omitempty"`
// hardware specs
Gpus []string `protobuf:"bytes,12,rep,name=gpus,proto3" json:"gpus,omitempty"`
CpuCores uint64 `protobuf:"varint,13,opt,name=cpuCores,proto3" json:"cpuCores,omitempty"`
CpuArch CpuArchitecture `protobuf:"varint,14,opt,name=cpuArch,proto3,enum=colinear.colinearcore.CpuArchitecture" json:"cpuArch,omitempty"`
MemMb uint64 `protobuf:"varint,15,opt,name=memMb,proto3" json:"memMb,omitempty"`
StorageGb uint64 `protobuf:"varint,16,opt,name=storageGb,proto3" json:"storageGb,omitempty"`
} }
func (m *Auction) Reset() { *m = Auction{} } func (m *Auction) Reset() { *m = Auction{} }
@@ -146,6 +152,41 @@ func (m *Auction) GetRemaining() string {
return "" return ""
} }
func (m *Auction) GetGpus() []string {
if m != nil {
return m.Gpus
}
return nil
}
func (m *Auction) GetCpuCores() uint64 {
if m != nil {
return m.CpuCores
}
return 0
}
func (m *Auction) GetCpuArch() CpuArchitecture {
if m != nil {
return m.CpuArch
}
return CpuArchitecture_ANY
}
func (m *Auction) GetMemMb() uint64 {
if m != nil {
return m.MemMb
}
return 0
}
func (m *Auction) GetStorageGb() uint64 {
if m != nil {
return m.StorageGb
}
return 0
}
func init() { func init() {
proto.RegisterType((*Auction)(nil), "colinear.colinearcore.Auction") proto.RegisterType((*Auction)(nil), "colinear.colinearcore.Auction")
} }
@@ -153,26 +194,32 @@ func init() {
func init() { proto.RegisterFile("colinearcore/auction.proto", fileDescriptor_c2581508d43e9c55) } func init() { proto.RegisterFile("colinearcore/auction.proto", fileDescriptor_c2581508d43e9c55) }
var fileDescriptor_c2581508d43e9c55 = []byte{ var fileDescriptor_c2581508d43e9c55 = []byte{
// 298 bytes of a gzipped FileDescriptorProto // 392 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0x3f, 0x4f, 0xf3, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x52, 0xc1, 0x8e, 0xd3, 0x30,
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0x54, 0x74, 0xc3, 0xad, 0x15, 0x2b, 0xb8, 0x2e, 0x48, 0x79, 0x7d, 0xf3, 0xee, 0x81, 0xf5,
0xdc, 0xc7, 0x2a, 0xe5, 0x50, 0xb8, 0xc1, 0x62, 0x3d, 0xb6, 0xf9, 0x1f, 0xb6, 0xd8, 0x7e, 0x69,
0xe0, 0x69, 0xb0, 0x8e, 0xc0, 0xa7, 0xec, 0x9d, 0xb1, 0x7c, 0x89, 0x9f, 0x1b, 0x78, 0x16, 0x94,
0x23, 0x71, 0xf7, 0xe1, 0xe7, 0x3e, 0x27, 0xbb, 0x7d, 0x4e, 0x7e, 0xef, 0x73, 0xf2, 0xe3, 0x90,
0x4f, 0x76, 0x87, 0x7c, 0xf2, 0xeb, 0x90, 0x4f, 0xbe, 0xbd, 0x19, 0x87, 0x2e, 0xb6, 0x8b, 0xb3,
0x5b, 0x71, 0xdf, 0x3b, 0xec, 0x9b, 0xcb, 0x70, 0x29, 0xef, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff,
0x68, 0xb2, 0x60, 0x4d, 0x93, 0x02, 0x00, 0x00,
} }
func (m *Auction) Marshal() (dAtA []byte, err error) { func (m *Auction) Marshal() (dAtA []byte, err error) {
@@ -195,6 +242,37 @@ func (m *Auction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if m.StorageGb != 0 {
i = encodeVarintAuction(dAtA, i, uint64(m.StorageGb))
i--
dAtA[i] = 0x1
i--
dAtA[i] = 0x80
}
if m.MemMb != 0 {
i = encodeVarintAuction(dAtA, i, uint64(m.MemMb))
i--
dAtA[i] = 0x78
}
if m.CpuArch != 0 {
i = encodeVarintAuction(dAtA, i, uint64(m.CpuArch))
i--
dAtA[i] = 0x70
}
if m.CpuCores != 0 {
i = encodeVarintAuction(dAtA, i, uint64(m.CpuCores))
i--
dAtA[i] = 0x68
}
if len(m.Gpus) > 0 {
for iNdEx := len(m.Gpus) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Gpus[iNdEx])
copy(dAtA[i:], m.Gpus[iNdEx])
i = encodeVarintAuction(dAtA, i, uint64(len(m.Gpus[iNdEx])))
i--
dAtA[i] = 0x62
}
}
if len(m.Remaining) > 0 { if len(m.Remaining) > 0 {
i -= len(m.Remaining) i -= len(m.Remaining)
copy(dAtA[i:], m.Remaining) copy(dAtA[i:], m.Remaining)
@@ -332,6 +410,24 @@ func (m *Auction) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovAuction(uint64(l)) n += 1 + l + sovAuction(uint64(l))
} }
if len(m.Gpus) > 0 {
for _, s := range m.Gpus {
l = len(s)
n += 1 + l + sovAuction(uint64(l))
}
}
if m.CpuCores != 0 {
n += 1 + sovAuction(uint64(m.CpuCores))
}
if m.CpuArch != 0 {
n += 1 + sovAuction(uint64(m.CpuArch))
}
if m.MemMb != 0 {
n += 1 + sovAuction(uint64(m.MemMb))
}
if m.StorageGb != 0 {
n += 2 + sovAuction(uint64(m.StorageGb))
}
return n return n
} }
@@ -687,6 +783,114 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
} }
m.Remaining = string(dAtA[iNdEx:postIndex]) m.Remaining = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 12:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Gpus", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAuction
}
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 ErrInvalidLengthAuction
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthAuction
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Gpus = append(m.Gpus, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 13:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field CpuCores", wireType)
}
m.CpuCores = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAuction
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.CpuCores |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 14:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field CpuArch", wireType)
}
m.CpuArch = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAuction
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.CpuArch |= CpuArchitecture(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 15:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MemMb", wireType)
}
m.MemMb = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAuction
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MemMb |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 16:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field StorageGb", wireType)
}
m.StorageGb = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowAuction
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.StorageGb |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipAuction(dAtA[iNdEx:]) skippy, err := skipAuction(dAtA[iNdEx:])

View File

@@ -0,0 +1,69 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: colinearcore/hardware.proto
package types
import (
fmt "fmt"
proto "github.com/gogo/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type CpuArchitecture int32
const (
CpuArchitecture_ANY CpuArchitecture = 0
CpuArchitecture_INTEL CpuArchitecture = 1
CpuArchitecture_AMD CpuArchitecture = 2
)
var CpuArchitecture_name = map[int32]string{
0: "ANY",
1: "INTEL",
2: "AMD",
}
var CpuArchitecture_value = map[string]int32{
"ANY": 0,
"INTEL": 1,
"AMD": 2,
}
func (x CpuArchitecture) String() string {
return proto.EnumName(CpuArchitecture_name, int32(x))
}
func (CpuArchitecture) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_b5d8e515bcf89b12, []int{0}
}
func init() {
proto.RegisterEnum("colinear.colinearcore.CpuArchitecture", CpuArchitecture_name, CpuArchitecture_value)
}
func init() { proto.RegisterFile("colinearcore/hardware.proto", fileDescriptor_b5d8e515bcf89b12) }
var fileDescriptor_b5d8e515bcf89b12 = []byte{
// 152 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xce, 0xcf, 0xc9,
0xcc, 0x4b, 0x4d, 0x2c, 0x4a, 0xce, 0x2f, 0x4a, 0xd5, 0xcf, 0x48, 0x2c, 0x4a, 0x29, 0x4f, 0x2c,
0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x85, 0x49, 0xea, 0x21, 0xab, 0xd2, 0xd2,
0xe3, 0xe2, 0x77, 0x2e, 0x28, 0x75, 0x2c, 0x4a, 0xce, 0xc8, 0x2c, 0x49, 0x4d, 0x2e, 0x29, 0x2d,
0x4a, 0x15, 0x62, 0xe7, 0x62, 0x76, 0xf4, 0x8b, 0x14, 0x60, 0x10, 0xe2, 0xe4, 0x62, 0xf5, 0xf4,
0x0b, 0x71, 0xf5, 0x11, 0x60, 0x04, 0x8b, 0xf9, 0xba, 0x08, 0x30, 0x39, 0x99, 0x9f, 0x78, 0x24,
0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78,
0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x2c, 0xcc, 0x5c, 0xfd, 0x0a, 0x7d, 0x14, 0x87,
0x94, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x9d, 0x61, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff,
0x17, 0xf0, 0x7c, 0xa7, 0xa5, 0x00, 0x00, 0x00,
}

View File

@@ -28,3 +28,37 @@ const (
const ( const (
LockedUsersKey = "LockedUsers-value-" LockedUsersKey = "LockedUsers-value-"
) )
// Module Events
const (
AuctionCreatedEventType = "auction-created"
AuctionCreatedEventCreator = "creator"
AuctionCreatedIndex = "auction-id"
AuctionCreatedCeiling = "ceiling"
// hardware
AuctionCreatedGpus = "gpus"
AuctionCreatedCpuArch = "cpu-arch"
AuctionCreatedCpuCores = "cpu-cores"
AuctionCreatedMemMb = "mem-mb"
AuctionCreatedStorage = "storage-gb"
)
const (
BidCreatedEventType = "bid-created"
BidCreatedEventCreator = "creator"
BidCreatedAuctionIndex = "auction-id"
BidCreatedAmount = "amount"
)
const (
AuctionFinalizedEventType = "auction-finalized"
AuctionFinalizedIndex = "auction-id"
)
const (
LeaseFundsClaimedEventType = "lease-claimed"
LeaseFundsClaimedEventCreator = "claimer"
LeaseFundsClaimedAmountClaimed = "amount-claimed"
LeaseFundsClaimedAmountRemaining = "amount-remaining"
)

View File

@@ -9,15 +9,29 @@ const TypeMsgNewAuction = "new_auction"
var _ sdk.Msg = &MsgNewAuction{} var _ sdk.Msg = &MsgNewAuction{}
func NewMsgNewAuction(creator string, name string, description string, ceiling string, denom string, leaseEnd uint64, vProviders []string) *MsgNewAuction { func NewMsgNewAuction(
// auction params
creator string, name string, description string, ceiling string, denom string, leaseEnd uint64, vProviders []string,
// hardware specs
gpus []string, cpuCores uint64, cpuArch CpuArchitecture, memMb uint64, storageGb uint64,
) *MsgNewAuction {
return &MsgNewAuction{ return &MsgNewAuction{
Creator: creator, Creator: creator,
// creation params
Name: name, Name: name,
Description: description, Description: description,
Ceiling: ceiling, Ceiling: ceiling,
Denom: denom, Denom: denom,
LeaseEnd: leaseEnd, LeaseEnd: leaseEnd,
VerifiedProviders: vProviders, VerifiedProviders: vProviders,
// hardware
Gpus: gpus,
CpuCores: cpuCores,
CpuArch: cpuArch,
MemMb: memMb,
StorageGb: storageGb,
} }
} }

View File

@@ -14,7 +14,26 @@ func ParamKeyTable() paramtypes.KeyTable {
// NewParams creates a new Params instance // NewParams creates a new Params instance
func NewParams() Params { func NewParams() Params {
return Params{} // return Params{}
// temp fix
return Params{
GpuModels: map[string]uint32{
"gtx-1050-ti": 0,
"gtx-1650-ti": 0,
},
AuctionTime: 10,
ProviderMinLockedUClr: 500_000_000,
ProviderLockedSlashUClr: 100_000_000,
AuctionGas: 10,
MinLeasePeriod: 3_600, // 1 hour
MaxLeasePeriod: 8_035_200, // 3 months
MaxVerifiedProviders: 1000,
ProviderAuditFrequency: 400,
ProviderAuditLength: 4,
AllowedAuctionDenoms: []string{"uclr", "uusdc"},
}
} }
// DefaultParams returns a default set of parameters // DefaultParams returns a default set of parameters

View File

@@ -25,6 +25,30 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// Params defines the parameters for the module. // Params defines the parameters for the module.
type Params struct { type Params struct {
// hardware options
GpuModels map[string]uint32 `protobuf:"bytes,1,rep,name=gpuModels,proto3" json:"gpuModels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
// gas config
AuctionGas uint32 `protobuf:"varint,2,opt,name=auctionGas,proto3" json:"auctionGas,omitempty"`
// auction config
AuctionTime uint32 `protobuf:"varint,3,opt,name=auctionTime,proto3" json:"auctionTime,omitempty"`
MinLeasePeriod uint32 `protobuf:"varint,4,opt,name=minLeasePeriod,proto3" json:"minLeasePeriod,omitempty"`
MaxLeasePeriod uint32 `protobuf:"varint,5,opt,name=maxLeasePeriod,proto3" json:"maxLeasePeriod,omitempty"`
AllowedAuctionDenoms []string `protobuf:"bytes,6,rep,name=allowedAuctionDenoms,proto3" json:"allowedAuctionDenoms,omitempty"`
// Maximum number of verified providers; this is to prevent buffer overflow
// attacks since provider list is not committed to chain state and costs 0 gas
MaxVerifiedProviders uint32 `protobuf:"varint,7,opt,name=maxVerifiedProviders,proto3" json:"maxVerifiedProviders,omitempty"`
// Minimum required staked CLR to be a provider (i.e. to bid)
// 500 CLR
ProviderMinLockedUClr uint32 `protobuf:"varint,8,opt,name=providerMinLockedUClr,proto3" json:"providerMinLockedUClr,omitempty"`
// Amount slashed when a provider is offline during an audit
// 100 CLR
ProviderLockedSlashUClr uint32 `protobuf:"varint,9,opt,name=providerLockedSlashUClr,proto3" json:"providerLockedSlashUClr,omitempty"`
// Blocks between provider audits
// 400 blocks ~400-1200min
ProviderAuditFrequency uint32 `protobuf:"varint,10,opt,name=providerAuditFrequency,proto3" json:"providerAuditFrequency,omitempty"`
// Blocks before an audit ping must be returned
// 3 blocks ~4-12sec
ProviderAuditLength uint32 `protobuf:"varint,11,opt,name=providerAuditLength,proto3" json:"providerAuditLength,omitempty"`
} }
func (m *Params) Reset() { *m = Params{} } func (m *Params) Reset() { *m = Params{} }
@@ -59,23 +83,119 @@ func (m *Params) XXX_DiscardUnknown() {
var xxx_messageInfo_Params proto.InternalMessageInfo var xxx_messageInfo_Params proto.InternalMessageInfo
func (m *Params) GetGpuModels() map[string]uint32 {
if m != nil {
return m.GpuModels
}
return nil
}
func (m *Params) GetAuctionGas() uint32 {
if m != nil {
return m.AuctionGas
}
return 0
}
func (m *Params) GetAuctionTime() uint32 {
if m != nil {
return m.AuctionTime
}
return 0
}
func (m *Params) GetMinLeasePeriod() uint32 {
if m != nil {
return m.MinLeasePeriod
}
return 0
}
func (m *Params) GetMaxLeasePeriod() uint32 {
if m != nil {
return m.MaxLeasePeriod
}
return 0
}
func (m *Params) GetAllowedAuctionDenoms() []string {
if m != nil {
return m.AllowedAuctionDenoms
}
return nil
}
func (m *Params) GetMaxVerifiedProviders() uint32 {
if m != nil {
return m.MaxVerifiedProviders
}
return 0
}
func (m *Params) GetProviderMinLockedUClr() uint32 {
if m != nil {
return m.ProviderMinLockedUClr
}
return 0
}
func (m *Params) GetProviderLockedSlashUClr() uint32 {
if m != nil {
return m.ProviderLockedSlashUClr
}
return 0
}
func (m *Params) GetProviderAuditFrequency() uint32 {
if m != nil {
return m.ProviderAuditFrequency
}
return 0
}
func (m *Params) GetProviderAuditLength() uint32 {
if m != nil {
return m.ProviderAuditLength
}
return 0
}
func init() { func init() {
proto.RegisterType((*Params)(nil), "colinear.colinearcore.Params") proto.RegisterType((*Params)(nil), "colinear.colinearcore.Params")
proto.RegisterMapType((map[string]uint32)(nil), "colinear.colinearcore.Params.GpuModelsEntry")
} }
func init() { proto.RegisterFile("colinearcore/params.proto", fileDescriptor_54a22962c5c35285) } func init() { proto.RegisterFile("colinearcore/params.proto", fileDescriptor_54a22962c5c35285) }
var fileDescriptor_54a22962c5c35285 = []byte{ var fileDescriptor_54a22962c5c35285 = []byte{
// 131 bytes of a gzipped FileDescriptorProto // 419 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xce, 0xcf, 0xc9, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4d, 0x6f, 0xd3, 0x30,
0xcc, 0x4b, 0x4d, 0x2c, 0x4a, 0xce, 0x2f, 0x4a, 0xd5, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x18, 0xc7, 0xeb, 0xb5, 0x2b, 0xf4, 0xa9,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e0, 0x66, 0x8d, 0x8e, 0xf2, 0x50, 0x64, 0xaf, 0x35, 0x7e,
0xc9, 0x51, 0x06, 0x05, 0x03, 0x2b, 0x5e, 0x42, 0xe9, 0x43, 0xb8, 0xd1, 0x22, 0x73, 0x94, 0x51,
0x76, 0xca, 0xc6, 0x56, 0xea, 0x42, 0x7b, 0xcf, 0x60, 0xa7, 0xfd, 0xe1, 0xf4, 0x3a, 0xf4, 0xcf,
0xb0, 0x60, 0xc4, 0x25, 0xd3, 0x91, 0xbf, 0x39, 0xd2, 0x09, 0x6c, 0x9f, 0xf3, 0x38, 0xc7, 0xea,
0xcb, 0xcb, 0xe1, 0x70, 0xeb, 0x80, 0x1c, 0x0e, 0xbe, 0xff, 0xb8, 0xdb, 0x7b, 0xfe, 0xf4, 0xe7,
0xca, 0x21, 0x17, 0x2b, 0x87, 0xfc, 0x5e, 0x39, 0xe4, 0xdb, 0xda, 0xe9, 0x5d, 0xac, 0x9d, 0xde,
0xaf, 0xb5, 0xd3, 0xfb, 0x78, 0xa7, 0x5e, 0xb0, 0xd9, 0x72, 0xd6, 0xda, 0xed, 0xac, 0x48, 0xd1,
0x7c, 0x1a, 0xda, 0x75, 0x7d, 0xf4, 0x37, 0x00, 0x00, 0xff, 0xff, 0x05, 0x9c, 0x24, 0xe5, 0xf8,
0x02, 0x00, 0x00,
} }
func (m *Params) Marshal() (dAtA []byte, err error) { func (m *Params) Marshal() (dAtA []byte, err error) {
@@ -98,6 +218,77 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if m.ProviderAuditLength != 0 {
i = encodeVarintParams(dAtA, i, uint64(m.ProviderAuditLength))
i--
dAtA[i] = 0x58
}
if m.ProviderAuditFrequency != 0 {
i = encodeVarintParams(dAtA, i, uint64(m.ProviderAuditFrequency))
i--
dAtA[i] = 0x50
}
if m.ProviderLockedSlashUClr != 0 {
i = encodeVarintParams(dAtA, i, uint64(m.ProviderLockedSlashUClr))
i--
dAtA[i] = 0x48
}
if m.ProviderMinLockedUClr != 0 {
i = encodeVarintParams(dAtA, i, uint64(m.ProviderMinLockedUClr))
i--
dAtA[i] = 0x40
}
if m.MaxVerifiedProviders != 0 {
i = encodeVarintParams(dAtA, i, uint64(m.MaxVerifiedProviders))
i--
dAtA[i] = 0x38
}
if len(m.AllowedAuctionDenoms) > 0 {
for iNdEx := len(m.AllowedAuctionDenoms) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.AllowedAuctionDenoms[iNdEx])
copy(dAtA[i:], m.AllowedAuctionDenoms[iNdEx])
i = encodeVarintParams(dAtA, i, uint64(len(m.AllowedAuctionDenoms[iNdEx])))
i--
dAtA[i] = 0x32
}
}
if m.MaxLeasePeriod != 0 {
i = encodeVarintParams(dAtA, i, uint64(m.MaxLeasePeriod))
i--
dAtA[i] = 0x28
}
if m.MinLeasePeriod != 0 {
i = encodeVarintParams(dAtA, i, uint64(m.MinLeasePeriod))
i--
dAtA[i] = 0x20
}
if m.AuctionTime != 0 {
i = encodeVarintParams(dAtA, i, uint64(m.AuctionTime))
i--
dAtA[i] = 0x18
}
if m.AuctionGas != 0 {
i = encodeVarintParams(dAtA, i, uint64(m.AuctionGas))
i--
dAtA[i] = 0x10
}
if len(m.GpuModels) > 0 {
for k := range m.GpuModels {
v := m.GpuModels[k]
baseI := i
i = encodeVarintParams(dAtA, i, uint64(v))
i--
dAtA[i] = 0x10
i -= len(k)
copy(dAtA[i:], k)
i = encodeVarintParams(dAtA, i, uint64(len(k)))
i--
dAtA[i] = 0xa
i = encodeVarintParams(dAtA, i, uint64(baseI-i))
i--
dAtA[i] = 0xa
}
}
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
@@ -118,6 +309,47 @@ func (m *Params) Size() (n int) {
} }
var l int var l int
_ = l _ = l
if len(m.GpuModels) > 0 {
for k, v := range m.GpuModels {
_ = k
_ = v
mapEntrySize := 1 + len(k) + sovParams(uint64(len(k))) + 1 + sovParams(uint64(v))
n += mapEntrySize + 1 + sovParams(uint64(mapEntrySize))
}
}
if m.AuctionGas != 0 {
n += 1 + sovParams(uint64(m.AuctionGas))
}
if m.AuctionTime != 0 {
n += 1 + sovParams(uint64(m.AuctionTime))
}
if m.MinLeasePeriod != 0 {
n += 1 + sovParams(uint64(m.MinLeasePeriod))
}
if m.MaxLeasePeriod != 0 {
n += 1 + sovParams(uint64(m.MaxLeasePeriod))
}
if len(m.AllowedAuctionDenoms) > 0 {
for _, s := range m.AllowedAuctionDenoms {
l = len(s)
n += 1 + l + sovParams(uint64(l))
}
}
if m.MaxVerifiedProviders != 0 {
n += 1 + sovParams(uint64(m.MaxVerifiedProviders))
}
if m.ProviderMinLockedUClr != 0 {
n += 1 + sovParams(uint64(m.ProviderMinLockedUClr))
}
if m.ProviderLockedSlashUClr != 0 {
n += 1 + sovParams(uint64(m.ProviderLockedSlashUClr))
}
if m.ProviderAuditFrequency != 0 {
n += 1 + sovParams(uint64(m.ProviderAuditFrequency))
}
if m.ProviderAuditLength != 0 {
n += 1 + sovParams(uint64(m.ProviderAuditLength))
}
return n return n
} }
@@ -156,6 +388,322 @@ func (m *Params) Unmarshal(dAtA []byte) error {
return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field GpuModels", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthParams
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.GpuModels == nil {
m.GpuModels = make(map[string]uint32)
}
var mapkey string
var mapvalue uint32
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
if fieldNum == 1 {
var stringLenmapkey uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLenmapkey := int(stringLenmapkey)
if intStringLenmapkey < 0 {
return ErrInvalidLengthParams
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
if postStringIndexmapkey < 0 {
return ErrInvalidLengthParams
}
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
iNdEx = postStringIndexmapkey
} else if fieldNum == 2 {
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
mapvalue |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
} else {
iNdEx = entryPreIndex
skippy, err := skipParams(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthParams
}
if (iNdEx + skippy) > postIndex {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
m.GpuModels[mapkey] = mapvalue
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field AuctionGas", wireType)
}
m.AuctionGas = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.AuctionGas |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field AuctionTime", wireType)
}
m.AuctionTime = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.AuctionTime |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MinLeasePeriod", wireType)
}
m.MinLeasePeriod = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MinLeasePeriod |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxLeasePeriod", wireType)
}
m.MaxLeasePeriod = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MaxLeasePeriod |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AllowedAuctionDenoms", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
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 ErrInvalidLengthParams
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthParams
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.AllowedAuctionDenoms = append(m.AllowedAuctionDenoms, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxVerifiedProviders", wireType)
}
m.MaxVerifiedProviders = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MaxVerifiedProviders |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 8:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProviderMinLockedUClr", wireType)
}
m.ProviderMinLockedUClr = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ProviderMinLockedUClr |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 9:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProviderLockedSlashUClr", wireType)
}
m.ProviderLockedSlashUClr = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ProviderLockedSlashUClr |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 10:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProviderAuditFrequency", wireType)
}
m.ProviderAuditFrequency = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ProviderAuditFrequency |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 11:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ProviderAuditLength", wireType)
}
m.ProviderAuditLength = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowParams
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ProviderAuditLength |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
}
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipParams(dAtA[iNdEx:]) skippy, err := skipParams(dAtA[iNdEx:])

View File

@@ -633,6 +633,102 @@ func (m *QueryLockedFundsResponse) GetAmount() string {
return "" return ""
} }
type QueryAuctionInfoRequest struct {
AuctionId string `protobuf:"bytes,1,opt,name=auctionId,proto3" json:"auctionId,omitempty"`
}
func (m *QueryAuctionInfoRequest) Reset() { *m = QueryAuctionInfoRequest{} }
func (m *QueryAuctionInfoRequest) String() string { return proto.CompactTextString(m) }
func (*QueryAuctionInfoRequest) ProtoMessage() {}
func (*QueryAuctionInfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_7b40a5389bf6a896, []int{14}
}
func (m *QueryAuctionInfoRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryAuctionInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryAuctionInfoRequest.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 *QueryAuctionInfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryAuctionInfoRequest.Merge(m, src)
}
func (m *QueryAuctionInfoRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryAuctionInfoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryAuctionInfoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryAuctionInfoRequest proto.InternalMessageInfo
func (m *QueryAuctionInfoRequest) GetAuctionId() string {
if m != nil {
return m.AuctionId
}
return ""
}
type QueryAuctionInfoResponse struct {
Bids []*Bid `protobuf:"bytes,1,rep,name=bids,proto3" json:"bids,omitempty"`
VerifiedProviders []string `protobuf:"bytes,2,rep,name=verifiedProviders,proto3" json:"verifiedProviders,omitempty"`
}
func (m *QueryAuctionInfoResponse) Reset() { *m = QueryAuctionInfoResponse{} }
func (m *QueryAuctionInfoResponse) String() string { return proto.CompactTextString(m) }
func (*QueryAuctionInfoResponse) ProtoMessage() {}
func (*QueryAuctionInfoResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_7b40a5389bf6a896, []int{15}
}
func (m *QueryAuctionInfoResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryAuctionInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryAuctionInfoResponse.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 *QueryAuctionInfoResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryAuctionInfoResponse.Merge(m, src)
}
func (m *QueryAuctionInfoResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryAuctionInfoResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryAuctionInfoResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryAuctionInfoResponse proto.InternalMessageInfo
func (m *QueryAuctionInfoResponse) GetBids() []*Bid {
if m != nil {
return m.Bids
}
return nil
}
func (m *QueryAuctionInfoResponse) GetVerifiedProviders() []string {
if m != nil {
return m.VerifiedProviders
}
return nil
}
func init() { func init() {
proto.RegisterType((*QueryParamsRequest)(nil), "colinear.colinearcore.QueryParamsRequest") proto.RegisterType((*QueryParamsRequest)(nil), "colinear.colinearcore.QueryParamsRequest")
proto.RegisterType((*QueryParamsResponse)(nil), "colinear.colinearcore.QueryParamsResponse") proto.RegisterType((*QueryParamsResponse)(nil), "colinear.colinearcore.QueryParamsResponse")
@@ -648,59 +744,66 @@ func init() {
proto.RegisterType((*QueryGetLockedUsersResponse)(nil), "colinear.colinearcore.QueryGetLockedUsersResponse") proto.RegisterType((*QueryGetLockedUsersResponse)(nil), "colinear.colinearcore.QueryGetLockedUsersResponse")
proto.RegisterType((*QueryLockedFundsRequest)(nil), "colinear.colinearcore.QueryLockedFundsRequest") proto.RegisterType((*QueryLockedFundsRequest)(nil), "colinear.colinearcore.QueryLockedFundsRequest")
proto.RegisterType((*QueryLockedFundsResponse)(nil), "colinear.colinearcore.QueryLockedFundsResponse") proto.RegisterType((*QueryLockedFundsResponse)(nil), "colinear.colinearcore.QueryLockedFundsResponse")
proto.RegisterType((*QueryAuctionInfoRequest)(nil), "colinear.colinearcore.QueryAuctionInfoRequest")
proto.RegisterType((*QueryAuctionInfoResponse)(nil), "colinear.colinearcore.QueryAuctionInfoResponse")
} }
func init() { proto.RegisterFile("colinearcore/query.proto", fileDescriptor_7b40a5389bf6a896) } func init() { proto.RegisterFile("colinearcore/query.proto", fileDescriptor_7b40a5389bf6a896) }
var fileDescriptor_7b40a5389bf6a896 = []byte{ var fileDescriptor_7b40a5389bf6a896 = []byte{
// 745 bytes of a gzipped FileDescriptorProto // 824 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x96, 0x41, 0x4f, 0x13, 0x41, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xcf, 0x4f, 0xd4, 0x40,
0x14, 0xc7, 0xbb, 0x08, 0x45, 0x87, 0xdb, 0x88, 0x88, 0x2b, 0x2c, 0x3a, 0xa8, 0x48, 0x91, 0x9d, 0x14, 0xc7, 0xb7, 0xfc, 0x58, 0xc2, 0x70, 0x72, 0x44, 0xc4, 0x0a, 0x0b, 0x0e, 0x2a, 0xb0, 0x40,
0xb4, 0x1c, 0x38, 0x98, 0x98, 0xc0, 0x01, 0x12, 0x62, 0x0c, 0x36, 0xf1, 0xa0, 0x17, 0x9c, 0xb6, 0x27, 0xbb, 0x1c, 0x38, 0x98, 0x98, 0xc0, 0x01, 0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xec, 0x1c, 0x0b, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@@ -729,6 +832,8 @@ type QueryClient interface {
LockedUsers(ctx context.Context, in *QueryGetLockedUsersRequest, opts ...grpc.CallOption) (*QueryGetLockedUsersResponse, error) LockedUsers(ctx context.Context, in *QueryGetLockedUsersRequest, opts ...grpc.CallOption) (*QueryGetLockedUsersResponse, error)
// Queries a list of LockedFunds items. // Queries a list of LockedFunds items.
LockedFunds(ctx context.Context, in *QueryLockedFundsRequest, opts ...grpc.CallOption) (*QueryLockedFundsResponse, error) LockedFunds(ctx context.Context, in *QueryLockedFundsRequest, opts ...grpc.CallOption) (*QueryLockedFundsResponse, error)
// Queries a list of AuctionInfo items.
AuctionInfo(ctx context.Context, in *QueryAuctionInfoRequest, opts ...grpc.CallOption) (*QueryAuctionInfoResponse, error)
} }
type queryClient struct { type queryClient struct {
@@ -802,6 +907,15 @@ func (c *queryClient) LockedFunds(ctx context.Context, in *QueryLockedFundsReque
return out, nil return out, nil
} }
func (c *queryClient) AuctionInfo(ctx context.Context, in *QueryAuctionInfoRequest, opts ...grpc.CallOption) (*QueryAuctionInfoResponse, error) {
out := new(QueryAuctionInfoResponse)
err := c.cc.Invoke(ctx, "/colinear.colinearcore.Query/AuctionInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// QueryServer is the server API for Query service. // QueryServer is the server API for Query service.
type QueryServer interface { type QueryServer interface {
// Parameters queries the parameters of the module. // Parameters queries the parameters of the module.
@@ -818,6 +932,8 @@ type QueryServer interface {
LockedUsers(context.Context, *QueryGetLockedUsersRequest) (*QueryGetLockedUsersResponse, error) LockedUsers(context.Context, *QueryGetLockedUsersRequest) (*QueryGetLockedUsersResponse, error)
// Queries a list of LockedFunds items. // Queries a list of LockedFunds items.
LockedFunds(context.Context, *QueryLockedFundsRequest) (*QueryLockedFundsResponse, error) LockedFunds(context.Context, *QueryLockedFundsRequest) (*QueryLockedFundsResponse, error)
// Queries a list of AuctionInfo items.
AuctionInfo(context.Context, *QueryAuctionInfoRequest) (*QueryAuctionInfoResponse, error)
} }
// UnimplementedQueryServer can be embedded to have forward compatible implementations. // UnimplementedQueryServer can be embedded to have forward compatible implementations.
@@ -845,6 +961,9 @@ func (*UnimplementedQueryServer) LockedUsers(ctx context.Context, req *QueryGetL
func (*UnimplementedQueryServer) LockedFunds(ctx context.Context, req *QueryLockedFundsRequest) (*QueryLockedFundsResponse, error) { func (*UnimplementedQueryServer) LockedFunds(ctx context.Context, req *QueryLockedFundsRequest) (*QueryLockedFundsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LockedFunds not implemented") return nil, status.Errorf(codes.Unimplemented, "method LockedFunds not implemented")
} }
func (*UnimplementedQueryServer) AuctionInfo(ctx context.Context, req *QueryAuctionInfoRequest) (*QueryAuctionInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AuctionInfo not implemented")
}
func RegisterQueryServer(s grpc1.Server, srv QueryServer) { func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv) s.RegisterService(&_Query_serviceDesc, srv)
@@ -976,6 +1095,24 @@ func _Query_LockedFunds_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Query_AuctionInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryAuctionInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).AuctionInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/colinear.colinearcore.Query/AuctionInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).AuctionInfo(ctx, req.(*QueryAuctionInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Query_serviceDesc = grpc.ServiceDesc{ var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "colinear.colinearcore.Query", ServiceName: "colinear.colinearcore.Query",
HandlerType: (*QueryServer)(nil), HandlerType: (*QueryServer)(nil),
@@ -1008,6 +1145,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "LockedFunds", MethodName: "LockedFunds",
Handler: _Query_LockedFunds_Handler, Handler: _Query_LockedFunds_Handler,
}, },
{
MethodName: "AuctionInfo",
Handler: _Query_AuctionInfo_Handler,
},
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "colinearcore/query.proto", Metadata: "colinearcore/query.proto",
@@ -1455,6 +1596,82 @@ func (m *QueryLockedFundsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *QueryAuctionInfoRequest) 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 *QueryAuctionInfoRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryAuctionInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.AuctionId) > 0 {
i -= len(m.AuctionId)
copy(dAtA[i:], m.AuctionId)
i = encodeVarintQuery(dAtA, i, uint64(len(m.AuctionId)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *QueryAuctionInfoResponse) 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 *QueryAuctionInfoResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryAuctionInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.VerifiedProviders) > 0 {
for iNdEx := len(m.VerifiedProviders) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.VerifiedProviders[iNdEx])
copy(dAtA[i:], m.VerifiedProviders[iNdEx])
i = encodeVarintQuery(dAtA, i, uint64(len(m.VerifiedProviders[iNdEx])))
i--
dAtA[i] = 0x12
}
}
if len(m.Bids) > 0 {
for iNdEx := len(m.Bids) - 1; iNdEx >= 0; iNdEx-- {
{
size, err := m.Bids[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 encodeVarintQuery(dAtA []byte, offset int, v uint64) int { func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
offset -= sovQuery(v) offset -= sovQuery(v)
base := offset base := offset
@@ -1636,6 +1853,40 @@ func (m *QueryLockedFundsResponse) Size() (n int) {
return n return n
} }
func (m *QueryAuctionInfoRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.AuctionId)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
return n
}
func (m *QueryAuctionInfoResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if len(m.Bids) > 0 {
for _, e := range m.Bids {
l = e.Size()
n += 1 + l + sovQuery(uint64(l))
}
}
if len(m.VerifiedProviders) > 0 {
for _, s := range m.VerifiedProviders {
l = len(s)
n += 1 + l + sovQuery(uint64(l))
}
}
return n
}
func sovQuery(x uint64) (n int) { func sovQuery(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7 return (math_bits.Len64(x|1) + 6) / 7
} }
@@ -2742,6 +2993,204 @@ func (m *QueryLockedFundsResponse) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *QueryAuctionInfoRequest) 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: QueryAuctionInfoRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryAuctionInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AuctionId", 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.AuctionId = 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 *QueryAuctionInfoResponse) 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: QueryAuctionInfoResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryAuctionInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Bids", 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.Bids = append(m.Bids, &Bid{})
if err := m.Bids[len(m.Bids)-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 VerifiedProviders", 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.VerifiedProviders = append(m.VerifiedProviders, 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 skipQuery(dAtA []byte) (n int, err error) { func skipQuery(dAtA []byte) (n int, err error) {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0

View File

@@ -285,6 +285,60 @@ func local_request_Query_LockedFunds_0(ctx context.Context, marshaler runtime.Ma
} }
func request_Query_AuctionInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryAuctionInfoRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["auctionId"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "auctionId")
}
protoReq.AuctionId, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auctionId", err)
}
msg, err := client.AuctionInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_AuctionInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryAuctionInfoRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["auctionId"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "auctionId")
}
protoReq.AuctionId, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auctionId", err)
}
msg, err := server.AuctionInfo(ctx, &protoReq)
return msg, metadata, err
}
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
// UnaryRPC :call QueryServer directly. // UnaryRPC :call QueryServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -452,6 +506,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
}) })
mux.Handle("GET", pattern_Query_AuctionInfo_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_AuctionInfo_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)
return
}
forward_Query_AuctionInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil return nil
} }
@@ -633,6 +710,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
}) })
mux.Handle("GET", pattern_Query_AuctionInfo_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)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Query_AuctionInfo_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_AuctionInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil return nil
} }
@@ -650,6 +747,8 @@ var (
pattern_Query_LockedUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"colinear", "colinearcore", "locked_users"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_LockedUsers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"colinear", "colinearcore", "locked_users"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_LockedFunds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"colinear", "colinearcore", "locked_funds", "owner"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_LockedFunds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"colinear", "colinearcore", "locked_funds", "owner"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_AuctionInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"colinear", "colinearcore", "auction_info", "auctionId"}, "", runtime.AssumeColonVerbOpt(true)))
) )
var ( var (
@@ -666,4 +765,6 @@ var (
forward_Query_LockedUsers_0 = runtime.ForwardResponseMessage forward_Query_LockedUsers_0 = runtime.ForwardResponseMessage
forward_Query_LockedFunds_0 = runtime.ForwardResponseMessage forward_Query_LockedFunds_0 = runtime.ForwardResponseMessage
forward_Query_AuctionInfo_0 = runtime.ForwardResponseMessage
) )

View File

@@ -37,6 +37,12 @@ type MsgNewAuction struct {
// verified providers just specifies who's allowed to bid on the lease auction. // verified providers just specifies who's allowed to bid on the lease auction.
// STORED IN MEMORY. DOES NOT GET WRITTEN TO CHAIN STATE. // STORED IN MEMORY. DOES NOT GET WRITTEN TO CHAIN STATE.
VerifiedProviders []string `protobuf:"bytes,7,rep,name=verifiedProviders,proto3" json:"verifiedProviders,omitempty"` VerifiedProviders []string `protobuf:"bytes,7,rep,name=verifiedProviders,proto3" json:"verifiedProviders,omitempty"`
// hardware specs (mandatory)
Gpus []string `protobuf:"bytes,8,rep,name=gpus,proto3" json:"gpus,omitempty"`
CpuCores uint64 `protobuf:"varint,9,opt,name=cpuCores,proto3" json:"cpuCores,omitempty"`
CpuArch CpuArchitecture `protobuf:"varint,10,opt,name=cpuArch,proto3,enum=colinear.colinearcore.CpuArchitecture" json:"cpuArch,omitempty"`
MemMb uint64 `protobuf:"varint,11,opt,name=memMb,proto3" json:"memMb,omitempty"`
StorageGb uint64 `protobuf:"varint,12,opt,name=storageGb,proto3" json:"storageGb,omitempty"`
} }
func (m *MsgNewAuction) Reset() { *m = MsgNewAuction{} } func (m *MsgNewAuction) Reset() { *m = MsgNewAuction{} }
@@ -121,6 +127,41 @@ func (m *MsgNewAuction) GetVerifiedProviders() []string {
return nil return nil
} }
func (m *MsgNewAuction) GetGpus() []string {
if m != nil {
return m.Gpus
}
return nil
}
func (m *MsgNewAuction) GetCpuCores() uint64 {
if m != nil {
return m.CpuCores
}
return 0
}
func (m *MsgNewAuction) GetCpuArch() CpuArchitecture {
if m != nil {
return m.CpuArch
}
return CpuArchitecture_ANY
}
func (m *MsgNewAuction) GetMemMb() uint64 {
if m != nil {
return m.MemMb
}
return 0
}
func (m *MsgNewAuction) GetStorageGb() uint64 {
if m != nil {
return m.StorageGb
}
return 0
}
type MsgNewAuctionResponse struct { type MsgNewAuctionResponse struct {
AuctionId string `protobuf:"bytes,1,opt,name=auctionId,proto3" json:"auctionId,omitempty"` AuctionId string `protobuf:"bytes,1,opt,name=auctionId,proto3" json:"auctionId,omitempty"`
} }
@@ -623,39 +664,45 @@ func init() {
func init() { proto.RegisterFile("colinearcore/tx.proto", fileDescriptor_0c3854a2a9bba3b4) } func init() { proto.RegisterFile("colinearcore/tx.proto", fileDescriptor_0c3854a2a9bba3b4) }
var fileDescriptor_0c3854a2a9bba3b4 = []byte{ var fileDescriptor_0c3854a2a9bba3b4 = []byte{
// 512 bytes of a gzipped FileDescriptorProto // 601 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x51, 0x8b, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x5f, 0x4f, 0xd4, 0x4e,
0x10, 0xc7, 0x9b, 0xb6, 0xd7, 0x33, 0x73, 0xe7, 0xc1, 0xad, 0x77, 0x35, 0x46, 0x0d, 0x21, 0x2a, 0x14, 0xa5, 0xcb, 0xb2, 0xd0, 0x0b, 0x3f, 0x12, 0xe6, 0x07, 0x38, 0x16, 0x6d, 0x9a, 0xfa, 0x27,
0x04, 0xbc, 0x6b, 0x45, 0x11, 0x5f, 0xbd, 0x8a, 0x8a, 0x60, 0x45, 0x8a, 0xbe, 0x08, 0xc2, 0xc5, 0x4d, 0x84, 0xc5, 0x60, 0x8c, 0xaf, 0xb0, 0x44, 0x89, 0x89, 0x6b, 0xcc, 0x46, 0x5f, 0x4c, 0x4c,
0xec, 0x1a, 0x16, 0xd3, 0xdd, 0xb2, 0x9b, 0x9e, 0xf5, 0x5b, 0xf8, 0xb1, 0x7c, 0x3c, 0xdf, 0xf4, 0x28, 0xed, 0x58, 0x26, 0xb6, 0x9d, 0x66, 0xa6, 0x05, 0xfc, 0x16, 0x7e, 0x2c, 0x1f, 0xf1, 0xcd,
0x4d, 0xda, 0x2f, 0x22, 0x6e, 0x92, 0x4d, 0x72, 0xb5, 0x69, 0xe1, 0xde, 0x3a, 0x33, 0xff, 0xf9, 0x47, 0xc3, 0x7e, 0x10, 0xcd, 0x4e, 0xdb, 0x69, 0xcb, 0xba, 0x7f, 0x12, 0xdf, 0x7a, 0xef, 0x3d,
0x4d, 0x76, 0xe7, 0xdf, 0x85, 0xc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, 0xd5, 0xf2, 0x35, 0x21, 0xe2, 0xac, 0x23, 0xaf, 0x8a, 0x67, 0x7f, 0x02, 0x00, 0x00, 0xff,
0xff, 0x44, 0xed, 0x86, 0xa7, 0x77, 0x06, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@@ -938,6 +985,35 @@ func (m *MsgNewAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if m.StorageGb != 0 {
i = encodeVarintTx(dAtA, i, uint64(m.StorageGb))
i--
dAtA[i] = 0x60
}
if m.MemMb != 0 {
i = encodeVarintTx(dAtA, i, uint64(m.MemMb))
i--
dAtA[i] = 0x58
}
if m.CpuArch != 0 {
i = encodeVarintTx(dAtA, i, uint64(m.CpuArch))
i--
dAtA[i] = 0x50
}
if m.CpuCores != 0 {
i = encodeVarintTx(dAtA, i, uint64(m.CpuCores))
i--
dAtA[i] = 0x48
}
if len(m.Gpus) > 0 {
for iNdEx := len(m.Gpus) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.Gpus[iNdEx])
copy(dAtA[i:], m.Gpus[iNdEx])
i = encodeVarintTx(dAtA, i, uint64(len(m.Gpus[iNdEx])))
i--
dAtA[i] = 0x42
}
}
if len(m.VerifiedProviders) > 0 { if len(m.VerifiedProviders) > 0 {
for iNdEx := len(m.VerifiedProviders) - 1; iNdEx >= 0; iNdEx-- { for iNdEx := len(m.VerifiedProviders) - 1; iNdEx >= 0; iNdEx-- {
i -= len(m.VerifiedProviders[iNdEx]) i -= len(m.VerifiedProviders[iNdEx])
@@ -1366,6 +1442,24 @@ func (m *MsgNewAuction) Size() (n int) {
n += 1 + l + sovTx(uint64(l)) n += 1 + l + sovTx(uint64(l))
} }
} }
if len(m.Gpus) > 0 {
for _, s := range m.Gpus {
l = len(s)
n += 1 + l + sovTx(uint64(l))
}
}
if m.CpuCores != 0 {
n += 1 + sovTx(uint64(m.CpuCores))
}
if m.CpuArch != 0 {
n += 1 + sovTx(uint64(m.CpuArch))
}
if m.MemMb != 0 {
n += 1 + sovTx(uint64(m.MemMb))
}
if m.StorageGb != 0 {
n += 1 + sovTx(uint64(m.StorageGb))
}
return n return n
} }
@@ -1758,6 +1852,114 @@ func (m *MsgNewAuction) Unmarshal(dAtA []byte) error {
} }
m.VerifiedProviders = append(m.VerifiedProviders, string(dAtA[iNdEx:postIndex])) m.VerifiedProviders = append(m.VerifiedProviders, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex iNdEx = postIndex
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Gpus", 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.Gpus = append(m.Gpus, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
case 9:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field CpuCores", wireType)
}
m.CpuCores = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.CpuCores |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 10:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field CpuArch", wireType)
}
m.CpuArch = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.CpuArch |= CpuArchitecture(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 11:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MemMb", wireType)
}
m.MemMb = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.MemMb |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 12:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field StorageGb", wireType)
}
m.StorageGb = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.StorageGb |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:]) skippy, err := skipTx(dAtA[iNdEx:])