fix(Audit): Audit issues (#190)

This commit is contained in:
David Terpay 2023-07-03 13:01:40 -04:00 committed by GitHub
parent 91af6a4c47
commit e873dfda31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 140 additions and 93 deletions

View File

@ -48,7 +48,7 @@ type ABCITestSuite struct {
// account set up
accounts []testutils.Account
balances sdk.Coins
balance sdk.Coin
random *rand.Rand
nonces map[string]uint64
}
@ -118,7 +118,7 @@ func (suite *ABCITestSuite) SetupTest() {
// Accounts set up
suite.accounts = testutils.RandomAccounts(suite.random, 10)
suite.balances = sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(1000000000000000000)))
suite.balance = sdk.NewCoin("foo", sdk.NewInt(1000000000000000000))
suite.nonces = make(map[string]uint64)
for _, acc := range suite.accounts {
suite.nonces[acc.Address.String()] = 0
@ -141,7 +141,7 @@ func (suite *ABCITestSuite) SetupTest() {
func (suite *ABCITestSuite) anteHandler(ctx sdk.Context, tx sdk.Tx, _ bool) (sdk.Context, error) {
signer := tx.GetMsgs()[0].GetSigners()[0]
suite.bankKeeper.EXPECT().GetAllBalances(ctx, signer).AnyTimes().Return(suite.balances)
suite.bankKeeper.EXPECT().GetBalance(ctx, signer, suite.balance.Denom).AnyTimes().Return(suite.balance)
next := func(ctx sdk.Context, _ sdk.Tx, _ bool) (sdk.Context, error) {
return ctx, nil

View File

@ -147,10 +147,8 @@ func (suite *ABCITestSuite) SetupTest() {
func (suite *ABCITestSuite) anteHandler(ctx sdk.Context, tx sdk.Tx, _ bool) (sdk.Context, error) {
signer := tx.GetMsgs()[0].GetSigners()[0]
suite.bankKeeper.EXPECT().GetAllBalances(ctx, signer).AnyTimes().Return(
sdk.NewCoins(
sdk.NewCoin("foo", sdk.NewInt(100000000000000)),
),
suite.bankKeeper.EXPECT().GetBalance(ctx, signer, "foo").AnyTimes().Return(
sdk.NewCoin("foo", sdk.NewInt(100000000000000)),
)
next := func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) {

View File

@ -38,11 +38,11 @@ message MsgAuctionBid {
string bidder = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// bid is the amount of coins that the bidder is bidding to participate in the
// auction.
cosmos.base.v1beta1.Coin bid = 3
cosmos.base.v1beta1.Coin bid = 2
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ];
// transactions are the bytes of the transactions that the bidder wants to
// bundle together.
repeated bytes transactions = 4;
repeated bytes transactions = 3;
}
// MsgAuctionBidResponse defines the Msg/AuctionBid response type.

View File

@ -58,16 +58,16 @@ func (m *MockBankKeeper) EXPECT() *MockBankKeeperMockRecorder {
return m.recorder
}
func (m *MockBankKeeper) GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins {
func (m *MockBankKeeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetAllBalances", ctx, addr)
ret0 := ret[0].(sdk.Coins)
ret := m.ctrl.Call(m, "GetBalance", ctx, addr, denom)
ret0 := ret[0].(sdk.Coin)
return ret0
}
func (mr *MockBankKeeperMockRecorder) GetAllBalances(ctx, addr interface{}) *gomock.Call {
func (mr *MockBankKeeperMockRecorder) GetBalance(ctx, addr, denom interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBalances", reflect.TypeOf((*MockBankKeeper)(nil).GetAllBalances), ctx, addr)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBalance", reflect.TypeOf((*MockBankKeeper)(nil).GetBalance), ctx, addr, denom)
}
func (m *MockBankKeeper) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error {

View File

@ -43,7 +43,7 @@ type AnteTestSuite struct {
lanes []blockbuster.Lane
// Account set up
balance sdk.Coins
balance sdk.Coin
}
func TestAnteTestSuite(t *testing.T) {
@ -104,7 +104,7 @@ func (suite *AnteTestSuite) SetupTest() {
func (suite *AnteTestSuite) anteHandler(ctx sdk.Context, tx sdk.Tx, _ bool) (sdk.Context, error) {
signer := tx.GetMsgs()[0].GetSigners()[0]
suite.bankKeeper.EXPECT().GetAllBalances(ctx, signer).AnyTimes().Return(suite.balance)
suite.bankKeeper.EXPECT().GetBalance(ctx, signer, suite.balance.Denom).AnyTimes().Return(suite.balance)
next := func(ctx sdk.Context, tx sdk.Tx, _ bool) (sdk.Context, error) {
return ctx, nil
@ -118,7 +118,7 @@ func (suite *AnteTestSuite) TestAnteHandler() {
// Bid set up
bidder = testutils.RandomAccounts(suite.random, 1)[0]
bid = sdk.NewCoin("foo", sdk.NewInt(1000))
balance = sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(10000)))
balance = sdk.NewCoin("foo", sdk.NewInt(10000))
signers = []testutils.Account{bidder}
// Top bidding auction tx set up
@ -158,14 +158,14 @@ func (suite *AnteTestSuite) TestAnteHandler() {
"bidder has insufficient balance, invalid auction tx",
func() {
insertTopBid = false
balance = sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(10)))
balance = sdk.NewCoin("foo", sdk.NewInt(10))
},
false,
},
{
"bid is smaller than reserve fee, invalid auction tx",
func() {
balance = sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(10000)))
balance = sdk.NewCoin("foo", sdk.NewInt(10000))
bid = sdk.NewCoin("foo", sdk.NewInt(101))
reserveFee = sdk.NewCoin("foo", sdk.NewInt(1000))
},
@ -174,7 +174,7 @@ func (suite *AnteTestSuite) TestAnteHandler() {
{
"valid auction bid tx",
func() {
balance = sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(10000)))
balance = sdk.NewCoin("foo", sdk.NewInt(10000))
bid = sdk.NewCoin("foo", sdk.NewInt(1000))
reserveFee = sdk.NewCoin("foo", sdk.NewInt(100))
},
@ -191,7 +191,7 @@ func (suite *AnteTestSuite) TestAnteHandler() {
"auction tx is the top bidding tx",
func() {
timeout = 1000
balance = sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(10000)))
balance = sdk.NewCoin("foo", sdk.NewInt(10000))
bid = sdk.NewCoin("foo", sdk.NewInt(1000))
reserveFee = sdk.NewCoin("foo", sdk.NewInt(100))

View File

@ -34,7 +34,11 @@ func CmdQueryParams() *cobra.Command {
Short: "Query the current parameters of the builder module",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx := client.GetClientContextFromCmd(cmd)
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)
request := &types.QueryParamsRequest{}

View File

@ -42,7 +42,9 @@ where each transaction is a hex-encoded string of a signed transaction.
Args: cobra.ExactArgs(3),
Example: "auction-bid cosmos1... 10000uatom 0xFF...,0xCC...,0xAA...",
RunE: func(cmd *cobra.Command, args []string) error {
cmd.Flags().Set(flags.FlagFrom, args[0])
if err := cmd.Flags().Set(flags.FlagFrom, args[0]); err != nil {
return err
}
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {

View File

@ -69,15 +69,25 @@ func (k Keeper) ValidateAuctionBid(ctx sdk.Context, bidder sdk.AccAddress, bid,
return err
}
if minBidIncrement.Denom != bid.Denom {
return fmt.Errorf("min bid increment denom (%s) does not match the bid denom (%s)", minBidIncrement, bid)
}
minBid := highestBid.Add(minBidIncrement)
if !bid.IsGTE(minBid) {
return fmt.Errorf("bid amount (%s) is less than the highest bid (%s) + min bid increment (%s)", bid, highestBid, minBidIncrement)
return fmt.Errorf(
"bid amount (%s) is less than the highest bid (%s) + min bid increment (%s); smallest acceptable bid is (%s)",
bid,
highestBid,
minBidIncrement,
minBid,
)
}
}
// ensure the bidder has enough funds to cover all the inclusion fees
balances := k.bankKeeper.GetAllBalances(ctx, bidder)
if !balances.IsAllGTE(sdk.NewCoins(bid)) {
balances := k.bankKeeper.GetBalance(ctx, bidder, bid.Denom)
if !balances.IsGTE(bid) {
return fmt.Errorf("insufficient funds to bid %s with balance %s", bid, balances)
}
@ -114,7 +124,7 @@ func (k Keeper) ValidateAuctionBundle(bidder sdk.AccAddress, bundleSigners []map
// as long as all subsequent transactions are signed by the bidder.
if len(prevSigners) == 0 {
if seenBidder {
return fmt.Errorf("bundle contains transactions signed by multiple parties; possible front-running or sandwich attack")
return NewFrontRunningError()
}
seenBidder = true
@ -122,7 +132,7 @@ func (k Keeper) ValidateAuctionBundle(bidder sdk.AccAddress, bundleSigners []map
filterSigners(prevSigners, txSigners)
if len(prevSigners) == 0 {
return fmt.Errorf("bundle contains transactions signed by multiple parties; possible front-running or sandwich attack")
return NewFrontRunningError()
}
}
}

View File

@ -14,7 +14,7 @@ func (suite *KeeperTestSuite) TestValidateBidInfo() {
var (
// Tx building variables
accounts = []testutils.Account{} // tracks the order of signers in the bundle
balance = sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(10000)))
balance = sdk.NewCoin("foo", sdk.NewInt(10000))
bid = sdk.NewCoin("foo", sdk.NewInt(1000))
// Auction params
@ -47,7 +47,7 @@ func (suite *KeeperTestSuite) TestValidateBidInfo() {
"insufficient balance",
func() {
bid = sdk.NewCoin("foo", sdk.NewInt(1000))
balance = sdk.NewCoins()
balance = sdk.NewCoin("foo", sdk.NewInt(100))
},
false,
},
@ -56,7 +56,7 @@ func (suite *KeeperTestSuite) TestValidateBidInfo() {
func() {
// reset the balance and bid to their original values
bid = sdk.NewCoin("foo", sdk.NewInt(1000))
balance = sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(10000)))
balance = sdk.NewCoin("foo", sdk.NewInt(10000))
accounts = testutils.RandomAccounts(rnd, int(maxBundleSize+1))
},
false,
@ -140,6 +140,15 @@ func (suite *KeeperTestSuite) TestValidateBidInfo() {
},
false,
},
{
"min bid increment is different from bid denom", // THIS SHOULD NEVER HAPPEN
func() {
highestBid = sdk.NewCoin("foo", sdk.NewInt(500))
bid = sdk.NewCoin("foo", sdk.NewInt(1500))
minBidIncrement = sdk.NewCoin("foo2", sdk.NewInt(1000))
},
false,
},
}
for _, tc := range cases {
@ -149,7 +158,7 @@ func (suite *KeeperTestSuite) TestValidateBidInfo() {
tc.malleate()
// Set up the new builder keeper with mocks customized for this test case
suite.bankKeeper.EXPECT().GetAllBalances(suite.ctx, bidder.Address).Return(balance).AnyTimes()
suite.bankKeeper.EXPECT().GetBalance(suite.ctx, bidder.Address, minBidIncrement.Denom).Return(balance).AnyTimes()
suite.bankKeeper.EXPECT().SendCoins(suite.ctx, bidder.Address, escrowAddress, reserveFee).Return(nil).AnyTimes()
suite.builderKeeper = keeper.NewKeeper(

View File

@ -0,0 +1,12 @@
package keeper
// FrontRunningError defines a custom error type for detecting front-running or sandwich attacks.
type FrontRunningError struct{}
func NewFrontRunningError() *FrontRunningError {
return &FrontRunningError{}
}
func (e FrontRunningError) Error() string {
return "bundle contains transactions signed by multiple parties; possible front-running or sandwich attack"
}

View File

@ -33,31 +33,24 @@ func (m MsgServer) AuctionBid(goCtx context.Context, msg *types.MsgAuctionBid) (
return nil, err
}
// Ensure that the number of transactions is less than or equal to the maximum
// allowed.
maxBundleSize, err := m.GetMaxBundleSize(ctx)
params, err := m.GetParams(ctx)
if err != nil {
return nil, err
}
if uint32(len(msg.Transactions)) > maxBundleSize {
return nil, fmt.Errorf("the number of transactions in the bid is greater than the maximum allowed; expected <= %d, got %d", maxBundleSize, len(msg.Transactions))
if uint32(len(msg.Transactions)) > params.MaxBundleSize {
return nil, fmt.Errorf("the number of transactions in the bid is greater than the maximum allowed; expected <= %d, got %d", params.MaxBundleSize, len(msg.Transactions))
}
proposerFee, err := m.GetProposerFee(ctx)
if err != nil {
return nil, err
}
escrow, err := m.Keeper.GetEscrowAccount(ctx)
escrowAddress, err := sdk.AccAddressFromBech32(params.EscrowAccountAddress)
if err != nil {
return nil, err
}
var proposerReward sdk.Coins
if proposerFee.IsZero() {
if params.ProposerFee.IsZero() {
// send the entire bid to the escrow account when no proposer fee is set
if err := m.bankKeeper.SendCoins(ctx, bidder, escrow, sdk.NewCoins(msg.Bid)); err != nil {
if err := m.bankKeeper.SendCoins(ctx, bidder, escrowAddress, sdk.NewCoins(msg.Bid)); err != nil {
return nil, err
}
} else {
@ -66,7 +59,7 @@ func (m MsgServer) AuctionBid(goCtx context.Context, msg *types.MsgAuctionBid) (
// determine the amount of the bid that goes to the (previous) proposer
bid := sdk.NewDecCoinsFromCoins(msg.Bid)
proposerReward, _ = bid.MulDecTruncate(proposerFee).TruncateDecimal()
proposerReward, _ = bid.MulDecTruncate(params.ProposerFee).TruncateDecimal()
if err := m.bankKeeper.SendCoins(ctx, bidder, sdk.AccAddress(prevProposer.GetOperator()), proposerReward); err != nil {
return nil, err
@ -77,7 +70,7 @@ func (m MsgServer) AuctionBid(goCtx context.Context, msg *types.MsgAuctionBid) (
escrowTotal := bid.Sub(sdk.NewDecCoinsFromCoins(proposerReward...))
escrowReward, _ := escrowTotal.TruncateDecimal()
if err := m.bankKeeper.SendCoins(ctx, bidder, escrow, escrowReward); err != nil {
if err := m.bankKeeper.SendCoins(ctx, bidder, escrowAddress, escrowReward); err != nil {
return nil, err
}
}

View File

@ -13,7 +13,7 @@ type AccountKeeper interface {
// BankKeeper defines the expected API contract for the x/bank module.
type BankKeeper interface {
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
}
// DistributionKeeper defines the expected API contract for the x/distribution

View File

@ -148,6 +148,19 @@ func TestMsgUpdateParams(t *testing.T) {
},
expectPass: false,
},
{
description: "invalid message with min bid increment equal to 0",
msg: types.MsgUpdateParams{
Authority: sdk.AccAddress([]byte("test")).String(),
Params: types.Params{
ProposerFee: sdk.NewDec(1),
EscrowAccountAddress: sdk.AccAddress([]byte("test")).String(),
ReserveFee: sdk.NewCoin("test", sdk.NewInt(100)),
MinBidIncrement: sdk.NewCoin("test", sdk.NewInt(0)),
},
},
expectPass: false,
},
}
for _, tc := range cases {

View File

@ -5,15 +5,16 @@ import (
"cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
)
var (
DefaultMaxBundleSize uint32 = 2
DefaultEscrowAccountAddress string
DefaultReserveFee = sdk.Coin{}
DefaultMinBidIncrement = sdk.Coin{}
DefaultFrontRunningProtection = true
DefaultProposerFee = sdk.ZeroDec()
DefaultEscrowAccountAddress string = authtypes.NewModuleAddress(ModuleName).String()
DefaultReserveFee = sdk.NewCoin("stake", sdk.NewInt(1))
DefaultMinBidIncrement = sdk.NewCoin("stake", sdk.NewInt(1))
DefaultFrontRunningProtection = true
DefaultProposerFee = sdk.ZeroDec()
)
// NewParams returns a new Params instance with the provided values.
@ -58,6 +59,11 @@ func (p Params) Validate() error {
return fmt.Errorf("invalid minimum bid increment (%s)", err)
}
// Minimum bid increment must always be greater than 0.
if p.MinBidIncrement.IsLTE(sdk.NewCoin(p.MinBidIncrement.Denom, sdk.ZeroInt())) {
return fmt.Errorf("minimum bid increment cannot be zero")
}
denoms := map[string]struct{}{
p.ReserveFee.Denom: {},
p.MinBidIncrement.Denom: {},

View File

@ -41,10 +41,10 @@ type MsgAuctionBid struct {
Bidder string `protobuf:"bytes,1,opt,name=bidder,proto3" json:"bidder,omitempty"`
// bid is the amount of coins that the bidder is bidding to participate in the
// auction.
Bid types.Coin `protobuf:"bytes,3,opt,name=bid,proto3" json:"bid"`
Bid types.Coin `protobuf:"bytes,2,opt,name=bid,proto3" json:"bid"`
// transactions are the bytes of the transactions that the bidder wants to
// bundle together.
Transactions [][]byte `protobuf:"bytes,4,rep,name=transactions,proto3" json:"transactions,omitempty"`
Transactions [][]byte `protobuf:"bytes,3,rep,name=transactions,proto3" json:"transactions,omitempty"`
}
func (m *MsgAuctionBid) Reset() { *m = MsgAuctionBid{} }
@ -242,40 +242,40 @@ func init() {
func init() { proto.RegisterFile("pob/builder/v1/tx.proto", fileDescriptor_5cab4e3a4b082d0a) }
var fileDescriptor_5cab4e3a4b082d0a = []byte{
// 528 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x4f, 0x6b, 0x13, 0x4f,
0x18, 0xce, 0x34, 0xfd, 0x05, 0x32, 0xbf, 0xa8, 0xb8, 0xb6, 0xe6, 0x4f, 0xed, 0x26, 0x2c, 0x48,
0x43, 0xa0, 0x3b, 0xa6, 0x96, 0x1e, 0x7a, 0xcb, 0x7a, 0x0e, 0xc8, 0x8a, 0x20, 0x5e, 0x64, 0x36,
0x3b, 0x4c, 0x07, 0xbb, 0x33, 0xcb, 0xce, 0x24, 0xb4, 0x37, 0xe9, 0xd1, 0x93, 0xe0, 0x17, 0xf0,
0xe8, 0x31, 0x07, 0xfd, 0x0e, 0x3d, 0x49, 0xd1, 0x83, 0x9e, 0x44, 0x12, 0x21, 0x7e, 0x0c, 0x99,
0xdd, 0xd9, 0x36, 0x1b, 0xc5, 0x5e, 0x42, 0xf6, 0x7d, 0x9e, 0xf7, 0x79, 0xdf, 0xe7, 0x99, 0x17,
0xd6, 0x63, 0x11, 0xa0, 0x60, 0xcc, 0x8e, 0x43, 0x92, 0xa0, 0x49, 0x1f, 0xa9, 0x13, 0x37, 0x4e,
0x84, 0x12, 0xd6, 0xcd, 0x58, 0x04, 0xae, 0x01, 0xdc, 0x49, 0xbf, 0xb5, 0x41, 0x05, 0x15, 0x29,
0x84, 0xf4, 0xbf, 0x8c, 0xd5, 0xba, 0x47, 0x85, 0xa0, 0xc7, 0x04, 0xe1, 0x98, 0x21, 0xcc, 0xb9,
0x50, 0x58, 0x31, 0xc1, 0xa5, 0x41, 0xed, 0x91, 0x90, 0x91, 0x90, 0x28, 0xc0, 0x92, 0xa0, 0x49,
0x3f, 0x20, 0x0a, 0xf7, 0xd1, 0x48, 0x30, 0x9e, 0x77, 0xaf, 0x0c, 0xa7, 0x84, 0x13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 0xf7, 0x60, 0x2f,
0xf7, 0x72, 0xa9, 0xa4, 0xed, 0x6c, 0xfd, 0x65, 0x67, 0x79, 0x47, 0xa7, 0x09, 0xeb, 0x2b, 0xa5,
0xdc, 0xd2, 0xee, 0x37, 0x00, 0xcb, 0x43, 0x49, 0x2d, 0x01, 0xe1, 0xd2, 0x03, 0x6e, 0xad, 0x2e,
0x53, 0xc8, 0xa3, 0xf5, 0xe0, 0xbf, 0xf0, 0x45, 0x5c, 0x9b, 0xa7, 0x5f, 0x7f, 0xbd, 0x5b, 0xdb,
0x70, 0xee, 0xa2, 0x95, 0x33, 0xd4, 0x2f, 0xf7, 0x1c, 0xd6, 0x0a, 0x39, 0xb6, 0xff, 0xa1, 0xb9,
0x4c, 0x68, 0x6d, 0x5f, 0x41, 0xc8, 0xc7, 0xb6, 0xae, 0xbf, 0xd6, 0xf7, 0xe1, 0x0d, 0xce, 0x66,
0x36, 0x38, 0x9f, 0xd9, 0xe0, 0xe7, 0xcc, 0x06, 0x6f, 0xe7, 0x76, 0xe9, 0x7c, 0x6e, 0x97, 0xbe,
0xcf, 0xed, 0xd2, 0x8b, 0x6d, 0xca, 0xd4, 0xe1, 0x38, 0x70, 0x47, 0x22, 0x42, 0xf2, 0x15, 0x8b,
0x77, 0x22, 0x32, 0x41, 0xc5, 0x04, 0xd5, 0x49, 0x4c, 0x64, 0x50, 0x49, 0x0f, 0xfc, 0xd1, 0x9f,
0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xeb, 0xfe, 0x5c, 0xc4, 0x03, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -426,7 +426,7 @@ func (m *MsgAuctionBid) MarshalToSizedBuffer(dAtA []byte) (int, error) {
copy(dAtA[i:], m.Transactions[iNdEx])
i = encodeVarintTx(dAtA, i, uint64(len(m.Transactions[iNdEx])))
i--
dAtA[i] = 0x22
dAtA[i] = 0x1a
}
}
{
@ -438,7 +438,7 @@ func (m *MsgAuctionBid) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintTx(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x1a
dAtA[i] = 0x12
if len(m.Bidder) > 0 {
i -= len(m.Bidder)
copy(dAtA[i:], m.Bidder)
@ -667,7 +667,7 @@ func (m *MsgAuctionBid) Unmarshal(dAtA []byte) error {
}
m.Bidder = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Bid", wireType)
}
@ -700,7 +700,7 @@ func (m *MsgAuctionBid) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 4:
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Transactions", wireType)
}