Skip to content

Commit

Permalink
Merge pull request #11464 from vegaprotocol/release/v0.77.0
Browse files Browse the repository at this point in the history
Release v0.77.0
  • Loading branch information
jeremyletang authored Jul 16, 2024
2 parents 9a70d22 + bf48291 commit a72ff4b
Show file tree
Hide file tree
Showing 598 changed files with 71,464 additions and 21,105 deletions.
1 change: 1 addition & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ cleanup
Cleanup
clef
codegen
collateralised
cometbft
config
cyclomatic
Expand Down
63 changes: 61 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## Unreleased 0.77.0
## Unreleased 0.78.0

### 🚨 Breaking changes

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


## 0.77.0

### 🛠 Improvements

- [11209](https://github.com/vegaprotocol/vega/issues/11209) - Publish ongoing games data.
- [11242](https://github.com/vegaprotocol/vega/issues/11242) - Add configuration to visor to help control binary retries a bit better.
- [11408](https://github.com/vegaprotocol/vega/issues/11408) - Relax finality check to allow instant deposits over the `Arbitrum` bridge.
- [11196](https://github.com/vegaprotocol/vega/issues/11196) - Add an active field in the price monitoring bounds payload.
- [11211](https://github.com/vegaprotocol/vega/issues/11211) - Liquidation engine includes `vAMM` shapes as available volume.
- [11217](https://github.com/vegaprotocol/vega/issues/11217) - Allow market proposals to override risk factors.
- [11285](https://github.com/vegaprotocol/vega/issues/11285) - Add support for trading transaction ordering.
- [11282](https://github.com/vegaprotocol/vega/issues/11282) - Allow a party to withdraw rewards from an AMM vested account.
- [11301](https://github.com/vegaprotocol/vega/issues/11301) - Sum vesting reward bonus multiplier across all derived keys for party.
- [11329](https://github.com/vegaprotocol/vega/issues/11329) - Add source chain ID when available to transaction event attributes
- [10634](https://github.com/vegaprotocol/vega/issues/10634) - Add spam checks for orders/liquidity provision
- [11337](https://github.com/vegaprotocol/vega/issues/11337) - Enhance transaction reordering with per market control and configurable delay.
- [11334](https://github.com/vegaprotocol/vega/issues/11334) - Heartbeat chain events are now sent to keep last seen block up to date.
- [11344](https://github.com/vegaprotocol/vega/issues/11344) - Include derived parties in accounts API
- [11268](https://github.com/vegaprotocol/vega/issues/11268) - Include derived parties vesting stats API
- [11266](https://github.com/vegaprotocol/vega/issues/11266) - Include derived parties rewards API
- [11357](https://github.com/vegaprotocol/vega/issues/11357) - Support historical game scores
- [11023](https://github.com/vegaprotocol/vega/issues/11023) - Add proposed fees to `vAMM` data.
- [11028](https://github.com/vegaprotocol/vega/issues/11028) - Add API to estimate order book depth based on `vAMM`.
- [11400](https://github.com/vegaprotocol/vega/issues/11400) - Add support for long block auction.
- [11026](https://github.com/vegaprotocol/vega/issues/11026) - Add API flag to get paid liquidity fees for a `vAMM` using the parent key.
- [11027](https://github.com/vegaprotocol/vega/issues/11027) - Add API filters to get fees and rewards by market, across epochs.
- [10360](https://github.com/vegaprotocol/vega/issues/10360) - Scale funding payment by fraction of period spent outside of auction.
- [11452](https://github.com/vegaprotocol/vega/issues/11452) - Implement alternative estimations for fully collateralised capped future.

### 🐛 Fixes

- [11066](https://github.com/vegaprotocol/vega/issues/11066) - Ensure vesting statistics match vesting accounts numbers.
- [11279](https://github.com/vegaprotocol/vega/issues/11279) - Handle properly the case of multiple transfers for the same game id.
- [11293](https://github.com/vegaprotocol/vega/issues/11293) - Panic in data node with position estimate endpoint.
- [11401](https://github.com/vegaprotocol/vega/issues/11401) - Ignore dispatch strategies with zero `ref-counts` when calculating payouts.
- [11379](https://github.com/vegaprotocol/vega/issues/11379) - Source chain id is now populated in `GQL Erc20WithdrawalApproval` endpoint.
- [11279](https://github.com/vegaprotocol/vega/issues/11279) - Handle properly the case of multiple transfers for the same game id.
- [11297](https://github.com/vegaprotocol/vega/issues/11297) - Handle properly asset decimals < market decimals when uncrossing the order book upon leaving auction.
- [11304](https://github.com/vegaprotocol/vega/issues/11304) - Correctly verify pegged order offset with respect to tick size in the right units.
- [11319](https://github.com/vegaprotocol/vega/issues/11319) - Do not leak Ethereum client secrets in the logs.
- [11336](https://github.com/vegaprotocol/vega/issues/11336) - Add support for decay factor in governance recurring transfers and report the proposal amount rather than 0 when the proposal gets enacted.
- [11368](https://github.com/vegaprotocol/vega/issues/11368) - Add support for update vesting stats in REST API and fix summing the quantum balance for vesting stats.
- [11380](https://github.com/vegaprotocol/vega/issues/11380) - Handle broken stop orders in prepare proposal.
- [11136](https://github.com/vegaprotocol/vega/issues/11136) - Fix premature invocation of post commit hooks in case of fee stats event.
- [11409](https://github.com/vegaprotocol/vega/issues/11409) - When updating a capped market - copy the cap from the existing market definition.
- [11415](https://github.com/vegaprotocol/vega/issues/11415) - End long block auction when expired.
- [11419](https://github.com/vegaprotocol/vega/issues/11419) - Fix long block auction extension to be calculated from current time.
- [11438](https://github.com/vegaprotocol/vega/issues/11438) - Add missing assignment to epoch to and from in `gameTeamScores` resolvers.
- [11442](https://github.com/vegaprotocol/vega/issues/11442) - Add validation to `submitAMM` to ensure the curves can be successfully generated.
- [11448](https://github.com/vegaprotocol/vega/issues/11448) - Fix team game score query with epoch filter.
- [11457](https://github.com/vegaprotocol/vega/issues/11457) - Fix cursor column ordering for game scores.
- [11454](https://github.com/vegaprotocol/vega/issues/11454) - Ensure ended transfers proper handling.


## 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.

- [11262](https://github.com/vegaprotocol/vega/pull/11262) - Fix auction extensions after risk parameter update.

## 0.76.0

Expand Down Expand Up @@ -64,6 +118,7 @@
- [11143](https://github.com/vegaprotocol/vega/issues/11143) - Add support for new asset proposal in batch governance proposal
- [11182](https://github.com/vegaprotocol/vega/issues/11182) - Remove reduce only restriction on spot markets stop orders.
- [11153](https://github.com/vegaprotocol/vega/issues/11153) - Add check on start-up that bridge `RPC-endpoints` are functional.
- [11227](https://github.com/vegaprotocol/vega/issues/11227) - Add capped futures to `protos`.

### 🐛 Fixes

Expand Down Expand Up @@ -193,6 +248,7 @@

- [10702](https://github.com/vegaprotocol/vega/pull/10700) - Use second precision in `GetMarginIncrease()` so that perpetual product uses second precision everywhere.
- [10698](https://github.com/vegaprotocol/vega/issues/10698) - Prevent `L2` from making too many `RPC` calls.
- [971](https://github.com/vegaprotocol/core-test-coverage/issues/971) - Add `AMM` support to the integration test framework.

## 0.74.2

Expand Down Expand Up @@ -227,6 +283,9 @@
- [10611](https://github.com/vegaprotocol/vega/issues/10611) - Added internal config price to update `perps`.
- [10615](https://github.com/vegaprotocol/vega/issues/10615) - Fix oracle scaling function in internal composite price.
- [10621](https://github.com/vegaprotocol/vega/issues/10621) - Fix market activity tracker storing incorrect data for previous `epochMakerFeesPaid`.
- [10643](https://github.com/vegaprotocol/vega/issues/10643) - Games `API` not showing quantum values and added filter for team and party.

## 0.74.0

### 🚨 Breaking changes

Expand Down
17 changes: 17 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,15 @@ pipeline {
dir('vega/core/integration') {
sh 'go test . -timeout 30m --godog.format=junit:core-integration-report.xml'
junit checksName: 'Core Integration Tests', testResults: 'core-integration-report.xml'

}
}
post {
failure {
archiveArtifacts(
artifacts: 'vega/core/integration/core-integration-report.xml',
allowEmptyArchive: true
)
}
}
}
Expand All @@ -238,6 +247,14 @@ pipeline {
junit checksName: 'Core Integration Perps Tests', testResults: 'core-integration-perps-report.xml'
}
}
post {
failure {
archiveArtifacts(
artifacts: 'vega/core/integration/core-integration-perps-report.xml',
allowEmptyArchive: true
)
}
}
}
stage('datanode/integration tests') {
options { retry(3) }
Expand Down
16 changes: 9 additions & 7 deletions blockexplorer/store/transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,22 @@ func TestMain(m *testing.M) {
}

cancel()
connectionSource, err = sqlstore.NewTransactionalConnectionSource(log, sqlConfig.ConnectionConfig)
ctx, cancel = context.WithCancel(context.Background())
connectionSource, err = sqlstore.NewTransactionalConnectionSource(ctx, log, sqlConfig.ConnectionConfig)
if err != nil {
cancel()
panic(err)
}
defer embeddedPostgres.Stop()

if err = sqlstore.WipeDatabaseAndMigrateSchemaToLatestVersion(log, sqlConfig.ConnectionConfig, store.EmbedMigrations, false); err != nil {
log.Errorf("failed to wipe database and migrate schema, dumping postgres log:\n %s", postgresLog.String())
cancel()
panic(err)
}

code := m.Run()
cancel()
os.Exit(code)
}

Expand All @@ -119,7 +123,6 @@ type txResult struct {
func addTestTxResults(ctx context.Context, t *testing.T, txResultTable string, txResults ...txResult) []*pb.Transaction {
t.Helper()

conn := connectionSource.Connection
rows := make([]*pb.Transaction, 0, len(txResults))
blockIDs := make(map[int64]int64)

Expand All @@ -136,14 +139,14 @@ func addTestTxResults(ctx context.Context, t *testing.T, txResultTable string, t
var ok bool

if blockID, ok = blockIDs[txr.height]; !ok {
require.NoError(t, conn.QueryRow(ctx, blockSQL, txr.height, "test-chain", txr.createdAt).Scan(&blockID))
require.NoError(t, connectionSource.QueryRow(ctx, blockSQL, txr.height, "test-chain", txr.createdAt).Scan(&blockID))
blockIDs[txr.height] = blockID
}

index := txr.index

var rowID int64
require.NoError(t, conn.QueryRow(ctx, resultSQL, blockID, index, txr.createdAt, txr.txHash, txr.txResult, txr.submitter, txr.cmdType).Scan(&rowID))
require.NoError(t, connectionSource.QueryRow(ctx, resultSQL, blockID, index, txr.createdAt, txr.txHash, txr.txResult, txr.submitter, txr.cmdType).Scan(&rowID))

row := entities.TxResultRow{
RowID: rowID,
Expand All @@ -168,10 +171,9 @@ func addTestTxResults(ctx context.Context, t *testing.T, txResultTable string, t
func cleanupTransactionsTest(ctx context.Context, t *testing.T) {
t.Helper()

conn := connectionSource.Connection
_, err := conn.Exec(ctx, `DELETE FROM tx_results`)
_, err := connectionSource.Exec(ctx, `DELETE FROM tx_results`)
require.NoError(t, err)
_, err = conn.Exec(ctx, `DELETE FROM blocks`)
_, err = connectionSource.Exec(ctx, `DELETE FROM blocks`)
require.NoError(t, err)
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/data-node/commands/networkhistory/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (cmd *fetchCmd) Execute(args []string) error {
return fmt.Errorf("failed to fix config:%w", err)
}

err = verifyChainID(cmd.SQLStore.ConnectionConfig, cmd.ChainID)
err = verifyChainID(ctx, cmd.SQLStore.ConnectionConfig, cmd.ChainID)
if err != nil {
return fmt.Errorf("failed to verify chain id:%w", err)
}
Expand Down Expand Up @@ -99,8 +99,8 @@ func (cmd *fetchCmd) Execute(args []string) error {
return nil
}

func verifyChainID(connConfig sqlstore.ConnectionConfig, chainID string) error {
connSource, err := sqlstore.NewTransactionalConnectionSource(logging.NewTestLogger(), connConfig)
func verifyChainID(ctx context.Context, connConfig sqlstore.ConnectionConfig, chainID string) error {
connSource, err := sqlstore.NewTransactionalConnectionSource(ctx, logging.NewTestLogger(), connConfig)
if err != nil {
return fmt.Errorf("failed to create new transactional connection source: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/data-node/commands/networkhistory/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (cmd *loadCmd) Execute(args []string) error {
return fmt.Errorf("failed to kill all connections to database: %w", err)
}

connPool, err := getCommandConnPool(cmd.Config.SQLStore.ConnectionConfig)
connPool, err := getCommandConnPool(ctx, cmd.Config.SQLStore.ConnectionConfig)
if err != nil {
return fmt.Errorf("failed to get command connection pool: %w", err)
}
Expand All @@ -89,7 +89,7 @@ func (cmd *loadCmd) Execute(args []string) error {
}

if hasSchema {
err = verifyChainID(cmd.SQLStore.ConnectionConfig, cmd.ChainID)
err = verifyChainID(ctx, cmd.SQLStore.ConnectionConfig, cmd.ChainID)
if err != nil {
if !errors.Is(err, networkhistory.ErrChainNotFound) {
return fmt.Errorf("failed to verify chain id:%w", err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/data-node/commands/networkhistory/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (cmd *rollbackCmd) Execute(args []string) error {
return fmt.Errorf("failed to kill all connections to database: %w", err)
}

connPool, err := getCommandConnPool(cmd.Config.SQLStore.ConnectionConfig)
connPool, err := getCommandConnPool(ctx, cmd.Config.SQLStore.ConnectionConfig)
if err != nil {
return fmt.Errorf("failed to get command connection pool: %w", err)
}
Expand Down
12 changes: 7 additions & 5 deletions cmd/data-node/commands/networkhistory/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ func (o *showOutput) printHuman(allSegments bool) {
}

func (cmd *showCmd) Execute(_ []string) error {
ctx, cfunc := context.WithCancel(context.Background())
defer cfunc()
cfg := logging.NewDefaultConfig()
cfg.Custom.Zap.Level = logging.WarnLevel
cfg.Environment = "custom"
Expand Down Expand Up @@ -111,7 +113,7 @@ func (cmd *showCmd) Execute(_ []string) error {
}
defer func() { _ = conn.Close() }()

response, err := client.ListAllNetworkHistorySegments(context.Background(), &v2.ListAllNetworkHistorySegmentsRequest{})
response, err := client.ListAllNetworkHistorySegments(ctx, &v2.ListAllNetworkHistorySegmentsRequest{})
if err != nil {
handleErr(log, cmd.Output.IsJSON(), "failed to list all network history segments", err)
os.Exit(1)
Expand All @@ -127,13 +129,13 @@ func (cmd *showCmd) Execute(_ []string) error {
segments := segment.Segments[*v2.HistorySegment](response.Segments)
output.ContiguousHistories = segments.AllContigousHistories()

pool, err := getCommandConnPool(cmd.Config.SQLStore.ConnectionConfig)
pool, err := getCommandConnPool(ctx, cmd.Config.SQLStore.ConnectionConfig)
if err != nil {
handleErr(log, cmd.Output.IsJSON(), "failed to get command conn pool", err)
}
defer pool.Close()

span, err := sqlstore.GetDatanodeBlockSpan(context.Background(), pool)
span, err := sqlstore.GetDatanodeBlockSpan(ctx, pool)
if err != nil {
handleErr(log, cmd.Output.IsJSON(), "failed to get datanode block span", err)
os.Exit(1)
Expand All @@ -156,10 +158,10 @@ func (cmd *showCmd) Execute(_ []string) error {
return nil
}

func getCommandConnPool(conf sqlstore.ConnectionConfig) (*pgxpool.Pool, error) {
func getCommandConnPool(ctx context.Context, conf sqlstore.ConnectionConfig) (*pgxpool.Pool, error) {
conf.MaxConnPoolSize = 3

connPool, err := sqlstore.CreateConnectionPool(conf)
connPool, err := sqlstore.CreateConnectionPool(ctx, conf)
if err != nil {
return nil, fmt.Errorf("failed to create connection pool: %w", err)
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/data-node/commands/start/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ func (l *NodeCommand) createGRPCServer(config api.Config) *api.GRPCServer {
l.gamesService,
l.marginModesService,
l.timeWeightedNotionalPositionService,
l.gameScoreService,
l.ammPoolsService,
)
return grpcServer
}
8 changes: 4 additions & 4 deletions cmd/data-node/commands/start/node_pre.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (l *NodeCommand) persistentPre([]string) (err error) {

preLog.Info("Enabling SQL stores")

l.transactionalConnectionSource, err = sqlstore.NewTransactionalConnectionSource(preLog, l.conf.SQLStore.ConnectionConfig)
l.transactionalConnectionSource, err = sqlstore.NewTransactionalConnectionSource(l.ctx, preLog, l.conf.SQLStore.ConnectionConfig)
if err != nil {
return fmt.Errorf("failed to create transactional connection source: %w", err)
}
Expand All @@ -193,7 +193,7 @@ func (l *NodeCommand) persistentPre([]string) (err error) {

logService := l.Log.Named("service")
logService.SetLevel(l.conf.Service.Level.Get())
if err := l.SetupServices(l.ctx, logService, l.conf.CandlesV2); err != nil {
if err := l.SetupServices(l.ctx, logService, l.conf.Service, l.conf.CandlesV2); err != nil {
return err
}

Expand All @@ -211,7 +211,7 @@ func (l *NodeCommand) initialiseDatabase(preLog *logging.Logger) error {
var err error
conf := l.conf.SQLStore.ConnectionConfig
conf.MaxConnPoolSize = 1
pool, err := sqlstore.CreateConnectionPool(conf)
pool, err := sqlstore.CreateConnectionPool(l.ctx, conf)
if err != nil {
return fmt.Errorf("failed to create connection pool: %w", err)
}
Expand Down Expand Up @@ -333,7 +333,7 @@ func (l *NodeCommand) initialiseNetworkHistory(preLog *logging.Logger, connConfi
connConfig.MaxConnPoolSize = 3
connConfig.MinConnPoolSize = 3

networkHistoryPool, err := sqlstore.CreateConnectionPool(connConfig)
networkHistoryPool, err := sqlstore.CreateConnectionPool(l.ctx, connConfig)
if err != nil {
return fmt.Errorf("failed to create network history connection pool: %w", err)
}
Expand Down
Loading

0 comments on commit a72ff4b

Please sign in to comment.