From 24a189c885b8f839417984f1d9c2b35f99ff3fc8 Mon Sep 17 00:00:00 2001 From: wwestgarth Date: Tue, 7 May 2024 09:57:21 +0100 Subject: [PATCH 1/5] fix: typos expiringOrders -> expiringStopOrders --- core/types/snapshot_nodes.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/types/snapshot_nodes.go b/core/types/snapshot_nodes.go index c534790828..801ba1777a 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 } From 79b5f51119b1b3172ca9c6200abf88d440a93c41 Mon Sep 17 00:00:00 2001 From: wwestgarth Date: Thu, 9 May 2024 10:26:16 +0100 Subject: [PATCH 2/5] fix: unsubscribe composite mark price oracles when a market is rejected --- CHANGELOG.md | 1 + core/execution/future/market.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4085ff5e3..a949665a01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ - [11000](https://github.com/vegaprotocol/vega/issues/11000) - Vesting summary events are now sorted properly before sending. - [11065](https://github.com/vegaprotocol/vega/issues/11065) - `SLA` commitment state is reset properly at the end of an epoch - [10960](https://github.com/vegaprotocol/vega/issues/10960) - Only the owner of a referral set can update it. +- [11249](https://github.com/vegaprotocol/vega/issues/11249) - Composite mark price oracles are now deactivated when a market is rejected. - [10970](https://github.com/vegaprotocol/vega/issues/10970) - Logic for whether a team member joined more than `rewards.team.minEpochsInTeam` is fixed. - [10943](https://github.com/vegaprotocol/vega/issues/10943) - Fix error message format when node vote is sent again. - [10928](https://github.com/vegaprotocol/vega/issues/10928) - Fix `collateralIncreaseEstimate` for limit orders in isolated margin mode diff --git a/core/execution/future/market.go b/core/execution/future/market.go index e4aff333d8..d5327ec2e0 100644 --- a/core/execution/future/market.go +++ b/core/execution/future/market.go @@ -4733,6 +4733,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 { From 094f8eee7197f2e1d0bf486ae053a24ca576907e Mon Sep 17 00:00:00 2001 From: ze97286 Date: Thu, 9 May 2024 10:55:34 +0100 Subject: [PATCH 3/5] fix: add dispatch strategy to transfer proposal gql --- CHANGELOG.md | 2 +- datanode/gateway/graphql/new_transfer_resolver.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4085ff5e3..7762881908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,7 +99,7 @@ - [11205](https://github.com/vegaprotocol/vega/issues/11205) - Evaluate transfer interval correctly. - [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`. - +- [11250](https://github.com/vegaprotocol/vega/issues/11250) - Add missing dispatch strategy in transfer proposal. ## 0.75.0 diff --git a/datanode/gateway/graphql/new_transfer_resolver.go b/datanode/gateway/graphql/new_transfer_resolver.go index f3a24c82e4..ba625f7e53 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: From 4c49fae2c65e07e3b7a4d3f8ed220eeffb3e1e6f Mon Sep 17 00:00:00 2001 From: wwestgarth Date: Thu, 9 May 2024 10:52:27 +0100 Subject: [PATCH 4/5] fix: treat no position as zero position when calculating stop order overrides --- CHANGELOG.md | 1 + core/execution/future/market.go | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a949665a01..10fa2c092f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,7 @@ - [10950](https://github.com/vegaprotocol/vega/issues/10950) - Fix bug that caused cancelled liquidity provisions to stick around after opening auction. - [10975](https://github.com/vegaprotocol/vega/issues/10975) - Fix marshaller for stop order rejection error. - [10973](https://github.com/vegaprotocol/vega/issues/10973) - Avoid entering an auction or doing mark-to-market before market entered opening auction or after it is in a terminal state. +- [11252](https://github.com/vegaprotocol/vega/issues/11252) - Treat no position as zero position when calculating stop order overrides. - [10969](https://github.com/vegaprotocol/vega/issues/10969) - Ensure teams statistics are computed from team rewards. - [10962](https://github.com/vegaprotocol/vega/issues/10962) - Fix `lastFeeDistribution` time in snapshot. - [10974](https://github.com/vegaprotocol/vega/issues/10974) - Target stake for spot should not consider position factor. diff --git a/core/execution/future/market.go b/core/execution/future/market.go index d5327ec2e0..5bb8a65dce 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) From 48053e14518c9a27e45c1efdd3ee1c677e7669db Mon Sep 17 00:00:00 2001 From: Jeremy Letang Date: Thu, 9 May 2024 15:25:38 +0200 Subject: [PATCH 5/5] chore: release version 0.76.1 Signed-off-by: Jeremy Letang --- CHANGELOG.md | 12 +++++++++--- protos/blockexplorer/api/v1/blockexplorer.pb.go | 2 +- protos/data-node/api/v2/trading_data.pb.go | 2 +- .../sources/blockexplorer/api/v1/blockexplorer.proto | 2 +- protos/sources/data-node/api/v2/trading_data.proto | 2 +- protos/sources/vega/api/v1/core.proto | 2 +- protos/sources/vega/api/v1/corestate.proto | 2 +- protos/vega/api/v1/core.pb.go | 2 +- protos/vega/api/v1/corestate.pb.go | 2 +- version/version.go | 2 +- 10 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03eb1a1d07..c3984dc34b 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 @@ -62,7 +71,6 @@ - [11000](https://github.com/vegaprotocol/vega/issues/11000) - Vesting summary events are now sorted properly before sending. - [11065](https://github.com/vegaprotocol/vega/issues/11065) - `SLA` commitment state is reset properly at the end of an epoch - [10960](https://github.com/vegaprotocol/vega/issues/10960) - Only the owner of a referral set can update it. -- [11249](https://github.com/vegaprotocol/vega/issues/11249) - Composite mark price oracles are now deactivated when a market is rejected. - [10970](https://github.com/vegaprotocol/vega/issues/10970) - Logic for whether a team member joined more than `rewards.team.minEpochsInTeam` is fixed. - [10943](https://github.com/vegaprotocol/vega/issues/10943) - Fix error message format when node vote is sent again. - [10928](https://github.com/vegaprotocol/vega/issues/10928) - Fix `collateralIncreaseEstimate` for limit orders in isolated margin mode @@ -70,7 +78,6 @@ - [10950](https://github.com/vegaprotocol/vega/issues/10950) - Fix bug that caused cancelled liquidity provisions to stick around after opening auction. - [10975](https://github.com/vegaprotocol/vega/issues/10975) - Fix marshaller for stop order rejection error. - [10973](https://github.com/vegaprotocol/vega/issues/10973) - Avoid entering an auction or doing mark-to-market before market entered opening auction or after it is in a terminal state. -- [11252](https://github.com/vegaprotocol/vega/issues/11252) - Treat no position as zero position when calculating stop order overrides. - [10969](https://github.com/vegaprotocol/vega/issues/10969) - Ensure teams statistics are computed from team rewards. - [10962](https://github.com/vegaprotocol/vega/issues/10962) - Fix `lastFeeDistribution` time in snapshot. - [10974](https://github.com/vegaprotocol/vega/issues/10974) - Target stake for spot should not consider position factor. @@ -101,7 +108,6 @@ - [11205](https://github.com/vegaprotocol/vega/issues/11205) - Evaluate transfer interval correctly. - [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`. -- [11250](https://github.com/vegaprotocol/vega/issues/11250) - Add missing dispatch strategy in transfer proposal. ## 0.75.0 diff --git a/protos/blockexplorer/api/v1/blockexplorer.pb.go b/protos/blockexplorer/api/v1/blockexplorer.pb.go index b891e392e9..577615eb29 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 f26efb7758..ca40317390 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 56bf3ff92e..f551d1c16a 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 82a5e97213..98df40439f 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 d72574475b..a06f3221ab 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 40aac3ba4b..956a98a9ae 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 963481f939..631b0676f5 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 032f0b0bd0..1556db4ec3 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 c2846d4b3b..f73395ff20 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() {