Skip to content

Commit

Permalink
Merge pull request #11256 from vegaprotocol/release/v0.76.1
Browse files Browse the repository at this point in the history
Release/v0.76.1
  • Loading branch information
jeremyletang authored May 9, 2024
2 parents bb48d38 + 48053e1 commit 9a70d22
Show file tree
Hide file tree
Showing 13 changed files with 35 additions and 16 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 10 additions & 2 deletions core/execution/future/market.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 4 additions & 2 deletions core/types/snapshot_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
}
Expand All @@ -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(),
Expand All @@ -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
}
Expand Down
5 changes: 3 additions & 2 deletions datanode/gateway/graphql/new_transfer_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion protos/blockexplorer/api/v1/blockexplorer.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protos/data-node/api/v2/trading_data.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protos/sources/blockexplorer/api/v1/blockexplorer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion protos/sources/data-node/api/v2/trading_data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion protos/sources/vega/api/v1/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion protos/sources/vega/api/v1/corestate.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion protos/vega/api/v1/core.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protos/vega/api/v1/corestate.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

var (
cliVersionHash = ""
cliVersion = "v0.76.0"
cliVersion = "v0.76.1"
)

func init() {
Expand Down

0 comments on commit 9a70d22

Please sign in to comment.