Compare commits

...

8 Commits

15 changed files with 501 additions and 88 deletions

View File

@ -30,7 +30,17 @@ genesis:
gpuModels: gpuModels:
gtx-1050-ti: 0 gtx-1050-ti: 0
gtx-1650-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

@ -176,6 +176,9 @@ paths:
items: items:
type: string type: string
title: hardware specs title: hardware specs
cpuCores:
type: string
format: uint64
cpuArch: cpuArch:
type: string type: string
enum: enum:
@ -341,6 +344,9 @@ paths:
items: items:
type: string type: string
title: hardware specs title: hardware specs
cpuCores:
type: string
format: uint64
cpuArch: cpuArch:
type: string type: string
enum: enum:
@ -30960,6 +30966,9 @@ definitions:
items: items:
type: string type: string
title: hardware specs title: hardware specs
cpuCores:
type: string
format: uint64
cpuArch: cpuArch:
type: string type: string
enum: enum:
@ -31119,6 +31128,9 @@ definitions:
items: items:
type: string type: string
title: hardware specs title: hardware specs
cpuCores:
type: string
format: uint64
cpuArch: cpuArch:
type: string type: string
enum: enum:
@ -31226,6 +31238,9 @@ definitions:
items: items:
type: string type: string
title: hardware specs title: hardware specs
cpuCores:
type: string
format: uint64
cpuArch: cpuArch:
type: string type: string
enum: enum:

1
go.mod
View File

@ -88,7 +88,6 @@ require (
github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/handlers v1.5.1 // indirect
github.com/gorilla/websocket v1.5.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/merlin v0.1.1 // indirect
github.com/gtank/ristretto255 v0.1.2 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect

2
go.sum
View File

@ -734,8 +734,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3 h1:lLT7ZLSzGLI08vc9cpd+tYmNWjdKDqyr/2L+f6U12Fk=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU=
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0=
github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s= github.com/gtank/merlin v0.1.1-0.20191105220539-8318aed1a79f/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/bIQ+s=

View File

@ -20,7 +20,8 @@ message Auction {
string remaining = 11; string remaining = 11;
// hardware specs // hardware specs
repeated string gpus = 12; repeated string gpus = 12;
CpuArchitecture cpuArch = 13; uint64 cpuCores = 13;
uint64 memMb = 14; CpuArchitecture cpuArch = 14;
uint64 storageGb = 15; uint64 memMb = 15;
uint64 storageGb = 16;
} }

View File

@ -5,6 +5,8 @@ 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);
@ -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"

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,6 +1,7 @@
package cli package cli
import ( import (
"encoding/json"
"strconv" "strconv"
"colinear/x/colinearcore/types" "colinear/x/colinearcore/types"
@ -15,12 +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),
// below: we're hardcoding the max providers param since we // below: we're hardcoding the max providers param since we
// can't check chain params locally // can't check chain params locally
Args: cobra.RangeArgs(5, 1005), // 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]
@ -28,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,
@ -53,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

@ -2,6 +2,7 @@ package keeper
import ( import (
"context" "context"
"encoding/json"
"errors" "errors"
"fmt" "fmt"
"math/big" "math/big"
@ -87,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)
@ -111,12 +122,22 @@ 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( ctx.EventManager().EmitEvent(
sdk.NewEvent( sdk.NewEvent(
types.AuctionCreatedEventType, types.AuctionCreatedEventType,
sdk.NewAttribute(types.AuctionCreatedIndex, auction.Index), sdk.NewAttribute(types.AuctionCreatedIndex, auction.Index),
sdk.NewAttribute(types.AuctionCreatedEventCreator, msg.Creator), sdk.NewAttribute(types.AuctionCreatedEventCreator, msg.Creator),
sdk.NewAttribute(types.AuctionCreatedCeiling, msg.Ceiling), 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)),
), ),
) )
@ -124,3 +145,33 @@ found:
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

@ -36,9 +36,10 @@ type Auction struct {
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 // hardware specs
Gpus []string `protobuf:"bytes,12,rep,name=gpus,proto3" json:"gpus,omitempty"` Gpus []string `protobuf:"bytes,12,rep,name=gpus,proto3" json:"gpus,omitempty"`
CpuArch CpuArchitecture `protobuf:"varint,13,opt,name=cpuArch,proto3,enum=colinear.colinearcore.CpuArchitecture" json:"cpuArch,omitempty"` CpuCores uint64 `protobuf:"varint,13,opt,name=cpuCores,proto3" json:"cpuCores,omitempty"`
MemMb uint64 `protobuf:"varint,14,opt,name=memMb,proto3" json:"memMb,omitempty"` CpuArch CpuArchitecture `protobuf:"varint,14,opt,name=cpuArch,proto3,enum=colinear.colinearcore.CpuArchitecture" json:"cpuArch,omitempty"`
StorageGb uint64 `protobuf:"varint,15,opt,name=storageGb,proto3" json:"storageGb,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{} }
@ -158,6 +159,13 @@ func (m *Auction) GetGpus() []string {
return nil return nil
} }
func (m *Auction) GetCpuCores() uint64 {
if m != nil {
return m.CpuCores
}
return 0
}
func (m *Auction) GetCpuArch() CpuArchitecture { func (m *Auction) GetCpuArch() CpuArchitecture {
if m != nil { if m != nil {
return m.CpuArch return m.CpuArch
@ -186,31 +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{
// 380 bytes of a gzipped FileDescriptorProto // 392 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 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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) {
@ -236,16 +245,23 @@ func (m *Auction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
if m.StorageGb != 0 { if m.StorageGb != 0 {
i = encodeVarintAuction(dAtA, i, uint64(m.StorageGb)) i = encodeVarintAuction(dAtA, i, uint64(m.StorageGb))
i-- i--
dAtA[i] = 0x78 dAtA[i] = 0x1
i--
dAtA[i] = 0x80
} }
if m.MemMb != 0 { if m.MemMb != 0 {
i = encodeVarintAuction(dAtA, i, uint64(m.MemMb)) i = encodeVarintAuction(dAtA, i, uint64(m.MemMb))
i-- i--
dAtA[i] = 0x70 dAtA[i] = 0x78
} }
if m.CpuArch != 0 { if m.CpuArch != 0 {
i = encodeVarintAuction(dAtA, i, uint64(m.CpuArch)) i = encodeVarintAuction(dAtA, i, uint64(m.CpuArch))
i-- i--
dAtA[i] = 0x70
}
if m.CpuCores != 0 {
i = encodeVarintAuction(dAtA, i, uint64(m.CpuCores))
i--
dAtA[i] = 0x68 dAtA[i] = 0x68
} }
if len(m.Gpus) > 0 { if len(m.Gpus) > 0 {
@ -400,6 +416,9 @@ func (m *Auction) Size() (n int) {
n += 1 + l + sovAuction(uint64(l)) n += 1 + l + sovAuction(uint64(l))
} }
} }
if m.CpuCores != 0 {
n += 1 + sovAuction(uint64(m.CpuCores))
}
if m.CpuArch != 0 { if m.CpuArch != 0 {
n += 1 + sovAuction(uint64(m.CpuArch)) n += 1 + sovAuction(uint64(m.CpuArch))
} }
@ -407,7 +426,7 @@ func (m *Auction) Size() (n int) {
n += 1 + sovAuction(uint64(m.MemMb)) n += 1 + sovAuction(uint64(m.MemMb))
} }
if m.StorageGb != 0 { if m.StorageGb != 0 {
n += 1 + sovAuction(uint64(m.StorageGb)) n += 2 + sovAuction(uint64(m.StorageGb))
} }
return n return n
} }
@ -797,6 +816,25 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
m.Gpus = append(m.Gpus, string(dAtA[iNdEx:postIndex])) m.Gpus = append(m.Gpus, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex iNdEx = postIndex
case 13: 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 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field CpuArch", wireType) return fmt.Errorf("proto: wrong wireType = %d for field CpuArch", wireType)
} }
@ -815,7 +853,7 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
break break
} }
} }
case 14: case 15:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field MemMb", wireType) return fmt.Errorf("proto: wrong wireType = %d for field MemMb", wireType)
} }
@ -834,7 +872,7 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
break break
} }
} }
case 15: case 16:
if wireType != 0 { if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field StorageGb", wireType) return fmt.Errorf("proto: wrong wireType = %d for field StorageGb", wireType)
} }

View File

@ -37,10 +37,11 @@ const (
AuctionCreatedIndex = "auction-id" AuctionCreatedIndex = "auction-id"
AuctionCreatedCeiling = "ceiling" AuctionCreatedCeiling = "ceiling"
// hardware // hardware
// AuctionCreatedGpu = "gpu" AuctionCreatedGpus = "gpus"
// AuctionCreatedCpuArch = "cpu-arch" AuctionCreatedCpuArch = "cpu-arch"
// AuctionCreatedMemMb = "mem-mb" AuctionCreatedCpuCores = "cpu-cores"
// AuctionCreatedStorage = "storage" AuctionCreatedMemMb = "mem-mb"
AuctionCreatedStorage = "storage-gb"
) )
const ( const (

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

@ -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, 0x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, 0x68, 0x2e, 0xfc, 0x1c, 0x9a, 0x0b, 0x1f, 0xef, 0x97, 0xec, 0xfd, 0xab, 0xfd,
0xe6, 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:])