diff --git a/app/fulfillment/app.go b/app/fulfillment/app.go index 1c1fd1c04b..2259dfd5fd 100644 --- a/app/fulfillment/app.go +++ b/app/fulfillment/app.go @@ -36,6 +36,8 @@ func (a *app) AcceptTx(ctx apptypes.Context, tx interface{}) bool { switch tx.(type) { case *types.TxPayload_TxCreateFulfillment: return true + case *types.TxPayload_TxCloseFulfillment: + return true } return false } @@ -43,7 +45,10 @@ func (a *app) AcceptTx(ctx apptypes.Context, tx interface{}) bool { func (a *app) CheckTx(ctx apptypes.Context, tx interface{}) tmtypes.ResponseCheckTx { switch tx := tx.(type) { case *types.TxPayload_TxCreateFulfillment: - return a.doCheckTx(ctx, tx.TxCreateFulfillment) + return a.doCheckCreateTx(ctx, tx.TxCreateFulfillment) + case *types.TxPayload_TxCloseFulfillment: + _, resp := a.doCheckCloseTx(ctx, tx.TxCloseFulfillment) + return resp } return tmtypes.ResponseCheckTx{ Code: code.UNKNOWN_TRANSACTION, @@ -54,7 +59,9 @@ func (a *app) CheckTx(ctx apptypes.Context, tx interface{}) tmtypes.ResponseChec func (a *app) DeliverTx(ctx apptypes.Context, tx interface{}) tmtypes.ResponseDeliverTx { switch tx := tx.(type) { case *types.TxPayload_TxCreateFulfillment: - return a.doDeliverTx(ctx, tx.TxCreateFulfillment) + return a.doDeliverCreateTx(ctx, tx.TxCreateFulfillment) + case *types.TxPayload_TxCloseFulfillment: + return a.doDeliverCloseTx(ctx, tx.TxCloseFulfillment) } return tmtypes.ResponseDeliverTx{ Code: code.UNKNOWN_TRANSACTION, @@ -87,7 +94,7 @@ func (a *app) Query(req tmtypes.RequestQuery) tmtypes.ResponseQuery { return a.doQuery(*key) } -func (a *app) doCheckTx(ctx apptypes.Context, tx *types.TxCreateFulfillment) tmtypes.ResponseCheckTx { +func (a *app) doCheckCreateTx(ctx apptypes.Context, tx *types.TxCreateFulfillment) tmtypes.ResponseCheckTx { if tx.Deployment == nil { return tmtypes.ResponseCheckTx{ @@ -207,8 +214,8 @@ func (a *app) doCheckTx(ctx apptypes.Context, tx *types.TxCreateFulfillment) tmt return tmtypes.ResponseCheckTx{} } -func (a *app) doDeliverTx(ctx apptypes.Context, tx *types.TxCreateFulfillment) tmtypes.ResponseDeliverTx { - cresp := a.doCheckTx(ctx, tx) +func (a *app) doDeliverCreateTx(ctx apptypes.Context, tx *types.TxCreateFulfillment) tmtypes.ResponseDeliverTx { + cresp := a.doCheckCreateTx(ctx, tx) if !cresp.IsOK() { return tmtypes.ResponseDeliverTx{ Code: cresp.Code, @@ -237,6 +244,93 @@ func (a *app) doDeliverTx(ctx apptypes.Context, tx *types.TxCreateFulfillment) t } } +func (a *app) doCheckCloseTx(ctx apptypes.Context, tx *types.TxCloseFulfillment) (*types.Fulfillment, tmtypes.ResponseCheckTx) { + + // lookup fulfillment + fulfillment, err := a.State().Fulfillment().GetByKey(tx.Fulfillment) + if err != nil { + return nil, tmtypes.ResponseCheckTx{ + Code: code.ERROR, + Log: err.Error(), + } + } + if fulfillment == nil { + return nil, tmtypes.ResponseCheckTx{ + Code: code.INVALID_TRANSACTION, + Log: "fulfillment not found", + } + } + if fulfillment.State != types.Fulfillment_OPEN { + return nil, tmtypes.ResponseCheckTx{ + Code: code.INVALID_TRANSACTION, + Log: "fulfillment not open", + } + } + + // ensure provider exists + provider, err := a.State().Provider().Get(fulfillment.Provider) + if err != nil { + return nil, tmtypes.ResponseCheckTx{ + Code: code.ERROR, + Log: err.Error(), + } + } + if provider == nil { + return nil, tmtypes.ResponseCheckTx{ + Code: code.INVALID_TRANSACTION, + Log: "Provider not found", + } + } + + // ensure ownder exists + owner, err := a.State().Account().Get(provider.Owner) + if err != nil { + return nil, tmtypes.ResponseCheckTx{ + Code: code.ERROR, + Log: err.Error(), + } + } + if owner == nil { + return nil, tmtypes.ResponseCheckTx{ + Code: code.INVALID_TRANSACTION, + Log: "Owner not found", + } + } + + // ensure tx signed by provider + if !bytes.Equal(ctx.Signer().Address(), owner.Address) { + return nil, tmtypes.ResponseCheckTx{ + Code: code.INVALID_TRANSACTION, + Log: "Not signed by provider", + } + } + + return fulfillment, tmtypes.ResponseCheckTx{} +} + +func (a *app) doDeliverCloseTx(ctx apptypes.Context, tx *types.TxCloseFulfillment) tmtypes.ResponseDeliverTx { + fulfillment, cresp := a.doCheckCloseTx(ctx, tx) + if !cresp.IsOK() { + return tmtypes.ResponseDeliverTx{ + Code: cresp.Code, + Log: cresp.Log, + } + } + + fulfillment.State = types.Fulfillment_CLOSED + + if err := a.State().Fulfillment().Save(fulfillment); err != nil { + return tmtypes.ResponseDeliverTx{ + Code: code.INVALID_TRANSACTION, + Log: err.Error(), + } + } + + return tmtypes.ResponseDeliverTx{ + Tags: apptypes.NewTags(a.Name(), apptypes.TxTypeCloseFulfillment), + } +} + func (a *app) doQuery(key base.Bytes) tmtypes.ResponseQuery { ful, err := a.State().Fulfillment().GetByKey(key) diff --git a/app/fulfillment/app_test.go b/app/fulfillment/app_test.go index 9bf12cbe97..f1bfb466de 100644 --- a/app/fulfillment/app_test.go +++ b/app/fulfillment/app_test.go @@ -16,6 +16,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" tmtypes "github.com/tendermint/abci/types" + crypto "github.com/tendermint/go-crypto" ) func TestAcceptQuery(t *testing.T) { @@ -68,23 +69,42 @@ func TestValidTx(t *testing.T) { testutil.CreateOrder(t, oapp, taccount, &tkey, deployment.Address, groupSeq, oSeq) price := uint32(0) + fulfillment := createFulfillment(t, app, provider, &pkey, daddress, groupSeq, oSeq, price) + closeFulfillment(t, app, &pkey, fulfillment) +} + +func createFulfillment(t *testing.T, app apptypes.Application, provider *types.Provider, + pkey *crypto.PrivKey, deployment []byte, groupSeq uint64, oSeq uint64, price uint32) *types.Fulfillment { // create fulfillment - fulfillment := testutil.CreateFulfillment(t, app, provider.Address, &pkey, daddress, groupSeq, oSeq, price) + fulfillment := testutil.CreateFulfillment(t, app, provider.Address, pkey, deployment, groupSeq, oSeq, price) + + path := query.FulfillmentPath(fulfillment.Deployment, fulfillment.Group, fulfillment.Order, fulfillment.Provider) + resp := app.Query(tmtypes.RequestQuery{Path: path}) + assert.Empty(t, resp.Log) + require.True(t, resp.IsOK()) + ful := new(types.Fulfillment) + require.NoError(t, ful.Unmarshal(resp.Value)) + + assert.Equal(t, fulfillment.Deployment, ful.Deployment) + assert.Equal(t, fulfillment.Group, ful.Group) + assert.Equal(t, fulfillment.Order, ful.Order) + assert.Equal(t, fulfillment.Provider, ful.Provider) + assert.Equal(t, fulfillment.Price, ful.Price) + assert.Equal(t, fulfillment.State, ful.State) + + return fulfillment +} - { - path := query.FulfillmentPath(fulfillment.Deployment, fulfillment.Group, fulfillment.Order, fulfillment.Provider) - resp := app.Query(tmtypes.RequestQuery{Path: path}) - assert.Empty(t, resp.Log) - require.True(t, resp.IsOK()) - ful := new(types.Fulfillment) - require.NoError(t, ful.Unmarshal(resp.Value)) - - assert.Equal(t, fulfillment.Deployment, ful.Deployment) - assert.Equal(t, fulfillment.Group, ful.Group) - assert.Equal(t, fulfillment.Order, ful.Order) - assert.Equal(t, fulfillment.Provider, ful.Provider) - assert.Equal(t, fulfillment.Price, ful.Price) - } +func closeFulfillment(t *testing.T, app apptypes.Application, key *crypto.PrivKey, fulfillment *types.Fulfillment) { + testutil.CloseFulfillment(t, app, key, fulfillment) + path := query.FulfillmentPath(fulfillment.Deployment, fulfillment.Group, fulfillment.Order, fulfillment.Provider) + resp := app.Query(tmtypes.RequestQuery{Path: path}) + assert.Empty(t, resp.Log) + require.True(t, resp.IsOK()) + ful := new(types.Fulfillment) + require.NoError(t, ful.Unmarshal(resp.Value)) + + assert.Equal(t, types.Fulfillment_CLOSED, ful.State) } func TestTx_BadTxType(t *testing.T) { diff --git a/app/market/engine.go b/app/market/engine.go index e3c7ec0366..2fcb894669 100644 --- a/app/market/engine.go +++ b/app/market/engine.go @@ -170,12 +170,21 @@ func BestFulfillment(state state.State, order *types.Order) (*types.Fulfillment, // match with cheapest order bestMatch := 0 + found := false for i, fulfillment := range fulfillments { - if fulfillment.Price < fulfillments[bestMatch].Price { - bestMatch = i + if fulfillment.State == types.Fulfillment_OPEN { + found = true + if fulfillment.Price < fulfillments[bestMatch].Price { + bestMatch = i + } } } + // no orders to match + if !found { + return nil, nil + } + return fulfillments[bestMatch], nil } diff --git a/app/types/tags.go b/app/types/tags.go index a199f9b1fa..625057a5ff 100644 --- a/app/types/tags.go +++ b/app/types/tags.go @@ -22,10 +22,10 @@ const ( TagAppFulfillment = "fulfillment" TxTypeCreateFulfillment = "fulfillment-create" + TxTypeCloseFulfillment = "fulfillment-close" TagAppLease = "lease" TxTypeCreateLease = "lease-create" - TxTypeCloseLease = "lease-close" TagAppProvider = "provider" TxTypeProviderCreate = "provider-create" diff --git a/cmd/akash/marketplace.go b/cmd/akash/marketplace.go index 768d35c1e6..cb18b52bbc 100644 --- a/cmd/akash/marketplace.go +++ b/cmd/akash/marketplace.go @@ -58,7 +58,10 @@ func marketplaceMonitorHandler() marketplace.Handler { X(tx.Provider), tx.Price) }). OnTxCloseDeployment(func(tx *types.TxCloseDeployment) { - fmt.Printf("DEPLOYMENT CLOSED\t%v", X(tx.Deployment)) + fmt.Printf("DEPLOYMENT CLOSED\t%v\n", X(tx.Deployment)) + }). + OnTxCloseFulfillment(func(tx *types.TxCloseFulfillment) { + fmt.Printf("FULFILLMENT CLOSED\t%v\n", X(tx.Fulfillment)) }). Create() } diff --git a/cmd/akash/provider.go b/cmd/akash/provider.go index 03cc06d2c5..55e03b2503 100644 --- a/cmd/akash/provider.go +++ b/cmd/akash/provider.go @@ -35,6 +35,7 @@ func providerCommand() *cobra.Command { cmd.AddCommand(createProviderCommand()) cmd.AddCommand(runCommand()) + cmd.AddCommand(closeFulfillmentCommand()) return cmd } @@ -187,6 +188,9 @@ func doProviderRunCommand(ctx context.Context, cmd *cobra.Command, args []string fmt.Printf("Bidding on order: %v/%v/%v\n", X(tx.Deployment), tx.Group, tx.Seq) + fmt.Printf("Fulfillment: %v\n", + X(state.FulfillmentID(tx.Deployment, tx.Group, tx.Seq, *provider))) + txbuf, err := txutil.BuildTx(signer, nonce, ordertx) if err != nil { ctx.Log().Error("error building tx", "error", err) @@ -244,3 +248,54 @@ func getPrice(ctx context.Context, addr base.Bytes, seq uint64) (uint32, error) } return price, nil } + +func closeFulfillmentCommand() *cobra.Command { + + cmd := &cobra.Command{ + Use: "closef", + Short: "close an open fulfillment", + Args: cobra.ExactArgs(1), + RunE: context.WithContext(context.RequireNode(doCloseFulfillmentCommand)), + } + + context.AddFlagKeyType(cmd, cmd.Flags()) + + return cmd +} + +func doCloseFulfillmentCommand(ctx context.Context, cmd *cobra.Command, args []string) error { + signer, _, err := ctx.Signer() + if err != nil { + return err + } + + nonce, err := ctx.Nonce() + if err != nil { + return err + } + + fulfillment := new(base.Bytes) + if err := fulfillment.DecodeString(args[0]); err != nil { + return err + } + + tx, err := txutil.BuildTx(signer, nonce, &types.TxCloseFulfillment{ + Fulfillment: *fulfillment, + }) + if err != nil { + return err + } + + result, err := ctx.Client().BroadcastTxCommit(tx) + if err != nil { + return err + } + if result.CheckTx.IsErr() { + return errors.New(result.CheckTx.GetLog()) + } + if result.DeliverTx.IsErr() { + return errors.New(result.DeliverTx.GetLog()) + } + + return nil +} diff --git a/marketplace/handler.go b/marketplace/handler.go index 43abaad795..cf1f651f39 100644 --- a/marketplace/handler.go +++ b/marketplace/handler.go @@ -12,6 +12,7 @@ type Handler interface { OnTxCreateFulfillment(*types.TxCreateFulfillment) OnTxCreateLease(*types.TxCreateLease) OnTxCloseDeployment(*types.TxCloseDeployment) + OnTxCloseFulfillment(*types.TxCloseFulfillment) } type handler struct { @@ -22,6 +23,7 @@ type handler struct { onTxCreateFulfillment func(*types.TxCreateFulfillment) onTxCreateLease func(*types.TxCreateLease) onTxCloseDeployment func(*types.TxCloseDeployment) + onTxCloseFulfillment func(*types.TxCloseFulfillment) } func (h handler) OnTxSend(tx *types.TxSend) { @@ -66,6 +68,12 @@ func (h handler) OnTxCloseDeployment(tx *types.TxCloseDeployment) { } } +func (h handler) OnTxCloseFulfillment(tx *types.TxCloseFulfillment) { + if h.onTxCloseFulfillment != nil { + h.onTxCloseFulfillment(tx) + } +} + type Builder interface { OnTxSend(func(*types.TxSend)) Builder OnTxCreateProvider(func(*types.TxCreateProvider)) Builder @@ -74,6 +82,7 @@ type Builder interface { OnTxCreateFulfillment(func(*types.TxCreateFulfillment)) Builder OnTxCreateLease(func(*types.TxCreateLease)) Builder OnTxCloseDeployment(func(*types.TxCloseDeployment)) Builder + OnTxCloseFulfillment(func(*types.TxCloseFulfillment)) Builder Create() Handler } @@ -118,6 +127,11 @@ func (b *builder) OnTxCloseDeployment(fn func(*types.TxCloseDeployment)) Builder return b } +func (b *builder) OnTxCloseFulfillment(fn func(*types.TxCloseFulfillment)) Builder { + b.onTxCloseFulfillment = fn + return b +} + func (b *builder) Create() Handler { return (handler)(*b) } diff --git a/marketplace/handler_test.go b/marketplace/handler_test.go index ee63e61ed3..dadc29705a 100644 --- a/marketplace/handler_test.go +++ b/marketplace/handler_test.go @@ -24,6 +24,7 @@ func TestHandler(t *testing.T) { h.OnTxCreateFulfillment(nil) h.OnTxCreateLease(nil) h.OnTxCloseDeployment(nil) + h.OnTxCloseFulfillment(nil) assert.False(t, called, "OnTxSend") } @@ -41,6 +42,7 @@ func TestHandler(t *testing.T) { h.OnTxCreateFulfillment(nil) h.OnTxCreateLease(nil) h.OnTxCloseDeployment(nil) + h.OnTxCloseFulfillment(nil) assert.False(t, called, "OnTxCreateProvider") } @@ -58,6 +60,7 @@ func TestHandler(t *testing.T) { h.OnTxCreateFulfillment(nil) h.OnTxCreateLease(nil) h.OnTxCloseDeployment(nil) + h.OnTxCloseFulfillment(nil) assert.False(t, called, "OnTxCreateDeployment") } @@ -75,6 +78,7 @@ func TestHandler(t *testing.T) { h.OnTxCreateFulfillment(nil) h.OnTxCreateLease(nil) h.OnTxCloseDeployment(nil) + h.OnTxCloseFulfillment(nil) assert.False(t, called, "OnTxCreateOrder") } @@ -92,6 +96,7 @@ func TestHandler(t *testing.T) { h.OnTxCreateOrder(nil) h.OnTxCreateLease(nil) h.OnTxCloseDeployment(nil) + h.OnTxCloseFulfillment(nil) assert.False(t, called, "OnTxCreateFulfillment") } @@ -109,6 +114,7 @@ func TestHandler(t *testing.T) { h.OnTxCreateOrder(nil) h.OnTxCreateFulfillment(nil) h.OnTxCloseDeployment(nil) + h.OnTxCloseFulfillment(nil) assert.False(t, called, "OnTxCreateLease") } @@ -126,6 +132,25 @@ func TestHandler(t *testing.T) { h.OnTxCreateOrder(nil) h.OnTxCreateFulfillment(nil) h.OnTxCreateLease(nil) + h.OnTxCloseFulfillment(nil) assert.False(t, called, "OnTxCloseDeployment") } + + { + called := false + h := marketplace.NewBuilder().OnTxCloseFulfillment(func(_ *types.TxCloseFulfillment) { + called = true + }).Create() + h.OnTxCloseFulfillment(nil) + assert.True(t, called, "OnTxCloseFulfillment") + called = false + h.OnTxSend(nil) + h.OnTxCreateProvider(nil) + h.OnTxCreateDeployment(nil) + h.OnTxCreateOrder(nil) + h.OnTxCreateFulfillment(nil) + h.OnTxCreateLease(nil) + h.OnTxCloseDeployment(nil) + assert.False(t, called, "OnTxCloseFulfillment") + } } diff --git a/marketplace/mocks/handler.go b/marketplace/mocks/handler.go index 6b96054829..9068298512 100644 --- a/marketplace/mocks/handler.go +++ b/marketplace/mocks/handler.go @@ -14,6 +14,11 @@ func (_m *Handler) OnTxCloseDeployment(_a0 *types.TxCloseDeployment) { _m.Called(_a0) } +// OnTxCloseFulfillment provides a mock function with given fields: _a0 +func (_m *Handler) OnTxCloseFulfillment(_a0 *types.TxCloseFulfillment) { + _m.Called(_a0) +} + // OnTxCreateDeployment provides a mock function with given fields: _a0 func (_m *Handler) OnTxCreateDeployment(_a0 *types.TxCreateDeployment) { _m.Called(_a0) diff --git a/marketplace/monitor.go b/marketplace/monitor.go index 2d4b2b71cf..be0eaa8e19 100644 --- a/marketplace/monitor.go +++ b/marketplace/monitor.go @@ -96,6 +96,8 @@ func (m *monitor) runListener(ch <-chan interface{}, h Handler) { h.OnTxCreateLease(tx.TxCreateLease) case *types.TxPayload_TxCloseDeployment: h.OnTxCloseDeployment(tx.TxCloseDeployment) + case *types.TxPayload_TxCloseFulfillment: + h.OnTxCloseFulfillment(tx.TxCloseFulfillment) } } } diff --git a/marketplace/monitor_test.go b/marketplace/monitor_test.go index 3c75abae26..36e63879cc 100644 --- a/marketplace/monitor_test.go +++ b/marketplace/monitor_test.go @@ -32,6 +32,7 @@ func TestMonitorMarketplace(t *testing.T) { {"OnTxCreateFulfillment", &types.TxCreateFulfillment{}}, {"OnTxCreateLease", &types.TxCreateLease{}}, {"OnTxCloseDeployment", &types.TxCloseDeployment{}}, + {"OnTxCloseFulfillment", &types.TxCloseFulfillment{}}, } ctx := context.Background() diff --git a/testutil/fulfillment.go b/testutil/fulfillment.go index 425e4c834a..af5a07678b 100644 --- a/testutil/fulfillment.go +++ b/testutil/fulfillment.go @@ -5,6 +5,7 @@ import ( "testing" apptypes "github.com/ovrclk/akash/app/types" + "github.com/ovrclk/akash/state" "github.com/ovrclk/akash/types" "github.com/ovrclk/akash/types/base" "github.com/stretchr/testify/assert" @@ -40,6 +41,31 @@ func CreateFulfillment(t *testing.T, app apptypes.Application, provider base.Byt return fulfillment } +func CloseFulfillment(t *testing.T, app apptypes.Application, key *crypto.PrivKey, fulfillment *types.Fulfillment) base.Bytes { + faddr := state.FulfillmentID(fulfillment.Deployment, fulfillment.Group, fulfillment.Order, fulfillment.Provider) + + tx := &types.TxPayload_TxCloseFulfillment{ + TxCloseFulfillment: &types.TxCloseFulfillment{ + Fulfillment: faddr, + }, + } + + ctx := apptypes.NewContext(&types.Tx{ + Key: key.PubKey().Bytes(), + Payload: types.TxPayload{ + Payload: tx, + }, + }) + + assert.True(t, app.AcceptTx(ctx, tx)) + cresp := app.CheckTx(ctx, tx) + assert.True(t, cresp.IsOK()) + dresp := app.DeliverTx(ctx, tx) + assert.Len(t, dresp.Log, 0, fmt.Sprint("Log should be empty but is: ", dresp.Log)) + assert.True(t, dresp.IsOK()) + return faddr +} + func Fulfillment(provider base.Bytes, deplyment base.Bytes, group, order uint64, price uint32) *types.Fulfillment { fulfillment := &types.Fulfillment{ Deployment: deplyment, diff --git a/txutil/builder.go b/txutil/builder.go index 684027c335..89f82b3349 100644 --- a/txutil/builder.go +++ b/txutil/builder.go @@ -43,6 +43,8 @@ func NewTxBuilder(nonce uint64, payload interface{}) (TxBuilder, error) { tx.Payload.Payload = &types.TxPayload_TxCreateLease{TxCreateLease: payload} case *types.TxCloseDeployment: tx.Payload.Payload = &types.TxPayload_TxCloseDeployment{TxCloseDeployment: payload} + case *types.TxCloseFulfillment: + tx.Payload.Payload = &types.TxPayload_TxCloseFulfillment{TxCloseFulfillment: payload} default: return nil, fmt.Errorf("unknown payload type: %T", payload) } diff --git a/types/types.pb.go b/types/types.pb.go index 7226544bbe..6602aa8659 100644 --- a/types/types.pb.go +++ b/types/types.pb.go @@ -31,6 +31,7 @@ Orders Fulfillment TxCreateFulfillment + TxCloseFulfillment Lease TxCreateLease Leases @@ -204,7 +205,7 @@ var Lease_LeaseState_value = map[string]int32{ func (x Lease_LeaseState) String() string { return proto.EnumName(Lease_LeaseState_name, int32(x)) } -func (Lease_LeaseState) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{23, 0} } +func (Lease_LeaseState) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{24, 0} } // BEGIN GLOBAL type Genesis struct { @@ -265,6 +266,7 @@ type TxPayload struct { // *TxPayload_TxCreateLease // *TxPayload_TxCreateProvider // *TxPayload_TxCloseDeployment + // *TxPayload_TxCloseFulfillment Payload isTxPayload_Payload `protobuf_oneof:"payload"` } @@ -298,6 +300,9 @@ type TxPayload_TxCreateProvider struct { type TxPayload_TxCloseDeployment struct { TxCloseDeployment *TxCloseDeployment `protobuf:"bytes,8,opt,name=txCloseDeployment,oneof"` } +type TxPayload_TxCloseFulfillment struct { + TxCloseFulfillment *TxCloseFulfillment `protobuf:"bytes,9,opt,name=txCloseFulfillment,oneof"` +} func (*TxPayload_TxSend) isTxPayload_Payload() {} func (*TxPayload_TxCreateDeployment) isTxPayload_Payload() {} @@ -306,6 +311,7 @@ func (*TxPayload_TxCreateFulfillment) isTxPayload_Payload() {} func (*TxPayload_TxCreateLease) isTxPayload_Payload() {} func (*TxPayload_TxCreateProvider) isTxPayload_Payload() {} func (*TxPayload_TxCloseDeployment) isTxPayload_Payload() {} +func (*TxPayload_TxCloseFulfillment) isTxPayload_Payload() {} func (m *TxPayload) GetPayload() isTxPayload_Payload { if m != nil { @@ -370,6 +376,13 @@ func (m *TxPayload) GetTxCloseDeployment() *TxCloseDeployment { return nil } +func (m *TxPayload) GetTxCloseFulfillment() *TxCloseFulfillment { + if x, ok := m.GetPayload().(*TxPayload_TxCloseFulfillment); ok { + return x.TxCloseFulfillment + } + return nil +} + // XXX_OneofFuncs is for the internal use of the proto package. func (*TxPayload) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { return _TxPayload_OneofMarshaler, _TxPayload_OneofUnmarshaler, _TxPayload_OneofSizer, []interface{}{ @@ -380,6 +393,7 @@ func (*TxPayload) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) err (*TxPayload_TxCreateLease)(nil), (*TxPayload_TxCreateProvider)(nil), (*TxPayload_TxCloseDeployment)(nil), + (*TxPayload_TxCloseFulfillment)(nil), } } @@ -422,6 +436,11 @@ func _TxPayload_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { if err := b.EncodeMessage(x.TxCloseDeployment); err != nil { return err } + case *TxPayload_TxCloseFulfillment: + _ = b.EncodeVarint(9<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.TxCloseFulfillment); err != nil { + return err + } case nil: default: return fmt.Errorf("TxPayload.Payload has unexpected type %T", x) @@ -488,6 +507,14 @@ func _TxPayload_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buff err := b.DecodeMessage(msg) m.Payload = &TxPayload_TxCloseDeployment{msg} return true, err + case 9: // payload.txCloseFulfillment + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(TxCloseFulfillment) + err := b.DecodeMessage(msg) + m.Payload = &TxPayload_TxCloseFulfillment{msg} + return true, err default: return false, nil } @@ -532,6 +559,11 @@ func _TxPayload_OneofSizer(msg proto.Message) (n int) { n += proto.SizeVarint(8<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s + case *TxPayload_TxCloseFulfillment: + s := proto.Size(x.TxCloseFulfillment) + n += proto.SizeVarint(9<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) @@ -1091,6 +1123,16 @@ func (m *TxCreateFulfillment) GetPrice() uint32 { return 0 } +type TxCloseFulfillment struct { + // fulfillment address + Fulfillment github_com_ovrclk_akash_types_base.Bytes `protobuf:"bytes,1,opt,name=fulfillment,proto3,customtype=github.com/ovrclk/akash/types/base.Bytes" json:"fulfillment"` +} + +func (m *TxCloseFulfillment) Reset() { *m = TxCloseFulfillment{} } +func (m *TxCloseFulfillment) String() string { return proto.CompactTextString(m) } +func (*TxCloseFulfillment) ProtoMessage() {} +func (*TxCloseFulfillment) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{23} } + type Lease struct { // 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"` @@ -1108,7 +1150,7 @@ type Lease struct { func (m *Lease) Reset() { *m = Lease{} } func (m *Lease) String() string { return proto.CompactTextString(m) } func (*Lease) ProtoMessage() {} -func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{23} } +func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{24} } func (m *Lease) GetGroup() uint64 { if m != nil { @@ -1154,7 +1196,7 @@ type TxCreateLease struct { func (m *TxCreateLease) Reset() { *m = TxCreateLease{} } func (m *TxCreateLease) String() string { return proto.CompactTextString(m) } func (*TxCreateLease) ProtoMessage() {} -func (*TxCreateLease) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{24} } +func (*TxCreateLease) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{25} } func (m *TxCreateLease) GetGroup() uint64 { if m != nil { @@ -1184,7 +1226,7 @@ type Leases struct { func (m *Leases) Reset() { *m = Leases{} } func (m *Leases) String() string { return proto.CompactTextString(m) } func (*Leases) ProtoMessage() {} -func (*Leases) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{25} } +func (*Leases) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{26} } func (m *Leases) GetItems() []*Lease { if m != nil { @@ -1217,6 +1259,7 @@ func init() { proto.RegisterType((*Orders)(nil), "types.Orders") proto.RegisterType((*Fulfillment)(nil), "types.Fulfillment") proto.RegisterType((*TxCreateFulfillment)(nil), "types.TxCreateFulfillment") + proto.RegisterType((*TxCloseFulfillment)(nil), "types.TxCloseFulfillment") proto.RegisterType((*Lease)(nil), "types.Lease") proto.RegisterType((*TxCreateLease)(nil), "types.TxCreateLease") proto.RegisterType((*Leases)(nil), "types.Leases") @@ -1691,7 +1734,7 @@ func (this *TxPayload) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 12) + s := make([]string, 0, 13) s = append(s, "&types.TxPayload{") s = append(s, "Nonce: "+fmt.Sprintf("%#v", this.Nonce)+",\n") if this.Payload != nil { @@ -1756,6 +1799,14 @@ func (this *TxPayload_TxCloseDeployment) GoString() string { `TxCloseDeployment:` + fmt.Sprintf("%#v", this.TxCloseDeployment) + `}`}, ", ") return s } +func (this *TxPayload_TxCloseFulfillment) GoString() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&types.TxPayload_TxCloseFulfillment{` + + `TxCloseFulfillment:` + fmt.Sprintf("%#v", this.TxCloseFulfillment) + `}`}, ", ") + return s +} func (this *Account) GoString() string { if this == nil { return "nil" @@ -2051,6 +2102,16 @@ func (this *TxCreateFulfillment) GoString() string { s = append(s, "}") return strings.Join(s, "") } +func (this *TxCloseFulfillment) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&types.TxCloseFulfillment{") + s = append(s, "Fulfillment: "+fmt.Sprintf("%#v", this.Fulfillment)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} func (this *Lease) GoString() string { if this == nil { return "nil" @@ -2595,6 +2656,38 @@ func (m *TxPayload) Unmarshal(dAtA []byte) error { } m.Payload = &TxPayload_TxCloseDeployment{v} iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxCloseFulfillment", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &TxCloseFulfillment{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Payload = &TxPayload_TxCloseFulfillment{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -5125,6 +5218,86 @@ func (m *TxCreateFulfillment) Unmarshal(dAtA []byte) error { } return nil } +func (m *TxCloseFulfillment) 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: TxCloseFulfillment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TxCloseFulfillment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fulfillment", 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.Fulfillment.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 *Lease) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5667,88 +5840,90 @@ var ( func init() { proto.RegisterFile("types/types.proto", fileDescriptorTypes) } var fileDescriptorTypes = []byte{ - // 1322 bytes of a gzipped FileDescriptorProto + // 1357 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0x7a, 0xbd, 0xeb, 0xf8, 0x39, 0x6e, 0x37, 0x53, 0xab, 0x98, 0x0a, 0xa5, 0x65, 0x41, - 0x22, 0x88, 0x26, 0xa9, 0x52, 0x21, 0x28, 0xad, 0x50, 0x1d, 0xc7, 0xa9, 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, 0x29, 0xee, 0xbe, 0x0c, + 0x90, 0x28, 0x1f, 0xf7, 0x05, 0xb7, 0x7e, 0x55, 0xda, 0xdb, 0xff, 0x04, 0xc8, 0xa8, 0x61, 0x62, + 0xaa, 0x8f, 0x6d, 0x98, 0x38, 0x2b, 0x1a, 0xe6, 0xba, 0x79, 0xff, 0xe1, 0xa2, 0xf6, 0xcb, 0xc3, + 0x45, 0xed, 0xbb, 0x47, 0x8b, 0xda, 0xfd, 0x47, 0x8b, 0xda, 0xbe, 0x81, 0xff, 0xbe, 0x5d, 0xfd, + 0x23, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x4a, 0xac, 0x97, 0xc8, 0x13, 0x00, 0x00, } diff --git a/types/types.proto b/types/types.proto index 7712bd693d..61eae9b825 100644 --- a/types/types.proto +++ b/types/types.proto @@ -32,6 +32,7 @@ message TxPayload { TxCreateLease txCreateLease = 6; TxCreateProvider txCreateProvider = 7; TxCloseDeployment txCloseDeployment = 8; + TxCloseFulfillment txCloseFulfillment = 9; } } /* END GLOBAL */ @@ -265,6 +266,11 @@ message TxCreateFulfillment { /* END ID FIELDS */ } +message TxCloseFulfillment { + // fulfillment address + bytes fulfillment = 1 [(gogoproto.customtype)="github.com/ovrclk/akash/types/base.Bytes",(gogoproto.nullable) = false]; +} + message Lease { /* BEGIN ID FIELDS */