factor verified providers into bidding tx flow

master
michael 2022-09-13 22:58:07 +00:00
parent 84bb357bc8
commit 11829e1017
13 changed files with 161 additions and 53 deletions

View File

@ -30826,6 +30826,8 @@ definitions:
type: string type: string
colinear.colinearcore.MsgNewBidResponse: colinear.colinearcore.MsgNewBidResponse:
type: object type: object
colinear.colinearcore.MsgUnlockAllFundsResponse:
type: object
colinear.colinearcore.MsgUnlockFundsResponse: colinear.colinearcore.MsgUnlockFundsResponse:
type: object type: object
colinear.colinearcore.NextAuction: colinear.colinearcore.NextAuction:

4
go.mod
View File

@ -5,6 +5,7 @@ go 1.18
require ( require (
github.com/cosmos/cosmos-sdk v0.45.5 github.com/cosmos/cosmos-sdk v0.45.5
github.com/cosmos/ibc-go/v3 v3.0.1 github.com/cosmos/ibc-go/v3 v3.0.1
github.com/dgraph-io/badger/v2 v2.2007.2
github.com/dgraph-io/badger/v3 v3.2103.2 github.com/dgraph-io/badger/v3 v3.2103.2
github.com/gogo/protobuf v1.3.3 github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.2 github.com/golang/protobuf v1.5.2
@ -18,6 +19,7 @@ require (
github.com/tendermint/spn v0.2.1-0.20220708132853-26a17f03c072 github.com/tendermint/spn v0.2.1-0.20220708132853-26a17f03c072
github.com/tendermint/tendermint v0.34.19 github.com/tendermint/tendermint v0.34.19
github.com/tendermint/tm-db v0.6.7 github.com/tendermint/tm-db v0.6.7
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc
google.golang.org/grpc v1.48.0 google.golang.org/grpc v1.48.0
gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v2 v2.4.0
@ -55,7 +57,6 @@ require (
github.com/danieljoos/wincred v1.0.2 // indirect github.com/danieljoos/wincred v1.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
github.com/dgraph-io/badger/v2 v2.2007.2 // indirect
github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/dgraph-io/ristretto v0.1.0 // indirect
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/docker/docker v20.10.7+incompatible // indirect github.com/docker/docker v20.10.7+incompatible // indirect
@ -159,7 +160,6 @@ require (
github.com/zondax/hid v0.9.0 // indirect github.com/zondax/hid v0.9.0 // indirect
go.etcd.io/bbolt v1.3.6 // indirect go.etcd.io/bbolt v1.3.6 // indirect
go.opencensus.io v0.23.0 // indirect go.opencensus.io v0.23.0 // indirect
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect

View File

@ -22,6 +22,9 @@ message MsgNewAuction {
string ceiling = 4; string ceiling = 4;
string denom = 5; string denom = 5;
uint64 leaseEnd = 6; uint64 leaseEnd = 6;
// verified providers just specifies who's allowed to bid on the lease auction.
// STORED IN MEMORY. DOES NOT GET WRITTEN TO CHAIN STATE.
repeated string verifiedProviders = 7;
} }
message MsgNewAuctionResponse { message MsgNewAuctionResponse {

View File

@ -12,6 +12,10 @@ const (
MinLeasePeriod = 3_600 // 1 hour MinLeasePeriod = 3_600 // 1 hour
MaxLeasePeriod = 8_035_200 // 3 months 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) // Minimum required staked CLR to be a provider (i.e. to bid)
// 500 CLR // 500 CLR
ProviderMinLockedUClr = 500_000_000 ProviderMinLockedUClr = 500_000_000

View File

@ -3,6 +3,7 @@ package cli
import ( import (
"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"
@ -15,9 +16,10 @@ 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]", Use: "new-auction [name] [description] [ceiling] [denom] [end date] [verified providers (separated by spaces)...]",
Short: "Broadcast message newAuction", Short: "Broadcast message newAuction",
Args: cobra.ExactArgs(5), // Args: cobra.ExactArgs(5),
Args: cobra.RangeArgs(5, auctionconfig.MaxVerifiedProviders+5),
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]
@ -25,6 +27,12 @@ func CmdNewAuction() *cobra.Command {
argDenom := args[3] argDenom := args[3]
argLeaseEnd := args[4] argLeaseEnd := args[4]
verifiedProviders := []string{}
if len(args) >= 6 {
// 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
@ -43,6 +51,7 @@ func CmdNewAuction() *cobra.Command {
argCeiling, argCeiling,
argDenom, argDenom,
uint64(le), uint64(le),
verifiedProviders,
) )
if err := msg.ValidateBasic(); err != nil { if err := msg.ValidateBasic(); err != nil {
return err return err

View File

@ -24,7 +24,7 @@ func (k Keeper) AuctionIsExpired(ctx sdk.Context, auctionId string) (bool, error
} }
func (k Keeper) FinalizeExpiredAuctions(ctx sdk.Context) { func (k Keeper) FinalizeExpiredAuctions(ctx sdk.Context) {
memdb.BidDB.ForEachAuction(func(auctionId string) error { memdb.AuctionDB.ForEachAuctionBidList(func(auctionId string) error {
auction, found := k.GetAuction(ctx, auctionId) auction, found := k.GetAuction(ctx, auctionId)
// make sure the auction exists on-chain // make sure the auction exists on-chain
if !found { if !found {
@ -33,7 +33,7 @@ func (k Keeper) FinalizeExpiredAuctions(ctx sdk.Context) {
if uint64(ctx.BlockHeight()) >= auction.Deadline { if uint64(ctx.BlockHeight()) >= auction.Deadline {
var err error var err error
auction.Best, err = memdb.BidDB.GetLowestBid(auctionId) auction.Best, err = memdb.AuctionDB.GetLowestBid(auctionId)
if err != nil { if err != nil {
return errors.Errorf("could not get highest bid for auction %s: %s", auctionId, err) return errors.Errorf("could not get highest bid for auction %s: %s", auctionId, err)
} }
@ -42,10 +42,14 @@ func (k Keeper) FinalizeExpiredAuctions(ctx sdk.Context) {
auction.Remaining = auction.Best.Amount auction.Remaining = auction.Best.Amount
// clear auction // clear auction
if err := memdb.BidDB.ClearAuction(auctionId); err != nil { if err := memdb.AuctionDB.ClearAuctionBids(auctionId); err != nil {
return errors.Errorf("failed to clear auction from memcache: %s", err) return errors.Errorf("failed to clear auction from memcache: %s", err)
} }
if err := memdb.AuctionDB.ClearVerifiedProviders(auctionId); err != nil {
return errors.Errorf("failed to clear verified providers for auction %s: %s", auctionId, err)
}
// pay out unpaid remainder to auction creator // pay out unpaid remainder to auction creator
ceiling := new(big.Int) ceiling := new(big.Int)
ceiling.SetString(auction.Ceiling, 10) ceiling.SetString(auction.Ceiling, 10)

View File

@ -28,7 +28,7 @@ func (k Keeper) AuctionBids(goCtx context.Context, req *types.QueryAuctionBidsRe
return nil, fmt.Errorf("auction %s is already finalized", req.Index) return nil, fmt.Errorf("auction %s is already finalized", req.Index)
} }
bids, err := memdb.BidDB.GetBids(auction.Index) bids, err := memdb.AuctionDB.GetBids(auction.Index)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to get bids for auction %s: %s", auction.Index, err) return nil, fmt.Errorf("failed to get bids for auction %s: %s", auction.Index, err)
} }

View File

@ -49,6 +49,22 @@ found:
) )
} }
senderAddr, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
return nil, fmt.Errorf("sender address `%s` format invalid (bech32 required)", msg.Creator)
}
if len(msg.VerifiedProviders) > auctionconfig.MaxVerifiedProviders {
return nil, fmt.Errorf("must submit no more than %d verified providers (got %d)", auctionconfig.MaxVerifiedProviders, len(msg.VerifiedProviders))
}
bech32Len := len("colinear") + 39
for i, provider := range msg.VerifiedProviders {
if len(provider) > bech32Len {
return nil, fmt.Errorf("verified provider address %s (#%d) must be no longer than a colinear bech32 address (%d)", provider, i, bech32Len)
}
}
auction := types.Auction{ auction := types.Auction{
Index: index, Index: index,
Name: msg.Name, Name: msg.Name,
@ -67,11 +83,6 @@ found:
// Remaining: "0", // Remaining: "0",
} }
senderAddr, err := sdk.AccAddressFromBech32(msg.Creator)
if err != nil {
return nil, fmt.Errorf("sender address `%s` format invalid (bech32 required)", msg.Creator)
}
spendable := k.bank.SpendableCoins(ctx, senderAddr) spendable := k.bank.SpendableCoins(ctx, senderAddr)
// if balance does not exceed or equal proposed auction ceiling... // if balance does not exceed or equal proposed auction ceiling...
ceiling := new(big.Int) ceiling := new(big.Int)

View File

@ -45,6 +45,21 @@ func (k msgServer) NewBid(goCtx context.Context, msg *types.MsgNewBid) (*types.M
return nil, fmt.Errorf("auction %s is expired", msg.AuctionIndex) return nil, fmt.Errorf("auction %s is expired", msg.AuctionIndex)
} }
if verProvs, err := memdb.AuctionDB.GetVerifiedProviders(msg.AuctionIndex); err == nil {
if len(verProvs) == 0 {
goto bidderVerified
} else {
for _, provider := range verProvs {
if msg.Creator == provider {
goto bidderVerified
}
}
return nil, fmt.Errorf("bid sender is not verified by the creator of auction %s", auction.Index)
}
}
bidderVerified:
amt := new(big.Int) amt := new(big.Int)
amt, ok = amt.SetString(msg.Amount, 10) amt, ok = amt.SetString(msg.Amount, 10)
if !ok { if !ok {
@ -60,7 +75,7 @@ func (k msgServer) NewBid(goCtx context.Context, msg *types.MsgNewBid) (*types.M
return nil, fmt.Errorf("bid amount cannot be greater than auction price ceiling (%s)", auction.Ceiling) return nil, fmt.Errorf("bid amount cannot be greater than auction price ceiling (%s)", auction.Ceiling)
} }
lowestBid, err := memdb.BidDB.GetLowestBid(msg.AuctionIndex) lowestBid, err := memdb.AuctionDB.GetLowestBid(msg.AuctionIndex)
// we manually handle KeyNotFound in GetHighestBid, so should return (nil, nil) if not found // we manually handle KeyNotFound in GetHighestBid, so should return (nil, nil) if not found
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to get lowest bid: %s", reflect.TypeOf(err)) return nil, fmt.Errorf("failed to get lowest bid: %s", reflect.TypeOf(err))
@ -85,7 +100,7 @@ func (k msgServer) NewBid(goCtx context.Context, msg *types.MsgNewBid) (*types.M
Owner: msg.Creator, Owner: msg.Creator,
} }
if err := memdb.BidDB.AddBid(msg.AuctionIndex, bid); err != nil { if err := memdb.AuctionDB.AddBid(msg.AuctionIndex, bid); err != nil {
return nil, fmt.Errorf("failed to add bid: %s", err) return nil, fmt.Errorf("failed to add bid: %s", err)
} }

View File

@ -113,7 +113,7 @@ func NewAppModule(
) AppModule { ) AppModule {
// initialize in-memory database // initialize in-memory database
memdb.BidDB.Mount() memdb.AuctionDB.Mount()
return AppModule{ return AppModule{
AppModuleBasic: NewAppModuleBasic(cdc), AppModuleBasic: NewAppModuleBasic(cdc),

View File

@ -5,6 +5,7 @@ import (
"colinear/x/colinearcore/keeper" "colinear/x/colinearcore/keeper"
"colinear/x/colinearcore/types" "colinear/x/colinearcore/types"
"github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
simtypes "github.com/cosmos/cosmos-sdk/types/simulation" simtypes "github.com/cosmos/cosmos-sdk/types/simulation"

View File

@ -9,14 +9,15 @@ 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) *MsgNewAuction { func NewMsgNewAuction(creator string, name string, description string, ceiling string, denom string, leaseEnd uint64, vProviders []string) *MsgNewAuction {
return &MsgNewAuction{ return &MsgNewAuction{
Creator: creator, Creator: creator,
Name: name, Name: name,
Description: description, Description: description,
Ceiling: ceiling, Ceiling: ceiling,
Denom: denom, Denom: denom,
LeaseEnd: leaseEnd, LeaseEnd: leaseEnd,
VerifiedProviders: vProviders,
} }
} }

View File

@ -34,6 +34,9 @@ type MsgNewAuction struct {
Ceiling string `protobuf:"bytes,4,opt,name=ceiling,proto3" json:"ceiling,omitempty"` Ceiling string `protobuf:"bytes,4,opt,name=ceiling,proto3" json:"ceiling,omitempty"`
Denom string `protobuf:"bytes,5,opt,name=denom,proto3" json:"denom,omitempty"` Denom string `protobuf:"bytes,5,opt,name=denom,proto3" json:"denom,omitempty"`
LeaseEnd uint64 `protobuf:"varint,6,opt,name=leaseEnd,proto3" json:"leaseEnd,omitempty"` LeaseEnd uint64 `protobuf:"varint,6,opt,name=leaseEnd,proto3" json:"leaseEnd,omitempty"`
// verified providers just specifies who's allowed to bid on the lease auction.
// STORED IN MEMORY. DOES NOT GET WRITTEN TO CHAIN STATE.
VerifiedProviders []string `protobuf:"bytes,7,rep,name=verifiedProviders,proto3" json:"verifiedProviders,omitempty"`
} }
func (m *MsgNewAuction) Reset() { *m = MsgNewAuction{} } func (m *MsgNewAuction) Reset() { *m = MsgNewAuction{} }
@ -111,6 +114,13 @@ func (m *MsgNewAuction) GetLeaseEnd() uint64 {
return 0 return 0
} }
func (m *MsgNewAuction) GetVerifiedProviders() []string {
if m != nil {
return m.VerifiedProviders
}
return nil
}
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"`
} }
@ -523,36 +533,37 @@ 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{
// 449 bytes of a gzipped FileDescriptorProto // 476 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xcd, 0xea, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xdf, 0x8a, 0xd3, 0x40,
0x14, 0xc5, 0x9b, 0x7f, 0xdb, 0x68, 0x6e, 0x6b, 0xc1, 0xb1, 0x2d, 0x63, 0xd4, 0x10, 0xa2, 0x42, 0x14, 0xc6, 0x9b, 0x6d, 0xb7, 0x6b, 0xce, 0xae, 0x0b, 0x3b, 0xee, 0x96, 0x31, 0x6a, 0x08, 0x51,
0x40, 0x9b, 0x8a, 0x22, 0x6e, 0x6d, 0x40, 0x41, 0x30, 0x2e, 0x8a, 0x6e, 0x04, 0xc1, 0x98, 0x19, 0x21, 0xe0, 0x6e, 0x2b, 0x8a, 0x78, 0xeb, 0x16, 0x14, 0x04, 0x2b, 0x52, 0xf4, 0x46, 0x10, 0x8c,
0x42, 0x30, 0x9d, 0x09, 0x99, 0x14, 0xeb, 0x5b, 0xf8, 0x1e, 0xbe, 0x88, 0xcb, 0x2e, 0x5d, 0x4a, 0x99, 0x63, 0x18, 0x4c, 0x67, 0xca, 0x4c, 0xba, 0xd6, 0xb7, 0xf0, 0xb1, 0xbc, 0xdc, 0x4b, 0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54, 0x8f, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x20, 0xbb, 0xf4, 0x20, 0xc2, 0x04, 0x00, 0xae, 0xf5, 0x75, 0xe9, 0xb6, 0xce, 0x97, 0x6e, 0xeb, 0xfb, 0xd2, 0x6d, 0xbd, 0xbd, 0x55, 0x12,
0x00, 0x06, 0xf3, 0x41, 0xfd, 0x4d, 0xfb, 0x32, 0x45, 0xfd, 0xa1, 0x9b, 0xbd, 0x6b, 0x0f, 0x7f, 0x07,
0x00, 0x00, 0xff, 0xff, 0xdf, 0x9d, 0x09, 0x8c, 0xf0, 0x04, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -799,6 +810,15 @@ func (m *MsgNewAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = 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 = encodeVarintTx(dAtA, i, uint64(len(m.VerifiedProviders[iNdEx])))
i--
dAtA[i] = 0x3a
}
}
if m.LeaseEnd != 0 { if m.LeaseEnd != 0 {
i = encodeVarintTx(dAtA, i, uint64(m.LeaseEnd)) i = encodeVarintTx(dAtA, i, uint64(m.LeaseEnd))
i-- i--
@ -1152,6 +1172,12 @@ func (m *MsgNewAuction) Size() (n int) {
if m.LeaseEnd != 0 { if m.LeaseEnd != 0 {
n += 1 + sovTx(uint64(m.LeaseEnd)) n += 1 + sovTx(uint64(m.LeaseEnd))
} }
if len(m.VerifiedProviders) > 0 {
for _, s := range m.VerifiedProviders {
l = len(s)
n += 1 + l + sovTx(uint64(l))
}
}
return n return n
} }
@ -1486,6 +1512,38 @@ func (m *MsgNewAuction) Unmarshal(dAtA []byte) error {
break break
} }
} }
case 7:
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 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.VerifiedProviders = append(m.VerifiedProviders, string(dAtA[iNdEx:postIndex]))
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:]) skippy, err := skipTx(dAtA[iNdEx:])