Skip to content

Commit

Permalink
Merge pull request #11748 from vegaprotocol/release/v0.79.0
Browse files Browse the repository at this point in the history
Release/v0.79.0
  • Loading branch information
jeremyletang authored Oct 22, 2024
2 parents 414ab7f + 1d5115e commit a50750c
Show file tree
Hide file tree
Showing 316 changed files with 36,635 additions and 15,236 deletions.
40 changes: 35 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## Unreleased 0.79.0
## Unreleased 0.80.0

### 🚨 Breaking changes

Expand All @@ -19,6 +19,33 @@
- [](https://github.com/vegaprotocol/vega/issues/xxx)


## 0.79.0

### 🛠 Improvements

- [11644](https://github.com/vegaprotocol/vega/issues/11644) - `liveOnly` flag has been added to the `AMM` API to show only active `AMMs`.
- [11519](https://github.com/vegaprotocol/vega/issues/11519) - Add fees to position API types.
- [11714](https://github.com/vegaprotocol/vega/issues/11714) - Improve `AMM` performance by caching best prices and volumes.
- [11642](https://github.com/vegaprotocol/vega/issues/11642) - `AMMs` with empty price levels are now allowed.
- [11685](https://github.com/vegaprotocol/vega/issues/11685) - Automated purchase support added.
- [11732](https://github.com/vegaprotocol/vega/issues/11732) - `AMMs` can now have their base price automatically updated by a market's data source.
- [11685](https://github.com/vegaprotocol/vega/issues/11685) - Automated purchase support added.
- [11726](https://github.com/vegaprotocol/vega/issues/11726) - Combined `AMM` uncrossing orders for better performance when uncrossing the book.
- [11711](https://github.com/vegaprotocol/vega/issues/11711) - Manage closed team membership by updating the allow list.
- [11722](https://github.com/vegaprotocol/vega/issues/11722) - Expose active protocol automated purchase identifier in market data API.
- [11744](https://github.com/vegaprotocol/vega/issues/11744) - Staking from collateral bridged assets.

### 🐛 Fixes

- [11672](https://github.com/vegaprotocol/vega/issues/11672) - Add missing fees in GraphQL bindings.
- [11681](https://github.com/vegaprotocol/vega/issues/11681) - Account for conflicts inserting funding payment records.
- [11715](https://github.com/vegaprotocol/vega/issues/11715) - Trade across an `AMMs` base price in two steps since the curves either side will be different.
- [11684](https://github.com/vegaprotocol/vega/issues/11684) - Better error when `Arbitrum` bridge details are missing from validator configuration.
- [11696](https://github.com/vegaprotocol/vega/issues/11696) - Add binding for estimate fees API.
- [11699](https://github.com/vegaprotocol/vega/issues/11699) - Update factors of programs when they are updated.
- [11724](https://github.com/vegaprotocol/vega/issues/11724) - Allow nil initial time in time trigger.
- [11733](https://github.com/vegaprotocol/vega/issues/11733) - Fix division by zero.

## 0.78.2

### 🛠 Improvements
Expand All @@ -33,8 +60,10 @@
- [11650](https://github.com/vegaprotocol/vega/issues/11650) - Add include sub accounts flag to `listPositions`.
- [11641](https://github.com/vegaprotocol/vega/issues/11641) - Panic with pegged orders.
- [11646](https://github.com/vegaprotocol/vega/issues/11646) - Add tier numbers to API.


- [11665](https://github.com/vegaprotocol/vega/issues/11665) - Delay the final termination of a transfer to the following epoch.
- [11679](https://github.com/vegaprotocol/vega/issues/11679) - Fix calculation of fees in party `stats`.
- [11665](https://github.com/vegaprotocol/vega/issues/11665) - Delay the final termination of a transfer to the following epoch.
- [11687](https://github.com/vegaprotocol/vega/issues/11687) - Fix potential division by zero in notional reward metric evaluation.
## 0.78.1

### 🐛 Fixes
Expand Down Expand Up @@ -65,7 +94,10 @@
- [11533](https://github.com/vegaprotocol/vega/issues/11533) - Suppose per party fee discounts in fee estimation.
- [11577](https://github.com/vegaprotocol/vega/issues/11577) - Add API for party discounts and rewards.
- [10716](https://github.com/vegaprotocol/vega/issues/10716) - Set Tendermint defaults during init.
- [11612](https://github.com/vegaprotocol/vega/issues/11612) - Reward scaling support.
- [11624](https://github.com/vegaprotocol/vega/issues/11624) - prevent creation of rewards with no payout, but with high computational cost.
- [11512](https://github.com/vegaprotocol/vega/issues/11512) - Add loss socialisation amounts to funding payment API.
- [11627](https://github.com/vegaprotocol/vega/issues/11627) - Add eligible keys filter to reward transfers.

### 🐛 Fixes

Expand All @@ -78,7 +110,6 @@
- [11568](https://github.com/vegaprotocol/vega/issues/11568) - order book shape on closing `AMM` no longer panics.
- [11540](https://github.com/vegaprotocol/vega/issues/11540) - Fix spam check for spots to use not double count quantum.
- [11542](https://github.com/vegaprotocol/vega/issues/11542) - Fix non determinism in lottery ranking.
- [11616](https://github.com/vegaprotocol/vega/issues/11616) - `AMM` tradable volume now calculated purely in positions to prevent loss of precision.
- [11544](https://github.com/vegaprotocol/vega/issues/11544) - Fix empty candles stream.
- [11583](https://github.com/vegaprotocol/vega/issues/11583) - Rough bound on price interval when matching with `AMMs` is now looser and calculated in the `AMM` engine.
- [11633](https://github.com/vegaprotocol/vega/issues/11633) - Use bridge deployment heights from network parameter when starting network from genesis.
Expand All @@ -89,7 +120,6 @@
- [11607](https://github.com/vegaprotocol/vega/issues/11607) - Wire rank lottery distribution to team reward payout.
- [959](https://github.com/vegaprotocol/core-test-coverage/issues/959) - Include `ELS` for `AMM` sub keys to the parent key `ELS`.
- [11592](https://github.com/vegaprotocol/vega/issues/11592) - Fix the order of calls at end of epoch between rebate engine and market tracker.
- [10907](https://github.com/vegaprotocol/vega/issues/10907) - Fix position API distressed status not getting updated once the party has been closed out.


## 0.77.5
Expand Down
6 changes: 6 additions & 0 deletions cmd/data-node/commands/start/node_pre.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ func (l *NodeCommand) persistentPre([]string) (err error) {
return fmt.Errorf("failed to apply data retention policies:%w", err)
}

// check that the schema version matches the latest migration, because if it doesn't queries might fail if rows/tables
// it expects to exist don't
if err := sqlstore.CheckSchemaVersionsSynced(l.Log, conf.SQLStore.ConnectionConfig, sqlstore.EmbedMigrations); err != nil {
return err
}

preLog.Info("Enabling SQL stores")

l.transactionalConnectionSource, err = sqlstore.NewTransactionalConnectionSource(l.ctx, preLog, l.conf.SQLStore.ConnectionConfig)
Expand Down
7 changes: 7 additions & 0 deletions cmd/vega/commands/nodewallet/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package nodewallet

import (
"encoding/base64"
"encoding/json"
"errors"
"fmt"
Expand Down Expand Up @@ -137,6 +138,12 @@ func (opts *importCmd) Execute(_ []string) error {
}
}

// validate the key is base64
_, err := base64.StdEncoding.DecodeString(tendermintPubkey)
if err != nil {
return fmt.Errorf("tendermint pubkey must be base64 encoded: %w", err)
}

data, err = nodewallets.ImportTendermintPubkey(vegaPaths, registryPass, tendermintPubkey, opts.Force)
if err != nil {
return fmt.Errorf("couldn't import Tendermint pubkey: %w", err)
Expand Down
28 changes: 23 additions & 5 deletions commands/amend_amm.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,26 @@ func checkAmendAMM(cmd *commandspb.AmendAMM) Errors {
}
}

if cmd.MinimumPriceChangeTrigger != nil {
if minPriceChange, err := num.DecimalFromString(*cmd.MinimumPriceChangeTrigger); err != nil {
errs.AddForProperty("submit_amm.mimimum_price_change_trigger", ErrIsNotValid)
} else if minPriceChange.LessThan(num.DecimalZero()) {
errs.AddForProperty("submit_amm.proposed_fee", ErrMustBePositiveOrZero)
}
}

if cmd.ConcentratedLiquidityParameters != nil {
var haveLower, haveUpper, emptyBase bool
hasUpdate = true
var base, lowerBound, upperBound *big.Int
if base, _ = big.NewInt(0).SetString(cmd.ConcentratedLiquidityParameters.Base, 10); base == nil {
if len(cmd.ConcentratedLiquidityParameters.Base) == 0 {
emptyBase = true
} else if base, _ = big.NewInt(0).SetString(cmd.ConcentratedLiquidityParameters.Base, 10); base == nil {
errs.FinalAddForProperty("amend_amm.concentrated_liquidity_parameters.base", ErrIsNotValidNumber)
} else if base.Cmp(big.NewInt(0)) <= 0 {
errs.AddForProperty("amend_amm.concentrated_liquidity_parameters.base", ErrMustBePositive)
}

var haveLower, haveUpper bool
if cmd.ConcentratedLiquidityParameters.LowerBound != nil {
haveLower = true
if lowerBound, _ = big.NewInt(0).SetString(*cmd.ConcentratedLiquidityParameters.LowerBound, 10); lowerBound == nil {
Expand Down Expand Up @@ -124,11 +134,19 @@ func checkAmendAMM(cmd *commandspb.AmendAMM) Errors {
}

if len(cmd.SlippageTolerance) <= 0 {
errs.AddForProperty("submit_amm.slippage_tolerance", ErrIsRequired)
errs.AddForProperty("amend_amm.slippage_tolerance", ErrIsRequired)
} else if slippageTolerance, err := num.DecimalFromString(cmd.SlippageTolerance); err != nil {
errs.AddForProperty("submit_amm.slippage_tolerance", ErrIsNotValidNumber)
errs.AddForProperty("amend_amm.slippage_tolerance", ErrIsNotValidNumber)
} else if slippageTolerance.LessThan(num.DecimalZero()) {
errs.AddForProperty("submit_amm.slippage_tolerance", ErrMustBePositive)
errs.AddForProperty("amend_amm.slippage_tolerance", ErrMustBePositive)
}

if cmd.ConcentratedLiquidityParameters.DataSourceId == nil && emptyBase {
errs.AddForProperty("amend_amm.concentrated_liquidity_parameters.base", ErrIsRequired)
}

if cmd.ConcentratedLiquidityParameters.DataSourceId != nil && !IsVegaID(*cmd.ConcentratedLiquidityParameters.DataSourceId) {
errs.AddForProperty("amend_amm.data_source_id", ErrShouldBeAValidVegaID)
}
}

Expand Down
2 changes: 1 addition & 1 deletion commands/amend_amm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func TestCheckAmendAMM(t *testing.T) {
Base: "",
},
},
errStr: "amend_amm.concentrated_liquidity_parameters.base (is not a valid number)",
errStr: "amend_amm.concentrated_liquidity_parameters.base (is required)",
},
{
submission: commandspb.AmendAMM{
Expand Down
1 change: 1 addition & 0 deletions commands/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var (
ErrMustBeLessThan150 = errors.New("must be less than 150")
ErrMustBeAtMost1M = errors.New("must be at most 1000000")
ErrMustBeAtMost100 = errors.New("must be at most 100")
ErrMustBeAtMost200 = errors.New("must be at most 200")
ErrMustBeAtMost2048 = errors.New("must be at most 2048")
ErrMustBeWithinRange7 = errors.New("must be between -7 and 7")
ErrIsNotValid = errors.New("is not a valid value")
Expand Down
Loading

0 comments on commit a50750c

Please sign in to comment.