From baa56c660ceae3fa99f297ac9ace6e38f1be3f8c Mon Sep 17 00:00:00 2001 From: Aaron Stein Date: Tue, 3 Apr 2018 14:32:07 -0700 Subject: [PATCH] Denest tx (#175) fixes #164 * TxCreateOrder * TxCreateFulfillment * TxCreateLease * remove unused messages * cleanup --- app/fulfillment/app.go | 34 +- app/lease/app.go | 32 +- app/market/engine.go | 23 +- app/market/engine_test.go | 42 +- app/market/facilitator_test.go | 4 +- app/order/app.go | 22 +- cmd/akash/deployment.go | 14 +- cmd/akash/marketplace.go | 10 +- cmd/akash/provider.go | 26 +- state/fulfillment.go | 4 +- state/order.go | 2 +- testutil/fulfillment.go | 6 +- testutil/lease.go | 6 +- testutil/order.go | 8 +- types/types.pb.go | 754 ++++++++++++++++++--------------- types/types.proto | 62 ++- 16 files changed, 607 insertions(+), 442 deletions(-) diff --git a/app/fulfillment/app.go b/app/fulfillment/app.go index 9ed71dec45..1c1fd1c04b 100644 --- a/app/fulfillment/app.go +++ b/app/fulfillment/app.go @@ -88,14 +88,23 @@ func (a *app) Query(req tmtypes.RequestQuery) tmtypes.ResponseQuery { } func (a *app) doCheckTx(ctx apptypes.Context, tx *types.TxCreateFulfillment) tmtypes.ResponseCheckTx { - fulfillment := tx.GetFulfillment() - if fulfillment == nil { - return tmtypes.ResponseCheckTx{Code: code.INVALID_TRANSACTION} + if tx.Deployment == nil { + return tmtypes.ResponseCheckTx{ + Code: code.INVALID_TRANSACTION, + Log: "Empty deployment", + } + } + + if tx.Provider == nil { + return tmtypes.ResponseCheckTx{ + Code: code.INVALID_TRANSACTION, + Log: "Empty provider", + } } // lookup provider - provider, err := a.State().Provider().Get(fulfillment.Provider) + provider, err := a.State().Provider().Get(tx.Provider) if err != nil { return tmtypes.ResponseCheckTx{ Code: code.ERROR, @@ -133,7 +142,7 @@ func (a *app) doCheckTx(ctx apptypes.Context, tx *types.TxCreateFulfillment) tmt } // ensure order exists - dorder, err := a.State().Order().Get(fulfillment.Deployment, fulfillment.Group, fulfillment.Order) + dorder, err := a.State().Order().Get(tx.Deployment, tx.Group, tx.Order) if err != nil { return tmtypes.ResponseCheckTx{ Code: code.ERROR, @@ -156,7 +165,7 @@ func (a *app) doCheckTx(ctx apptypes.Context, tx *types.TxCreateFulfillment) tmt } // get deployment group - group, err := a.State().DeploymentGroup().Get(fulfillment.Deployment, fulfillment.Group) + group, err := a.State().DeploymentGroup().Get(tx.Deployment, tx.Group) if err != nil { return tmtypes.ResponseCheckTx{ Code: code.ERROR, @@ -181,7 +190,7 @@ func (a *app) doCheckTx(ctx apptypes.Context, tx *types.TxCreateFulfillment) tmt } // ensure there are no other orders for this provider - other, err := a.State().Fulfillment().Get(fulfillment.Deployment, fulfillment.Group, fulfillment.Order, fulfillment.Provider) + other, err := a.State().Fulfillment().Get(tx.Deployment, tx.Group, tx.Order, tx.Provider) if err != nil { return tmtypes.ResponseCheckTx{ Code: code.ERROR, @@ -207,7 +216,16 @@ func (a *app) doDeliverTx(ctx apptypes.Context, tx *types.TxCreateFulfillment) t } } - if err := a.State().Fulfillment().Save(tx.GetFulfillment()); err != nil { + fulfillment := &types.Fulfillment{ + Deployment: tx.Deployment, + Group: tx.Group, + Order: tx.Order, + Provider: tx.Provider, + Price: tx.Price, + State: types.Fulfillment_OPEN, + } + + if err := a.State().Fulfillment().Save(fulfillment); err != nil { return tmtypes.ResponseDeliverTx{ Code: code.INVALID_TRANSACTION, Log: err.Error(), diff --git a/app/lease/app.go b/app/lease/app.go index 8e2e4503b2..7d8fcc5656 100644 --- a/app/lease/app.go +++ b/app/lease/app.go @@ -101,14 +101,22 @@ func (a *app) Query(req tmtypes.RequestQuery) tmtypes.ResponseQuery { } func (a *app) doCheckCreateTx(ctx apptypes.Context, tx *types.TxCreateLease) (tmtypes.ResponseCheckTx, *types.Order) { - lease := tx.GetLease() + if tx.Deployment == nil { + return tmtypes.ResponseCheckTx{ + Code: code.INVALID_TRANSACTION, + Log: "Empty deployment", + }, nil + } - if lease == nil { - return tmtypes.ResponseCheckTx{Code: code.INVALID_TRANSACTION}, nil + if tx.Provider == nil { + return tmtypes.ResponseCheckTx{ + Code: code.INVALID_TRANSACTION, + Log: "Empty provider", + }, nil } // lookup provider - provider, err := a.State().Provider().Get(lease.Provider) + provider, err := a.State().Provider().Get(tx.Provider) if err != nil { return tmtypes.ResponseCheckTx{ Code: code.ERROR, @@ -138,7 +146,7 @@ func (a *app) doCheckCreateTx(ctx apptypes.Context, tx *types.TxCreateLease) (tm } // ensure order exists - order, err := a.State().Order().Get(lease.Deployment, lease.Group, lease.Order) + order, err := a.State().Order().Get(tx.Deployment, tx.Group, tx.Order) if err != nil { return tmtypes.ResponseCheckTx{ Code: code.ERROR, @@ -161,7 +169,7 @@ func (a *app) doCheckCreateTx(ctx apptypes.Context, tx *types.TxCreateLease) (tm } // ensure fulfillment exists - fulfillment, err := a.State().Fulfillment().Get(lease.Deployment, lease.Group, lease.Order, lease.Provider) + fulfillment, err := a.State().Fulfillment().Get(tx.Deployment, tx.Group, tx.Order, tx.Provider) if err != nil { return tmtypes.ResponseCheckTx{ Code: code.ERROR, @@ -208,7 +216,16 @@ func (a *app) doDeliverCreateTx(ctx apptypes.Context, tx *types.TxCreateLease) t } } - if err := a.State().Lease().Save(tx.GetLease()); err != nil { + lease := &types.Lease{ + Deployment: tx.Deployment, + Group: tx.Group, + Order: tx.Order, + Provider: tx.Provider, + Price: tx.Price, + State: types.Lease_ACTIVE, + } + + if err := a.State().Lease().Save(lease); err != nil { return tmtypes.ResponseDeliverTx{ Code: code.INVALID_TRANSACTION, Log: err.Error(), @@ -223,7 +240,6 @@ func (a *app) doDeliverCreateTx(ctx apptypes.Context, tx *types.TxCreateLease) t } } - lease := tx.GetLease() tags := apptypes.NewTags(a.Name(), apptypes.TxTypeCreateLease) tags = append(tags, tmcommon.KVPair{Key: []byte(apptypes.TagNameDeployment), Value: lease.Deployment}) tags = append(tags, tmcommon.KVPair{Key: []byte(apptypes.TagNameLease), Value: state.IDForLease(lease)}) diff --git a/app/market/engine.go b/app/market/engine.go index b28f1cdefd..e3c7ec0366 100644 --- a/app/market/engine.go +++ b/app/market/engine.go @@ -145,13 +145,10 @@ func (e engine) processDeployment(state state.State, w txBuffer, deployment type // if no active order for the group emit create tx if !activeFound { w.put(&types.TxCreateOrder{ - Order: &types.Order{ - Deployment: deployment.Address, - Group: group.GetSeq(), - Order: nextSeq, - State: types.Order_OPEN, - EndAt: group.OrderTTL + height, - }, + Deployment: deployment.Address, + Group: group.GetSeq(), + Seq: nextSeq, + EndAt: group.OrderTTL + height, }) nextSeq++ } @@ -194,13 +191,11 @@ func (e engine) processOrder(state state.State, w txBuffer, order *types.Order) } w.put(&types.TxCreateLease{ - Lease: &types.Lease{ - Deployment: fulfillment.Deployment, - Group: fulfillment.Group, - Order: fulfillment.Order, - Provider: fulfillment.Provider, - Price: fulfillment.Price, - }, + Deployment: fulfillment.Deployment, + Group: fulfillment.Group, + Order: fulfillment.Order, + Provider: fulfillment.Provider, + Price: fulfillment.Price, }) return nil diff --git a/app/market/engine_test.go b/app/market/engine_test.go index 6bd36dd96f..df5488788b 100644 --- a/app/market/engine_test.go +++ b/app/market/engine_test.go @@ -24,12 +24,12 @@ func TestEngine_All(t *testing.T) { groups := testutil.DeploymentGroups(deployment.Address, tenant.Nonce) require.NoError(t, state_.Deployment().Save(deployment)) - state_, tx := testCreateOrder(t, state_, tenant, deployment, groups) - state_ = testCreateLease(t, state_, provider, deployment, groups, tx) + state_, order := testCreateOrder(t, state_, tenant, deployment, groups) + state_ = testCreateLease(t, state_, provider, deployment, groups, order) state_ = testCloseDeployment(t, state_, tenant.Address, deployment.Address) } -func testCreateOrder(t *testing.T, state state.State, tenant *types.Account, deployment *types.Deployment, groups *types.DeploymentGroups) (state.State, *types.TxCreateOrder) { +func testCreateOrder(t *testing.T, state state.State, tenant *types.Account, deployment *types.Deployment, groups *types.DeploymentGroups) (state.State, *types.Order) { for _, group := range groups.GetItems() { require.NoError(t, state.DeploymentGroup().Save(group)) } @@ -42,16 +42,22 @@ func testCreateOrder(t *testing.T, state state.State, tenant *types.Account, dep tx, ok := txs[0].(*types.TxCreateOrder) require.True(t, ok) - require.Equal(t, deployment.Address, tx.Order.Deployment) - require.Equal(t, groups.GetItems()[0].Seq, tx.Order.GetGroup()) - require.Equal(t, types.Order_OPEN, tx.Order.GetState()) - require.NoError(t, state.Order().Save(tx.Order)) + require.Equal(t, deployment.Address, tx.Deployment) + require.Equal(t, groups.GetItems()[0].Seq, tx.Group) + order := &types.Order{ + Deployment: tx.Deployment, + Group: tx.Group, + Seq: tx.Seq, + EndAt: tx.EndAt, + State: types.Order_OPEN, + } + require.NoError(t, state.Order().Save(order)) - return state, tx + return state, order } -func testCreateLease(t *testing.T, state state.State, provider *types.Provider, deployment *types.Deployment, groups *types.DeploymentGroups, tx *types.TxCreateOrder) state.State { - fulfillment := testutil.Fulfillment(provider.Address, deployment.Address, tx.Order.GetGroup(), tx.Order.GetOrder(), 1) +func testCreateLease(t *testing.T, state state.State, provider *types.Provider, deployment *types.Deployment, groups *types.DeploymentGroups, order *types.Order) state.State { + fulfillment := testutil.Fulfillment(provider.Address, deployment.Address, order.Group, order.Seq, 1) require.NoError(t, state.Fulfillment().Save(fulfillment)) for i := int64(0); i <= groups.GetItems()[0].OrderTTL; i++ { @@ -63,13 +69,19 @@ func testCreateLease(t *testing.T, state state.State, provider *types.Provider, require.Len(t, txs, 1) leaseTx, ok := txs[0].(*types.TxCreateLease) + lease := &types.Lease{ + Deployment: leaseTx.Deployment, + Group: leaseTx.Group, + Order: leaseTx.Order, + Provider: leaseTx.Provider, + Price: leaseTx.Price, + State: types.Lease_ACTIVE, + } require.True(t, ok) - require.NoError(t, state.Lease().Save(leaseTx.GetLease())) - require.NoError(t, state.Lease().Save(leaseTx.GetLease())) + require.NoError(t, state.Lease().Save(lease)) - matchedOrder := tx.GetOrder() - matchedOrder.State = types.Order_MATCHED - require.NoError(t, state.Order().Save(matchedOrder)) + order.State = types.Order_MATCHED + require.NoError(t, state.Order().Save(order)) return state } diff --git a/app/market/facilitator_test.go b/app/market/facilitator_test.go index fa4640b3ed..24c68f556d 100644 --- a/app/market/facilitator_test.go +++ b/app/market/facilitator_test.go @@ -26,9 +26,7 @@ func TestFacilitator(t *testing.T) { daddr := state.DeploymentAddress(account.Address, nonce) tx := &types.TxCreateOrder{ - Order: &types.Order{ - Deployment: daddr, - }, + Deployment: daddr, } txs := []interface{}{tx} diff --git a/app/order/app.go b/app/order/app.go index a5e2b7ae08..5fe4e40237 100644 --- a/app/order/app.go +++ b/app/order/app.go @@ -147,16 +147,15 @@ func (a *app) doCheckCreateTx(ctx apptypes.Context, tx *types.TxCreateOrder) tmt // todo: ensure signed by last block creator / valid market facilitator // ensure order provided - order := tx.Order - if order == nil { + if tx.Deployment == nil { return tmtypes.ResponseCheckTx{ Code: code.INVALID_TRANSACTION, - Log: "No order specified", + Log: "No deployment specified", } } // ensure deployment exists - deployment, err := a.State().Deployment().Get(order.Deployment) + deployment, err := a.State().Deployment().Get(tx.Deployment) if err != nil { return tmtypes.ResponseCheckTx{ Code: code.INVALID_TRANSACTION, @@ -179,7 +178,7 @@ func (a *app) doCheckCreateTx(ctx apptypes.Context, tx *types.TxCreateOrder) tmt } // ensure deployment group exists - group, err := a.State().DeploymentGroup().Get(order.Deployment, order.Group) + group, err := a.State().DeploymentGroup().Get(tx.Deployment, tx.Group) if err != nil { return tmtypes.ResponseCheckTx{ Code: code.ERROR, @@ -232,10 +231,17 @@ func (a *app) doDeliverCreateTx(ctx apptypes.Context, tx *types.TxCreateOrder) t } } - order := tx.Order - - oseq := a.State().Deployment().SequenceFor(order.Deployment) + oseq := a.State().Deployment().SequenceFor(tx.Deployment) oseq.Advance() + + order := &types.Order{ + Deployment: tx.Deployment, + Group: tx.Group, + Seq: tx.Seq, + EndAt: tx.EndAt, + State: types.Order_OPEN, + } + // order.Order = oseq.Advance() order.State = types.Order_OPEN diff --git a/cmd/akash/deployment.go b/cmd/akash/deployment.go index c50b6ecd1e..087ed78833 100644 --- a/cmd/akash/deployment.go +++ b/cmd/akash/deployment.go @@ -122,17 +122,15 @@ func createDeployment(ctx context.Context, cmd *cobra.Command, args []string) er expected := len(groups) handler := marketplace.NewBuilder(). OnTxCreateFulfillment(func(tx *types.TxCreateFulfillment) { - if bytes.Equal(tx.Fulfillment.Deployment, address) { - f := tx.Fulfillment - fmt.Printf("Group %v/%v Fulfillment: %v\n", f.Group, len(groups), - X(state.FulfillmentID(f.Deployment, f.Group, f.Order, f.Provider))) + if bytes.Equal(tx.Deployment, address) { + fmt.Printf("Group %v/%v Fulfillment: %v\n", tx.Group, len(groups), + X(state.FulfillmentID(tx.Deployment, tx.Group, tx.Order, tx.Provider))) } }). OnTxCreateLease(func(tx *types.TxCreateLease) { - if bytes.Equal(tx.Lease.Deployment, address) { - l := tx.Lease - fmt.Printf("Group %v/%v Lease: %v\n", l.Group, len(groups), - X(state.FulfillmentID(l.Deployment, l.Group, l.Order, l.Provider))) + if bytes.Equal(tx.Deployment, address) { + fmt.Printf("Group %v/%v Lease: %v\n", tx.Group, len(groups), + X(state.FulfillmentID(tx.Deployment, tx.Group, tx.Order, tx.Provider))) expected-- } if expected == 0 { diff --git a/cmd/akash/marketplace.go b/cmd/akash/marketplace.go index 7885f28774..6a22ae4a1d 100644 --- a/cmd/akash/marketplace.go +++ b/cmd/akash/marketplace.go @@ -45,17 +45,17 @@ func marketplaceMonitorHandler() marketplace.Handler { }). OnTxCreateOrder(func(tx *types.TxCreateOrder) { fmt.Printf("ORDER CREATED\t%v/%v/%v\n", - X(tx.Order.Deployment), tx.Order.Group, tx.Order.Order) + X(tx.Deployment), tx.Group, tx.Seq) }). OnTxCreateFulfillment(func(tx *types.TxCreateFulfillment) { fmt.Printf("FULFILLMENT CREATED\t%v/%v/%v by %v [price=%v]\n", - X(tx.Fulfillment.Deployment), tx.Fulfillment.Group, tx.Fulfillment.Order, - X(tx.Fulfillment.Provider), tx.Fulfillment.Price) + X(tx.Deployment), tx.Group, tx.Order, + X(tx.Provider), tx.Price) }). OnTxCreateLease(func(tx *types.TxCreateLease) { fmt.Printf("LEASE CREATED\t%v/%v/%v by %x [price=%v]\n", - X(tx.Lease.Deployment), tx.Lease.Group, tx.Lease.Order, - X(tx.Lease.Provider), tx.Lease.Price) + X(tx.Deployment), tx.Group, tx.Order, + X(tx.Provider), tx.Price) }). OnTxCloseDeployment(func(tx *types.TxCloseDeployment) { fmt.Printf("DEPLOYMENT CLOSED\t%v", X(tx.Deployment)) diff --git a/cmd/akash/provider.go b/cmd/akash/provider.go index 62c08906ea..a54a647dcc 100644 --- a/cmd/akash/provider.go +++ b/cmd/akash/provider.go @@ -168,7 +168,7 @@ func doProviderRunCommand(ctx context.Context, cmd *cobra.Command, args []string return } - price, err := getPrice(ctx, tx.Order.Deployment, tx.Order.Group) + price, err := getPrice(ctx, tx.Deployment, tx.Group) if err != nil { ctx.Log().Error("error getting price", "error", err) return @@ -178,17 +178,15 @@ func doProviderRunCommand(ctx context.Context, cmd *cobra.Command, args []string price = uint32(rand.Int31n(int32(price) + 1)) ordertx := &types.TxCreateFulfillment{ - Fulfillment: &types.Fulfillment{ - Deployment: tx.Order.Deployment, - Group: tx.Order.Group, - Order: tx.Order.Order, - Provider: *provider, - Price: price, - }, + Deployment: tx.Deployment, + Group: tx.Group, + Order: tx.Seq, + Provider: *provider, + Price: price, } fmt.Printf("Bidding on order: %v/%v/%v\n", - X(tx.Order.Deployment), tx.Order.Group, tx.Order.Order) + X(tx.Deployment), tx.Group, tx.Seq) txbuf, err := txutil.BuildTx(signer, nonce, ordertx) if err != nil { @@ -212,13 +210,13 @@ func doProviderRunCommand(ctx context.Context, cmd *cobra.Command, args []string }). OnTxCreateLease(func(tx *types.TxCreateLease) { - leaseProvider, _ := tx.Lease.Provider.Marshal() + leaseProvider, _ := tx.Provider.Marshal() if bytes.Equal(leaseProvider, *provider) { - lease := X(state.LeaseID(tx.Lease.Deployment, tx.Lease.Group, tx.Lease.Order, tx.Lease.Provider)) - leases, _ := deployments[tx.Lease.Deployment.EncodeString()] - deployments[tx.Lease.Deployment.EncodeString()] = append(leases, lease) + lease := X(state.LeaseID(tx.Deployment, tx.Group, tx.Order, tx.Provider)) + leases, _ := deployments[tx.Deployment.EncodeString()] + deployments[tx.Deployment.EncodeString()] = append(leases, lease) fmt.Printf("Won lease for order: %v/%v/%v\n", - X(tx.Lease.Deployment), tx.Lease.Group, tx.Lease.Order) + X(tx.Deployment), tx.Group, tx.Order) } }). OnTxCloseDeployment(func(tx *types.TxCloseDeployment) { diff --git a/state/fulfillment.go b/state/fulfillment.go index 997408796f..01fe55f8c9 100644 --- a/state/fulfillment.go +++ b/state/fulfillment.go @@ -102,12 +102,12 @@ func (a *fulfillmentAdapter) groupMaxRange(group *types.DeploymentGroup) []byte // /fulfillment-orders/{deployment-address}{group-sequence}{order-sequence} func (a *fulfillmentAdapter) orderMinRange(order *types.Order) []byte { - return a.KeyFor(FulfillmentID(order.Deployment, order.GetGroup(), order.GetOrder(), []byte{})) + return a.KeyFor(FulfillmentID(order.Deployment, order.GetGroup(), order.GetSeq(), []byte{})) } // /fulfillment-orders/{deployment-address}{group-sequence}{order-sequence}{max-address} func (a *fulfillmentAdapter) orderMaxRange(order *types.Order) []byte { - return a.KeyFor(FulfillmentID(order.Deployment, order.GetGroup(), order.GetOrder(), MaxAddress())) + return a.KeyFor(FulfillmentID(order.Deployment, order.GetGroup(), order.GetSeq(), MaxAddress())) } func (a *fulfillmentAdapter) forRange(min, max []byte) ([]*types.Fulfillment, error) { diff --git a/state/order.go b/state/order.go index e748d24d47..72146659e0 100644 --- a/state/order.go +++ b/state/order.go @@ -69,7 +69,7 @@ func (a *orderAdapter) KeyFor(id base.Bytes) base.Bytes { // {deployment-address}{group-sequence}{order-sequence}{provider-address} func (a *orderAdapter) IDFor(obj *types.Order) []byte { - return OrderID(obj.Deployment, obj.GetGroup(), obj.GetOrder()) + return OrderID(obj.Deployment, obj.GetGroup(), obj.GetSeq()) } // /deployment-orders/{deployment-address}{group-sequence}{order-sequence} diff --git a/testutil/fulfillment.go b/testutil/fulfillment.go index 9aa3d21a6e..425e4c834a 100644 --- a/testutil/fulfillment.go +++ b/testutil/fulfillment.go @@ -16,7 +16,11 @@ func CreateFulfillment(t *testing.T, app apptypes.Application, provider base.Byt fulfillmenttx := &types.TxPayload_TxCreateFulfillment{ TxCreateFulfillment: &types.TxCreateFulfillment{ - Fulfillment: fulfillment, + Deployment: fulfillment.Deployment, + Group: fulfillment.Group, + Order: fulfillment.Order, + Provider: fulfillment.Provider, + Price: fulfillment.Price, }, } diff --git a/testutil/lease.go b/testutil/lease.go index 57f56b888c..245183b4d8 100644 --- a/testutil/lease.go +++ b/testutil/lease.go @@ -16,7 +16,11 @@ func CreateLease(t *testing.T, app apptypes.Application, provider base.Bytes, ke tx := &types.TxPayload_TxCreateLease{ TxCreateLease: &types.TxCreateLease{ - Lease: lease, + Deployment: lease.Deployment, + Group: lease.Group, + Order: lease.Order, + Provider: lease.Provider, + Price: lease.Price, }, } diff --git a/testutil/order.go b/testutil/order.go index 07cd9961bd..a8fc9d7dc0 100644 --- a/testutil/order.go +++ b/testutil/order.go @@ -16,7 +16,10 @@ func CreateOrder(t *testing.T, app apptypes.Application, account *types.Account, tx := &types.TxPayload_TxCreateOrder{ TxCreateOrder: &types.TxCreateOrder{ - Order: order, + Deployment: order.Deployment, + Group: order.Group, + Seq: order.Seq, + EndAt: order.EndAt, }, } @@ -40,7 +43,8 @@ func Order(deploymentAddress base.Bytes, groupSeq, orderSeq uint64) *types.Order order := &types.Order{ Deployment: deploymentAddress, Group: groupSeq, - Order: orderSeq, + Seq: orderSeq, + EndAt: int64(0), } return order } diff --git a/types/types.pb.go b/types/types.pb.go index 576e3e39c4..c54f35498b 100644 --- a/types/types.pb.go +++ b/types/types.pb.go @@ -35,8 +35,6 @@ TxCreateLease Leases TxCloseLease - Bill - TxBillTenant */ package types @@ -958,7 +956,7 @@ type Order struct { // deployment group sequence Group uint64 `protobuf:"varint,2,opt,name=group,proto3" json:"group,omitempty"` // order sequence - Order uint64 `protobuf:"varint,3,opt,name=order,proto3" json:"order,omitempty"` + Seq uint64 `protobuf:"varint,3,opt,name=seq,proto3" json:"seq,omitempty"` // maximum block number order can be open EndAt int64 `protobuf:"varint,4,opt,name=endAt,proto3" json:"endAt,omitempty"` State Order_OrderState `protobuf:"varint,5,opt,name=state,proto3,enum=types.Order_OrderState" json:"state,omitempty"` @@ -976,9 +974,9 @@ func (m *Order) GetGroup() uint64 { return 0 } -func (m *Order) GetOrder() uint64 { +func (m *Order) GetSeq() uint64 { if m != nil { - return m.Order + return m.Seq } return 0 } @@ -998,7 +996,14 @@ func (m *Order) GetState() Order_OrderState { } type TxCreateOrder struct { - Order *Order `protobuf:"bytes,1,opt,name=order" json:"order,omitempty"` + // deployment address + Deployment github_com_ovrclk_akash_types_base.Bytes `protobuf:"bytes,1,opt,name=deployment,proto3,customtype=github.com/ovrclk/akash/types/base.Bytes" json:"deployment"` + // deployment group sequence + Group uint64 `protobuf:"varint,2,opt,name=group,proto3" json:"group,omitempty"` + // order sequence + Seq uint64 `protobuf:"varint,3,opt,name=seq,proto3" json:"seq,omitempty"` + // maximum block number order can be open + EndAt int64 `protobuf:"varint,4,opt,name=endAt,proto3" json:"endAt,omitempty"` } func (m *TxCreateOrder) Reset() { *m = TxCreateOrder{} } @@ -1006,11 +1011,25 @@ func (m *TxCreateOrder) String() string { return proto.CompactTextStr func (*TxCreateOrder) ProtoMessage() {} func (*TxCreateOrder) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{19} } -func (m *TxCreateOrder) GetOrder() *Order { +func (m *TxCreateOrder) GetGroup() uint64 { if m != nil { - return m.Order + return m.Group } - return nil + return 0 +} + +func (m *TxCreateOrder) GetSeq() uint64 { + if m != nil { + return m.Seq + } + return 0 +} + +func (m *TxCreateOrder) GetEndAt() int64 { + if m != nil { + return m.EndAt + } + return 0 } type Orders struct { @@ -1076,7 +1095,15 @@ func (m *Fulfillment) GetState() Fulfillment_FulfillmentState { } type TxCreateFulfillment struct { - Fulfillment *Fulfillment `protobuf:"bytes,1,opt,name=fulfillment" json:"fulfillment,omitempty"` + // deployment address + Deployment github_com_ovrclk_akash_types_base.Bytes `protobuf:"bytes,1,opt,name=deployment,proto3,customtype=github.com/ovrclk/akash/types/base.Bytes" json:"deployment"` + // deployment group sequence + Group uint64 `protobuf:"varint,2,opt,name=group,proto3" json:"group,omitempty"` + // order sequence + Order uint64 `protobuf:"varint,3,opt,name=order,proto3" json:"order,omitempty"` + // provider address + Provider github_com_ovrclk_akash_types_base.Bytes `protobuf:"bytes,4,opt,name=provider,proto3,customtype=github.com/ovrclk/akash/types/base.Bytes" json:"provider"` + Price uint32 `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"` } func (m *TxCreateFulfillment) Reset() { *m = TxCreateFulfillment{} } @@ -1084,11 +1111,25 @@ func (m *TxCreateFulfillment) String() string { return proto.CompactT func (*TxCreateFulfillment) ProtoMessage() {} func (*TxCreateFulfillment) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{22} } -func (m *TxCreateFulfillment) GetFulfillment() *Fulfillment { +func (m *TxCreateFulfillment) GetGroup() uint64 { if m != nil { - return m.Fulfillment + return m.Group } - return nil + return 0 +} + +func (m *TxCreateFulfillment) GetOrder() uint64 { + if m != nil { + return m.Order + } + return 0 +} + +func (m *TxCreateFulfillment) GetPrice() uint32 { + if m != nil { + return m.Price + } + return 0 } type Lease struct { @@ -1139,7 +1180,16 @@ func (m *Lease) GetState() Lease_LeaseState { } type TxCreateLease struct { - Lease *Lease `protobuf:"bytes,1,opt,name=lease" json:"lease,omitempty"` + // deployment address + Deployment github_com_ovrclk_akash_types_base.Bytes `protobuf:"bytes,1,opt,name=deployment,proto3,customtype=github.com/ovrclk/akash/types/base.Bytes" json:"deployment"` + // deployment group sequence + Group uint64 `protobuf:"varint,2,opt,name=group,proto3" json:"group,omitempty"` + // order sequence + Order uint64 `protobuf:"varint,3,opt,name=order,proto3" json:"order,omitempty"` + // provider address + Provider github_com_ovrclk_akash_types_base.Bytes `protobuf:"bytes,4,opt,name=provider,proto3,customtype=github.com/ovrclk/akash/types/base.Bytes" json:"provider"` + // price of matching fulfillment + Price uint32 `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"` } func (m *TxCreateLease) Reset() { *m = TxCreateLease{} } @@ -1147,11 +1197,25 @@ func (m *TxCreateLease) String() string { return proto.CompactTextStr func (*TxCreateLease) ProtoMessage() {} func (*TxCreateLease) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{24} } -func (m *TxCreateLease) GetLease() *Lease { +func (m *TxCreateLease) GetGroup() uint64 { if m != nil { - return m.Lease + return m.Group } - return nil + return 0 +} + +func (m *TxCreateLease) GetOrder() uint64 { + if m != nil { + return m.Order + } + return 0 +} + +func (m *TxCreateLease) GetPrice() uint32 { + if m != nil { + return m.Price + } + return 0 } type Leases struct { @@ -1180,32 +1244,6 @@ func (m *TxCloseLease) String() string { return proto.CompactTextStri func (*TxCloseLease) ProtoMessage() {} func (*TxCloseLease) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{26} } -type Bill struct { - // lease address - Lease github_com_ovrclk_akash_types_base.Bytes `protobuf:"bytes,1,opt,name=lease,proto3,customtype=github.com/ovrclk/akash/types/base.Bytes" json:"lease"` -} - -func (m *Bill) Reset() { *m = Bill{} } -func (m *Bill) String() string { return proto.CompactTextString(m) } -func (*Bill) ProtoMessage() {} -func (*Bill) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{27} } - -type TxBillTenant struct { - Bill *Bill `protobuf:"bytes,1,opt,name=bill" json:"bill,omitempty"` -} - -func (m *TxBillTenant) Reset() { *m = TxBillTenant{} } -func (m *TxBillTenant) String() string { return proto.CompactTextString(m) } -func (*TxBillTenant) ProtoMessage() {} -func (*TxBillTenant) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{28} } - -func (m *TxBillTenant) GetBill() *Bill { - if m != nil { - return m.Bill - } - return nil -} - func init() { proto.RegisterType((*Genesis)(nil), "types.Genesis") proto.RegisterType((*Tx)(nil), "types.Tx") @@ -1234,8 +1272,6 @@ func init() { proto.RegisterType((*TxCreateLease)(nil), "types.TxCreateLease") proto.RegisterType((*Leases)(nil), "types.Leases") proto.RegisterType((*TxCloseLease)(nil), "types.TxCloseLease") - proto.RegisterType((*Bill)(nil), "types.Bill") - proto.RegisterType((*TxBillTenant)(nil), "types.TxBillTenant") proto.RegisterEnum("types.DeploymentGroup_DeploymentGroupState", DeploymentGroup_DeploymentGroupState_name, DeploymentGroup_DeploymentGroupState_value) proto.RegisterEnum("types.Deployment_DeploymentState", Deployment_DeploymentState_name, Deployment_DeploymentState_value) proto.RegisterEnum("types.TxCloseDeployment_ReasonCode", TxCloseDeployment_ReasonCode_name, TxCloseDeployment_ReasonCode_value) @@ -1598,8 +1634,8 @@ func (this *Order) Compare(that interface{}) int { } return 1 } - if this.Order != that1.Order { - if this.Order < that1.Order { + if this.Seq != that1.Seq { + if this.Seq < that1.Seq { return -1 } return 1 @@ -2015,7 +2051,7 @@ func (this *Order) GoString() string { s = append(s, "&types.Order{") s = append(s, "Deployment: "+fmt.Sprintf("%#v", this.Deployment)+",\n") s = append(s, "Group: "+fmt.Sprintf("%#v", this.Group)+",\n") - s = append(s, "Order: "+fmt.Sprintf("%#v", this.Order)+",\n") + s = append(s, "Seq: "+fmt.Sprintf("%#v", this.Seq)+",\n") s = append(s, "EndAt: "+fmt.Sprintf("%#v", this.EndAt)+",\n") s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n") s = append(s, "}") @@ -2025,11 +2061,12 @@ func (this *TxCreateOrder) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 5) + s := make([]string, 0, 8) s = append(s, "&types.TxCreateOrder{") - if this.Order != nil { - s = append(s, "Order: "+fmt.Sprintf("%#v", this.Order)+",\n") - } + s = append(s, "Deployment: "+fmt.Sprintf("%#v", this.Deployment)+",\n") + s = append(s, "Group: "+fmt.Sprintf("%#v", this.Group)+",\n") + s = append(s, "Seq: "+fmt.Sprintf("%#v", this.Seq)+",\n") + s = append(s, "EndAt: "+fmt.Sprintf("%#v", this.EndAt)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -2064,11 +2101,13 @@ func (this *TxCreateFulfillment) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 5) + s := make([]string, 0, 9) s = append(s, "&types.TxCreateFulfillment{") - if this.Fulfillment != nil { - s = append(s, "Fulfillment: "+fmt.Sprintf("%#v", this.Fulfillment)+",\n") - } + s = append(s, "Deployment: "+fmt.Sprintf("%#v", this.Deployment)+",\n") + s = append(s, "Group: "+fmt.Sprintf("%#v", this.Group)+",\n") + s = append(s, "Order: "+fmt.Sprintf("%#v", this.Order)+",\n") + s = append(s, "Provider: "+fmt.Sprintf("%#v", this.Provider)+",\n") + s = append(s, "Price: "+fmt.Sprintf("%#v", this.Price)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -2091,11 +2130,13 @@ func (this *TxCreateLease) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 5) + s := make([]string, 0, 9) s = append(s, "&types.TxCreateLease{") - if this.Lease != nil { - s = append(s, "Lease: "+fmt.Sprintf("%#v", this.Lease)+",\n") - } + s = append(s, "Deployment: "+fmt.Sprintf("%#v", this.Deployment)+",\n") + s = append(s, "Group: "+fmt.Sprintf("%#v", this.Group)+",\n") + s = append(s, "Order: "+fmt.Sprintf("%#v", this.Order)+",\n") + s = append(s, "Provider: "+fmt.Sprintf("%#v", this.Provider)+",\n") + s = append(s, "Price: "+fmt.Sprintf("%#v", this.Price)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -2121,28 +2162,6 @@ func (this *TxCloseLease) GoString() string { s = append(s, "}") return strings.Join(s, "") } -func (this *Bill) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.Bill{") - s = append(s, "Lease: "+fmt.Sprintf("%#v", this.Lease)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *TxBillTenant) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.TxBillTenant{") - if this.Bill != nil { - s = append(s, "Bill: "+fmt.Sprintf("%#v", this.Bill)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} func valueToGoStringTypes(v interface{}, typ string) string { rv := reflect.ValueOf(v) if rv.IsNil() { @@ -4561,9 +4580,9 @@ func (m *Order) Unmarshal(dAtA []byte) error { } case 3: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) } - m.Order = 0 + m.Seq = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -4573,7 +4592,7 @@ func (m *Order) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Order |= (uint64(b) & 0x7F) << shift + m.Seq |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } @@ -4668,9 +4687,9 @@ func (m *TxCreateOrder) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Deployment", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -4680,25 +4699,79 @@ func (m *TxCreateOrder) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } - if m.Order == nil { - m.Order = &Order{} - } - if err := m.Order.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Deployment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) + } + m.Group = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Group |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) + } + m.Seq = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seq |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EndAt", wireType) + } + m.EndAt = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.EndAt |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -5018,9 +5091,9 @@ func (m *TxCreateFulfillment) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fulfillment", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Deployment", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -5030,25 +5103,109 @@ func (m *TxCreateFulfillment) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } - if m.Fulfillment == nil { - m.Fulfillment = &Fulfillment{} + if err := m.Deployment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) } - if err := m.Fulfillment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Group = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Group |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) + } + m.Order = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Order |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Provider.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + m.Price = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Price |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -5287,9 +5444,9 @@ func (m *TxCreateLease) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Deployment", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -5299,80 +5456,27 @@ func (m *TxCreateLease) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } - if m.Lease == nil { - m.Lease = &Lease{} - } - if err := m.Lease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Deployment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Leases) 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 ErrIntOverflowTypes - } - 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: Leases: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Leases: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) } - var msglen int + m.Group = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -5382,76 +5486,33 @@ func (m *Leases) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + m.Group |= (uint64(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, &Lease{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TxCloseLease) 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 ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break + m.Order = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Order |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TxCloseLease: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TxCloseLease: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Provider", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -5475,10 +5536,29 @@ func (m *TxCloseLease) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Lease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Provider.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) + } + m.Price = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Price |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -5500,7 +5580,7 @@ func (m *TxCloseLease) Unmarshal(dAtA []byte) error { } return nil } -func (m *Bill) Unmarshal(dAtA []byte) error { +func (m *Leases) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5523,17 +5603,17 @@ func (m *Bill) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Bill: wiretype end group for non-group") + return fmt.Errorf("proto: Leases: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Bill: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Leases: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -5543,19 +5623,20 @@ func (m *Bill) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= (int(b) & 0x7F) << shift + msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Lease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Items = append(m.Items, &Lease{}) + if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5580,7 +5661,7 @@ func (m *Bill) Unmarshal(dAtA []byte) error { } return nil } -func (m *TxBillTenant) Unmarshal(dAtA []byte) error { +func (m *TxCloseLease) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5603,17 +5684,17 @@ func (m *TxBillTenant) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TxBillTenant: wiretype end group for non-group") + return fmt.Errorf("proto: TxCloseLease: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TxBillTenant: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TxCloseLease: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bill", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -5623,22 +5704,19 @@ func (m *TxBillTenant) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= (int(b) & 0x7F) << shift + byteLen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthTypes } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex > l { return io.ErrUnexpectedEOF } - if m.Bill == nil { - m.Bill = &Bill{} - } - if err := m.Bill.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Lease.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5771,93 +5849,91 @@ var ( func init() { proto.RegisterFile("types/types.proto", fileDescriptorTypes) } var fileDescriptorTypes = []byte{ - // 1405 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0xae, 0xbd, 0x4e, 0xfc, 0x6c, 0xb7, 0x9b, 0x69, 0x54, 0x4c, 0x85, 0x92, 0xb2, 0x1c, - 0x88, 0x44, 0x13, 0x97, 0x94, 0x7f, 0xa5, 0x15, 0xaa, 0xed, 0x38, 0x75, 0x68, 0x70, 0xa2, 0x89, - 0xdb, 0x2b, 0x5a, 0xdb, 0x93, 0x74, 0x95, 0xf5, 0xae, 0xbb, 0xbb, 0x2e, 0xc9, 0x91, 0x23, 0xe2, - 0x13, 0x70, 0x83, 0x1b, 0x47, 0xce, 0xfd, 0x04, 0x48, 0x5c, 0x38, 0x56, 0x1c, 0x8a, 0x5a, 0x21, - 0xc1, 0x91, 0x8f, 0x80, 0xe6, 0xcd, 0x8c, 0x77, 0xd7, 0x76, 0xa1, 0x75, 0x83, 0x90, 0xb8, 0x58, - 0xf3, 0xde, 0xbc, 0xf7, 0xe6, 0xbd, 0xdf, 0xfb, 0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, - 0x34, 0x02, 0x66, 0x47, 0x6c, 0x8b, 0x0d, 0x5d, 0xff, 0x74, 0xc0, 0xbc, 0x48, 0x7a, 0xf2, 0xfa, - 0x58, 0x69, 0x52, 0xa0, 0x95, 0xa1, 0x33, 0xd4, 0xc8, 0x4d, 0x28, 0x2b, 0xee, 0x5e, 0xd0, 0x67, - 0x41, 0x25, 0x87, 0x76, 0x96, 0x27, 0xec, 0xe0, 0x5e, 0x2b, 0x43, 0xd3, 0xc2, 0xa4, 0x0d, 0x17, - 0x14, 0x63, 0x7b, 0xe4, 0x1e, 0x3a, 0xae, 0x8b, 0xbe, 0x18, 0x68, 0xe3, 0xd2, 0x84, 0x8d, 0x84, - 0x44, 0x2b, 0x43, 0x67, 0x29, 0x26, 0xbd, 0xd9, 0x65, 0x76, 0xc8, 0x2a, 0xf9, 0x99, 0xde, 0xe0, - 0x5e, 0xd2, 0x1b, 0x64, 0x90, 0x26, 0x98, 0x8a, 0xb1, 0x1f, 0xf8, 0x0f, 0x1d, 0x1e, 0xce, 0x02, - 0x1a, 0x78, 0x6d, 0xc2, 0x80, 0xda, 0x6e, 0x65, 0xe8, 0x94, 0x0a, 0x69, 0xc1, 0x52, 0x74, 0xd2, - 0x70, 0xfd, 0x30, 0x09, 0xef, 0x22, 0xda, 0xa9, 0xc4, 0x76, 0xd2, 0xfb, 0xad, 0x0c, 0x9d, 0x56, - 0x22, 0xd7, 0xa1, 0x24, 0x99, 0x22, 0x9a, 0x02, 0x1a, 0xb9, 0x90, 0x36, 0xa2, 0x82, 0x49, 0x89, - 0xd6, 0x0b, 0xe3, 0x1a, 0xb3, 0xbe, 0xd6, 0x60, 0x41, 0x16, 0x30, 0xf9, 0x14, 0x16, 0xec, 0x7e, - 0x3f, 0x60, 0x61, 0x28, 0xca, 0xb5, 0x7e, 0x95, 0x17, 0xda, 0x2f, 0x4f, 0x56, 0xd7, 0x12, 0x5d, - 0xe3, 0x3f, 0x0c, 0x7a, 0xee, 0x71, 0xd5, 0x3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 0xf8, 0xd9, 0x8a, 0xd6, 0xcd, 0xe3, 0x9f, 0x45, 0xd7, 0xfe, - 0x0a, 0x00, 0x00, 0xff, 0xff, 0x6d, 0xf6, 0xdb, 0x27, 0x77, 0x12, 0x00, 0x00, + // 1365 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xae, 0xbd, 0xeb, 0xf8, 0xc5, 0x6e, 0x37, 0x53, 0xab, 0x98, 0x0a, 0xa5, 0x65, 0x39, + 0x10, 0x89, 0x26, 0x29, 0xa9, 0xf8, 0x53, 0x5a, 0xa1, 0x3a, 0x8e, 0x53, 0x07, 0x82, 0x13, 0x4d, + 0xdc, 0x5e, 0xd1, 0xc6, 0x9e, 0xa4, 0x56, 0xec, 0x5d, 0x77, 0x77, 0x1d, 0xe2, 0x8f, 0x80, 0xf8, + 0x04, 0x9c, 0x80, 0x1b, 0x47, 0xce, 0xfd, 0x04, 0x48, 0x5c, 0x38, 0x56, 0x1c, 0x8a, 0x5a, 0x21, + 0xc1, 0x11, 0x4e, 0x9c, 0x90, 0xd0, 0xbc, 0x99, 0xd9, 0x3f, 0xb6, 0x0b, 0xad, 0x1b, 0x10, 0x2a, + 0x17, 0x6b, 0xde, 0x9b, 0x79, 0x6f, 0xde, 0xfb, 0xcd, 0xef, 0xbd, 0x9d, 0x31, 0x2c, 0x84, 0xa3, + 0x01, 0x0b, 0x56, 0xf1, 0x77, 0x65, 0xe0, 0x7b, 0xa1, 0x47, 0x0c, 0x14, 0x2e, 0x2c, 0x1f, 0x76, + 0xc3, 0xbb, 0xc3, 0xfd, 0x95, 0xb6, 0xd7, 0x5f, 0x3d, 0xf4, 0x0e, 0xbd, 0x55, 0x9c, 0xdd, 0x1f, + 0x1e, 0xa0, 0x84, 0x02, 0x8e, 0x84, 0x95, 0x7d, 0x1d, 0xf2, 0x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x6e, 0x93, 0xfb, 0xca, + 0x78, 0x71, 0x19, 0x8f, 0x14, 0xab, 0x54, 0x6e, 0x28, 0x04, 0xae, 0x1d, 0xf8, 0x5d, 0x19, 0x7f, + 0x89, 0x0a, 0x41, 0xee, 0x58, 0x83, 0x85, 0x09, 0x08, 0x78, 0x80, 0xae, 0xd3, 0x17, 0x5f, 0x87, + 0x02, 0xc5, 0x31, 0x77, 0x72, 0xec, 0xf4, 0x86, 0xa2, 0x52, 0x0b, 0x54, 0x08, 0xd2, 0xc9, 0xa7, + 0x1a, 0x14, 0x30, 0xde, 0xbd, 0x01, 0x6b, 0x93, 0x75, 0x28, 0xfa, 0xec, 0xde, 0xb0, 0xeb, 0x33, + 0xde, 0x82, 0x14, 0x07, 0xfe, 0x0e, 0xf0, 0x94, 0x0d, 0x79, 0x17, 0x0a, 0xbe, 0x4c, 0x52, 0x9d, + 0x58, 0x79, 0x2c, 0x79, 0xdc, 0x50, 0x31, 0x29, 0x5a, 0x6c, 0x7f, 0x99, 0x85, 0xb3, 0x71, 0x03, + 0x14, 0x28, 0xee, 0x02, 0x74, 0xe2, 0x46, 0x3a, 0x2b, 0x9b, 0x12, 0x3e, 0xf8, 0x61, 0x07, 0xec, + 0x9e, 0xec, 0x5a, 0x7c, 0x48, 0x2e, 0xc0, 0x9c, 0xc7, 0xbf, 0x48, 0xad, 0xd6, 0x36, 0xe2, 0x9c, + 0xa5, 0x91, 0x4c, 0xaa, 0x60, 0x04, 0xa1, 0x13, 0x32, 0xfc, 0xb4, 0x9d, 0x59, 0x7b, 0x43, 0x66, + 0x32, 0x16, 0xe6, 0xb8, 0xbc, 0xc7, 0x4d, 0xa8, 0xb0, 0x9c, 0x00, 0xd5, 0x78, 0x5e, 0x50, 0xcd, + 0x67, 0x01, 0x75, 0x13, 0xca, 0xd3, 0x82, 0x23, 0x73, 0x90, 0xdb, 0xd9, 0xad, 0x37, 0xad, 0x0c, + 0x99, 0x87, 0xfc, 0x0e, 0xdd, 0xa8, 0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0xd4, 0xd3, 0x33, 0xe7, 0x77, 0x0d, 0xce, 0x4d, 0x79, 0x07, 0xbe, 0xf8, 0x88, + 0xdb, 0xdf, 0xe9, 0x60, 0x88, 0xe7, 0xe9, 0x8b, 0xcf, 0xae, 0xe5, 0x34, 0xbb, 0x54, 0x17, 0xc2, + 0xf4, 0xc5, 0x6f, 0x8a, 0x51, 0x6f, 0x02, 0xc4, 0xca, 0xa7, 0xfa, 0xc8, 0xda, 0xbf, 0x25, 0x3a, + 0xd0, 0xff, 0x04, 0x55, 0xde, 0xd3, 0x30, 0xd5, 0x27, 0xf6, 0x34, 0x9c, 0x55, 0x3d, 0xed, 0x0e, + 0x14, 0x93, 0x7f, 0x2c, 0xf0, 0x67, 0x5c, 0x0f, 0xff, 0x7c, 0x98, 0xf9, 0x19, 0x87, 0xe6, 0xeb, + 0xd6, 0x83, 0x47, 0x8b, 0xda, 0xaf, 0x8f, 0x16, 0xb5, 0xef, 0x1f, 0x2f, 0x6a, 0x0f, 0x1e, 0x2f, + 0x6a, 0xfb, 0x26, 0xfe, 0x01, 0x77, 0xf5, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1d, 0x98, 0x53, + 0x39, 0xcb, 0x13, 0x00, 0x00, } diff --git a/types/types.proto b/types/types.proto index 70b86d723e..773a761bf1 100644 --- a/types/types.proto +++ b/types/types.proto @@ -184,7 +184,7 @@ message Order { uint64 group = 2; // order sequence - uint64 order = 3; + uint64 seq = 3; /* END ID FIELDS */ @@ -200,7 +200,19 @@ message Order { } message TxCreateOrder { - Order order = 1; + // deployment address + bytes deployment = 1 [(gogoproto.customtype)="github.com/ovrclk/akash/types/base.Bytes",(gogoproto.nullable) = false]; + + // deployment group sequence + uint64 group = 2; + + // order sequence + uint64 seq = 3; + + /* END ID FIELDS */ + + // maximum block number order can be open + int64 endAt = 4; } message Orders { @@ -237,7 +249,23 @@ message Fulfillment { } message TxCreateFulfillment { - Fulfillment fulfillment = 1; + /* BEGIN ID FIELDS */ + + // deployment address + bytes deployment = 1 [(gogoproto.customtype)="github.com/ovrclk/akash/types/base.Bytes",(gogoproto.nullable) = false]; + + // deployment group sequence + uint64 group = 2; + + // order sequence + uint64 order = 3; + + // provider address + bytes provider = 4 [(gogoproto.customtype)="github.com/ovrclk/akash/types/base.Bytes",(gogoproto.nullable) = false]; + + uint32 price = 5; + + /* END ID FIELDS */ } message Lease { @@ -269,7 +297,24 @@ message Lease { } message TxCreateLease { - Lease lease = 1; + /* BEGIN ID FIELDS */ + + // deployment address + bytes deployment = 1 [(gogoproto.customtype)="github.com/ovrclk/akash/types/base.Bytes",(gogoproto.nullable) = false]; + + // deployment group sequence + uint64 group = 2; + + // order sequence + uint64 order = 3; + + // provider address + bytes provider = 4 [(gogoproto.customtype)="github.com/ovrclk/akash/types/base.Bytes",(gogoproto.nullable) = false]; + + // price of matching fulfillment + uint32 price = 5; + + /* END ID FIELDS */ } message Leases { @@ -281,13 +326,4 @@ message TxCloseLease { bytes lease = 1 [(gogoproto.customtype)="github.com/ovrclk/akash/types/base.Bytes",(gogoproto.nullable) = false]; } -message Bill { - // lease address - bytes lease = 1 [(gogoproto.customtype)="github.com/ovrclk/akash/types/base.Bytes",(gogoproto.nullable) = false]; -} - -message TxBillTenant { - Bill bill = 1; -} - /* END EXCHANGE */