diff --git a/CHANGELOG.md b/CHANGELOG.md index d4085ff5e3d..c3984dc34bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,15 @@ - [](https://github.com/vegaprotocol/vega/issues/xxx) +## 0.76.1 + +### 🐛 Fixes + +- [11250](https://github.com/vegaprotocol/vega/issues/11250) - Add missing dispatch strategy in transfer proposal. +- [11252](https://github.com/vegaprotocol/vega/issues/11252) - Treat no position as zero position when calculating stop order overrides. +- [11249](https://github.com/vegaprotocol/vega/issues/11249) - Composite mark price oracles are now deactivated when a market is rejected. + + ## 0.76.0 ### 🚨 Breaking changes @@ -100,7 +109,6 @@ - [10374](https://github.com/vegaprotocol/vega/issues/10374) - Add transfer ID to recurring governance transfer ledger entries. - [11221](https://github.com/vegaprotocol/vega/issues/11221) - Fix for `totalRewardsEarned` being twice the `rewardEarned`. - ## 0.75.0 ### 🚨 Breaking changes diff --git a/core/execution/future/market.go b/core/execution/future/market.go index e4aff333d87..5bb8a65dce0 100644 --- a/core/execution/future/market.go +++ b/core/execution/future/market.go @@ -4145,10 +4145,13 @@ func (m *Market) submitStopOrders( if v.Status == status { if v.SizeOverrideSetting == types.StopOrderSizeOverrideSettingPosition { // Update the order size to match that of the party's position - pos, _ := m.position.GetPositionByPartyID(v.Party) + var pos int64 + if position, ok := m.position.GetPositionByPartyID(v.Party); ok { + pos = position.Size() + } // Scale this size if required - scaledPos := num.DecimalFromInt64(pos.Size()) + scaledPos := num.DecimalFromInt64(pos) if v.SizeOverrideValue != nil { scaledPos = scaledPos.Mul(v.SizeOverrideValue.PercentageSize) scaledPos = scaledPos.Round(0) @@ -4733,6 +4736,11 @@ func (m *Market) canTrade() bool { func (m *Market) cleanupOnReject(ctx context.Context) { m.tradableInstrument.Instrument.Unsubscribe(ctx) + m.markPriceCalculator.Close(ctx) + if m.internalCompositePriceCalculator != nil { + m.internalCompositePriceCalculator.Close(ctx) + } + // get the list of all parties in this market parties := make([]string, 0, len(m.parties)) for k := range m.parties { diff --git a/core/types/snapshot_nodes.go b/core/types/snapshot_nodes.go index c534790828d..801ba1777ac 100644 --- a/core/types/snapshot_nodes.go +++ b/core/types/snapshot_nodes.go @@ -2901,6 +2901,7 @@ func ExecSpotMarketFromProto(em *snapshot.SpotMarket) *ExecSpotMarket { AuctionState: AuctionStateFromProto(em.AuctionState), PeggedOrders: PeggedOrdersStateFromProto(em.PeggedOrders), ExpiringOrders: make([]*Order, 0, len(em.ExpiringOrders)), + ExpiringStopOrders: make([]*Order, 0, len(em.ExpiringStopOrders)), LastEquityShareDistributed: em.LastEquityShareDistributed, EquityShare: EquityShareFromProto(em.EquityShare), LastBestAsk: lastBA, @@ -2924,7 +2925,7 @@ func ExecSpotMarketFromProto(em *snapshot.SpotMarket) *ExecSpotMarket { ret.ExpiringOrders = append(ret.ExpiringOrders, or) } for _, o := range em.ExpiringStopOrders { - ret.ExpiringStopOrders = append(ret.ExpiringOrders, &Order{ID: o.Id, ExpiresAt: o.ExpiresAt}) + ret.ExpiringStopOrders = append(ret.ExpiringStopOrders, &Order{ID: o.Id, ExpiresAt: o.ExpiresAt}) } return &ret } @@ -2936,6 +2937,7 @@ func (e ExecSpotMarket) IntoProto() *snapshot.SpotMarket { AuctionState: e.AuctionState.IntoProto(), PeggedOrders: e.PeggedOrders.IntoProto(), ExpiringOrders: make([]*vega.Order, 0, len(e.ExpiringOrders)), + ExpiringStopOrders: make([]*vega.Order, 0, len(e.ExpiringStopOrders)), LastEquityShareDistributed: e.LastEquityShareDistributed, EquityShare: e.EquityShare.IntoProto(), LastBestAsk: e.LastBestAsk.String(), @@ -2962,7 +2964,7 @@ func (e ExecSpotMarket) IntoProto() *snapshot.SpotMarket { ret.ExpiringOrders = append(ret.ExpiringOrders, o.IntoProto()) } for _, o := range e.ExpiringStopOrders { - ret.ExpiringStopOrders = append(ret.ExpiringOrders, &vega.Order{Id: o.ID, ExpiresAt: o.ExpiresAt}) + ret.ExpiringStopOrders = append(ret.ExpiringStopOrders, &vega.Order{Id: o.ID, ExpiresAt: o.ExpiresAt}) } return &ret } diff --git a/datanode/gateway/graphql/new_transfer_resolver.go b/datanode/gateway/graphql/new_transfer_resolver.go index f3a24c82e4c..ba625f7e533 100644 --- a/datanode/gateway/graphql/new_transfer_resolver.go +++ b/datanode/gateway/graphql/new_transfer_resolver.go @@ -79,8 +79,9 @@ func (r *newTransferResolver) Kind(ctx context.Context, obj *vega.NewTransfer) ( case *vega.NewTransferConfiguration_Recurring: govTransfer := obj.Changes.GetRecurring() evtTransfer := &eventspb.RecurringGovernanceTransfer{ - StartEpoch: govTransfer.StartEpoch, - EndEpoch: govTransfer.EndEpoch, + StartEpoch: govTransfer.StartEpoch, + EndEpoch: govTransfer.EndEpoch, + DispatchStrategy: govTransfer.DispatchStrategy, } return evtTransfer, nil default: diff --git a/protos/blockexplorer/api/v1/blockexplorer.pb.go b/protos/blockexplorer/api/v1/blockexplorer.pb.go index b891e392e93..577615eb290 100644 --- a/protos/blockexplorer/api/v1/blockexplorer.pb.go +++ b/protos/blockexplorer/api/v1/blockexplorer.pb.go @@ -656,7 +656,7 @@ var file_blockexplorer_api_v1_blockexplorer_proto_rawDesc = []byte{ 0x2f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x92, 0x41, 0x3e, 0x12, 0x23, 0x0a, 0x18, 0x56, 0x65, 0x67, 0x61, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x20, - 0x41, 0x50, 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x36, 0x2e, 0x30, 0x1a, 0x13, 0x6c, + 0x41, 0x50, 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x36, 0x2e, 0x31, 0x1a, 0x13, 0x6c, 0x62, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x78, 0x79, 0x7a, 0x2a, 0x02, 0x01, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/protos/data-node/api/v2/trading_data.pb.go b/protos/data-node/api/v2/trading_data.pb.go index f26efb7758f..ca403173906 100644 --- a/protos/data-node/api/v2/trading_data.pb.go +++ b/protos/data-node/api/v2/trading_data.pb.go @@ -30538,7 +30538,7 @@ var file_data_node_api_v2_trading_data_proto_rawDesc = []byte{ 0x6f, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x92, 0x41, 0x8f, 0x01, 0x12, 0x1e, 0x0a, 0x13, 0x56, 0x65, 0x67, 0x61, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6e, 0x6f, 0x64, 0x65, 0x20, 0x41, 0x50, 0x49, 0x73, 0x32, 0x07, - 0x76, 0x30, 0x2e, 0x37, 0x36, 0x2e, 0x30, 0x1a, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, + 0x76, 0x30, 0x2e, 0x37, 0x36, 0x2e, 0x31, 0x1a, 0x1c, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x78, 0x79, 0x7a, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x52, 0x39, 0x0a, 0x03, 0x35, diff --git a/protos/sources/blockexplorer/api/v1/blockexplorer.proto b/protos/sources/blockexplorer/api/v1/blockexplorer.proto index 56bf3ff92e2..f551d1c16ab 100644 --- a/protos/sources/blockexplorer/api/v1/blockexplorer.proto +++ b/protos/sources/blockexplorer/api/v1/blockexplorer.proto @@ -11,7 +11,7 @@ option go_package = "code.vegaprotocol.io/vega/protos/blockexplorer/api/v1"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Vega block explorer APIs"; - version: "v0.76.0"; + version: "v0.76.1"; } schemes: [ HTTP, diff --git a/protos/sources/data-node/api/v2/trading_data.proto b/protos/sources/data-node/api/v2/trading_data.proto index 82a5e97213a..98df40439f4 100644 --- a/protos/sources/data-node/api/v2/trading_data.proto +++ b/protos/sources/data-node/api/v2/trading_data.proto @@ -17,7 +17,7 @@ option go_package = "code.vegaprotocol.io/vega/protos/data-node/api/v2"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Vega data node APIs"; - version: "v0.76.0"; + version: "v0.76.1"; } schemes: [ HTTP, diff --git a/protos/sources/vega/api/v1/core.proto b/protos/sources/vega/api/v1/core.proto index d72574475ba..a06f3221ab6 100644 --- a/protos/sources/vega/api/v1/core.proto +++ b/protos/sources/vega/api/v1/core.proto @@ -12,7 +12,7 @@ option go_package = "code.vegaprotocol.io/vega/protos/vega/api/v1"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Vega core APIs"; - version: "v0.76.0"; + version: "v0.76.1"; } schemes: [ HTTP, diff --git a/protos/sources/vega/api/v1/corestate.proto b/protos/sources/vega/api/v1/corestate.proto index 40aac3ba4b1..956a98a9aee 100644 --- a/protos/sources/vega/api/v1/corestate.proto +++ b/protos/sources/vega/api/v1/corestate.proto @@ -13,7 +13,7 @@ option go_package = "code.vegaprotocol.io/vega/protos/vega/api/v1"; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { title: "Vega core state APIs"; - version: "v0.76.0"; + version: "v0.76.1"; } schemes: [ HTTP, diff --git a/protos/vega/api/v1/core.pb.go b/protos/vega/api/v1/core.pb.go index 963481f9395..631b0676f57 100644 --- a/protos/vega/api/v1/core.pb.go +++ b/protos/vega/api/v1/core.pb.go @@ -2796,7 +2796,7 @@ var file_vega_api_v1_core_proto_rawDesc = []byte{ 0x6f, 0x6c, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x92, 0x41, 0x34, 0x12, 0x19, 0x0a, 0x0e, 0x56, 0x65, 0x67, 0x61, 0x20, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x41, 0x50, - 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x36, 0x2e, 0x30, 0x1a, 0x13, 0x6c, 0x62, 0x2e, + 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x36, 0x2e, 0x31, 0x1a, 0x13, 0x6c, 0x62, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x78, 0x79, 0x7a, 0x2a, 0x02, 0x01, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/protos/vega/api/v1/corestate.pb.go b/protos/vega/api/v1/corestate.pb.go index 032f0b0bd0a..1556db4ec39 100644 --- a/protos/vega/api/v1/corestate.pb.go +++ b/protos/vega/api/v1/corestate.pb.go @@ -1512,7 +1512,7 @@ var file_vega_api_v1_corestate_proto_rawDesc = []byte{ 0x6f, 0x73, 0x2f, 0x76, 0x65, 0x67, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x92, 0x41, 0x3a, 0x12, 0x1f, 0x0a, 0x14, 0x56, 0x65, 0x67, 0x61, 0x20, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x20, 0x41, 0x50, 0x49, 0x73, 0x32, 0x07, 0x76, 0x30, 0x2e, 0x37, 0x36, - 0x2e, 0x30, 0x1a, 0x13, 0x6c, 0x62, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x2e, 0x76, + 0x2e, 0x31, 0x1a, 0x13, 0x6c, 0x62, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x6e, 0x65, 0x74, 0x2e, 0x76, 0x65, 0x67, 0x61, 0x2e, 0x78, 0x79, 0x7a, 0x2a, 0x02, 0x01, 0x02, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/version/version.go b/version/version.go index c2846d4b3bf..f73395ff20b 100644 --- a/version/version.go +++ b/version/version.go @@ -22,7 +22,7 @@ import ( var ( cliVersionHash = "" - cliVersion = "v0.76.0" + cliVersion = "v0.76.1" ) func init() {