Skip to content

Commit

Permalink
Merge pull request #2948 from vegaprotocol/release/v0.31.0
Browse files Browse the repository at this point in the history
Release v0.31.0
  • Loading branch information
3jtechtest committed Feb 9, 2021
2 parents 61112d0 + 2bd795f commit 76d2a21
Show file tree
Hide file tree
Showing 243 changed files with 23,003 additions and 15,616 deletions.
3 changes: 1 addition & 2 deletions .drone-github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ steps:
commands:
- failed=""
- make staticcheck
- make buflint
- if test "$$DRONE_TARGET_BRANCH" = master -o "$$(grep -cE '(^go.(mod|sum)|\.go)$$' git_diff.txt)" -gt 0 ; then
make retest || exit 1 ;
for target in gqlgen_check print_check proto_check race vet ;
Expand Down Expand Up @@ -306,9 +307,7 @@ steps:
api_key:
from_secret: GITHUB_API_TOKEN
files:
- cmd/dummyriskmodel/dummyriskmodel-*
- cmd/vega/vega-*
- cmd/vegaccount/vegaccount-*
- cmd/vegastream/vegastream-*
when:
event: tag
Expand Down
3 changes: 3 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Please remember to create a new branch on github.com/vegaprotocol/system-tests in order to create/fix/update the matching tests for your changes.

Closes #XXX
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ tmp/
vendor/
.vscode/
proto/**.orig
*.pb.go-re
4 changes: 4 additions & 0 deletions .spelling
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# markdown-spellcheck spelling configuration file
ABI
ABIs
a.k.a
allowlist
allowlisted
api
Expand All @@ -19,13 +20,16 @@ enums
ERC20
Ethereum
faucet
fix-a-thon
github
GitLab
Golang
GraphQL
gRPC
hotfix
Ilya
init
lifecycle
MacOSX
MarkToMarket
multisig
Expand Down
40 changes: 39 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# Changelog

## 0.31.0

*2021-02-09*

Many of the fixes below relate to Liquidity Commitments, which are still disabled in testnet, and Data Sourcing, which is also not enabled. Data Sourcing (a.k.a Oracles) is one of the last remaining pieces we need to complete settlement at instrument expiry, and Liquidity Commitment will be enabled when the functionality has been stabilised.

This release does improve protocol documentation, with all missing fields filled in and the explanations for Pegged Orders expanded. Two crashers have been fixed, although the first is already live as hotfix on testnet, and the other is in functionality that is not yet enabled.

This release also makes some major API changes:

- `api.TradingClient` -> `api.v1.TradingServiceClient`
- `api.TradingDataClient` -> `api.v1.TradingDataServiceClient`
- Fields have changed from camel-case to snake-cased (e.g. `someFieldName` is now `some_field_name`)
- All API calls now have request and response messages whose names match the API call name (e.g. `GetSomething` now has a request called `GetSomethingRequest` and a response called `GetSomethingResponse`)
- See [#2879](https://github.com/vegaprotocol/vega/pull/2879) for details

### Improvements
- [#2879](https://github.com/vegaprotocol/vega/pull/2879) - 🔥Update all the protobuf files with Buf recommendations
- [#2847](https://github.com/vegaprotocol/vega/pull/2847) - Improve proto documentation, in particular for pegged orders
- [#2905](https://github.com/vegaprotocol/vega/pull/2905) - Update `vega verify` command to verify genesis block files
- [#2851](https://github.com/vegaprotocol/vega/pull/2851) - Enable distribution of liquidity fees to liquidity providers
- [#2871](https://github.com/vegaprotocol/vega/pull/2871) - Add `submitOracleData` command
- [#2887](https://github.com/vegaprotocol/vega/pull/2887) - Add Open Oracle data processing & data normalisation
- [#2915](https://github.com/vegaprotocol/vega/pull/2915) - Add Liquidity Commitments to API responses

### Fixes
- [#2913](https://github.com/vegaprotocol/vega/pull/2913) - Fix market lifecycle events not being published through event bus API
- [#2906](https://github.com/vegaprotocol/vega/pull/2906) - Add new process for calculating margins for orders during auction
- [#2887](https://github.com/vegaprotocol/vega/pull/2887) - Liquidity Commitment fix-a-thon
- [#2879](https://github.com/vegaprotocol/vega/pull/2879) - Apply `Buf` lint recommendations
- [#2872](https://github.com/vegaprotocol/vega/pull/2872) - Improve field names in fee distribution package
- [#2867](https://github.com/vegaprotocol/vega/pull/2867) - Fix GraphQL bug: deposits `creditedAt` incorrectly showed `createdAt` time, not credit time
- [#2858](https://github.com/vegaprotocol/vega/pull/2858) - Fix crasher caused by parking pegged orders for auction
- [#2852](https://github.com/vegaprotocol/vega/pull/2852) - Remove unused binaries from CI builds
- [#2850](https://github.com/vegaprotocol/vega/pull/2850) - Fix bug that caused fees to be charged for pegged orders
- [#2893](https://github.com/vegaprotocol/vega/pull/2893) - Remove unused dependency in repricing
- [#2929](https://github.com/vegaprotocol/vega/pull/2929) - Refactor GraphQL resolver for withdrawals
- [#2939](https://github.com/vegaprotocol/vega/pull/2939) - Fix crasher caused by incorrectly loading Fee account for transfers

## 0.30.0

*2021-01-19*
Expand All @@ -13,7 +52,6 @@ The Ethereum bridge also received some work - in particular the number of confir
:two: This fixes an issue on testnet where votes were not registered when voting on open governance proposals. The required number of Ropsten `VOTE` tokens was being calculated incorrectly on testnet, leading to all votes quietly being ignored. In 0.30.0, voting works as expected again.

### New

- [#2732](https://github.com/vegaprotocol/vega/pull/2732) Add REST endpoint to fetch all proposals (`/governance/proposals`)
- [#2735](https://github.com/vegaprotocol/vega/pull/2735) Add `FeeSplitter` to correctly split fee portion of an aggressive order
- [#2745](https://github.com/vegaprotocol/vega/pull/2745) Add transfer bus events for withdrawals and deposits
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ spellcheck: ## Run markdown spellcheck container
staticcheck: ## Run statick analysis checks
@./script/build.sh -a staticcheck

.PHONY: buflint
buflint: ## Run buf lint
@./script/build.sh -a buflint

.PHONY: semgrep
semgrep: ## Run semgrep static analysis checks
@./script/build.sh -a semgrep
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Vega

Version 0.30.0.
Version 0.31.0.

A decentralised trading platform that allows pseudo-anonymous trading of derivatives on a blockchain.

Expand Down
12 changes: 6 additions & 6 deletions accounts/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (s *Svc) ReloadConf(cfg Config) {
}

func (s *Svc) PrepareWithdraw(ctx context.Context, w *types.WithdrawSubmission) error {
if len(w.PartyID) <= 0 {
if len(w.PartyId) <= 0 {
return ErrMissingPartyID
}
if len(w.Asset) <= 0 {
Expand All @@ -87,8 +87,8 @@ func (s *Svc) GetPartyAccounts(partyID, marketID, asset string, ty types.Account
// https://github.com/vegaprotocol/vega/issues/416
for _, acc := range accounts {
if acc.GetType() == types.AccountType_ACCOUNT_TYPE_GENERAL || acc.GetType() == types.AccountType_ACCOUNT_TYPE_LOCK_WITHDRAW {
if acc.GetMarketID() == "!" {
acc.MarketID = ""
if acc.GetMarketId() == "!" {
acc.MarketId = ""
}
}
}
Expand Down Expand Up @@ -117,8 +117,8 @@ func (s *Svc) GetFeeInfrastructureAccounts(asset string) ([]*types.Account, erro
if acc.Owner == "*" {
acc.Owner = ""
}
if acc.MarketID == "!" {
acc.MarketID = ""
if acc.MarketId == "!" {
acc.MarketId = ""
}
}
return accounts, err
Expand Down Expand Up @@ -174,7 +174,7 @@ func (s *Svc) ObserveAccounts(ctx context.Context, retries int, marketID string,
filtered := make([]*types.Account, 0, len(accs))
for _, acc := range accs {
acc := acc
if (len(marketID) <= 0 || marketID == acc.MarketID) &&
if (len(marketID) <= 0 || marketID == acc.MarketId) &&
(len(partyID) <= 0 || partyID == acc.Owner) &&
(len(asset) <= 0 || asset == acc.Asset) &&
(ty == types.AccountType_ACCOUNT_TYPE_UNSPECIFIED || ty == acc.Type) {
Expand Down
4 changes: 2 additions & 2 deletions accounts/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ func getTestAccounts(owner, market string, accTypes ...types.AccountType) []*typ
Owner: owner,
Balance: 0,
Asset: asset,
MarketID: market,
MarketId: market,
Type: t,
}
// general accounts don't have a market ID
if t == types.AccountType_ACCOUNT_TYPE_GENERAL {
acc.MarketID = ""
acc.MarketId = ""
}
ret = append(ret, acc)
}
Expand Down
4 changes: 2 additions & 2 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (g *GRPCServer) Start() {
statusChecker: g.statusChecker,
}
g.tradingService = tradingSvc
protoapi.RegisterTradingServer(g.srv, tradingSvc)
protoapi.RegisterTradingServiceServer(g.srv, tradingSvc)

tradingDataSvc := &tradingDataService{
log: g.log,
Expand Down Expand Up @@ -260,7 +260,7 @@ func (g *GRPCServer) Start() {
}
go tradingDataSvc.updateNetInfo(g.ctx)
g.tradingDataService = tradingDataSvc
protoapi.RegisterTradingDataServer(g.srv, tradingDataSvc)
protoapi.RegisterTradingDataServiceServer(g.srv, tradingDataSvc)

err = g.srv.Serve(lis)
if err != nil {
Expand Down
12 changes: 6 additions & 6 deletions api/trading.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type TradeOrderService interface {
//go:generate go run github.com/golang/mock/mockgen -destination mocks/liquidity_service_mock.go -package mocks code.vegaprotocol.io/vega/api LiquidityService
type LiquidityService interface {
PrepareLiquidityProvisionSubmission(context.Context, *types.LiquidityProvisionSubmission) error
Get(market, party string) ([]types.LiquidityProvision, error)
Get(party, market string) ([]types.LiquidityProvision, error)
}

// AccountService ...
Expand Down Expand Up @@ -77,7 +77,7 @@ type tradingService struct {
statusChecker *monitoring.Status
}

func (s *tradingService) PrepareSubmitOrder(ctx context.Context, req *protoapi.SubmitOrderRequest) (*protoapi.PrepareSubmitOrderResponse, error) {
func (s *tradingService) PrepareSubmitOrder(ctx context.Context, req *protoapi.PrepareSubmitOrderRequest) (*protoapi.PrepareSubmitOrderResponse, error) {
startTime := time.Now()
defer metrics.APIRequestAndTimeGRPC("PrepareSubmitOrder", startTime)
err := s.tradeOrderService.PrepareSubmitOrder(ctx, req.Submission)
Expand All @@ -93,11 +93,11 @@ func (s *tradingService) PrepareSubmitOrder(ctx context.Context, req *protoapi.S
}
return &protoapi.PrepareSubmitOrderResponse{
Blob: raw,
SubmitID: req.Submission.Reference,
SubmitId: req.Submission.Reference,
}, nil
}

func (s *tradingService) PrepareCancelOrder(ctx context.Context, req *protoapi.CancelOrderRequest) (*protoapi.PrepareCancelOrderResponse, error) {
func (s *tradingService) PrepareCancelOrder(ctx context.Context, req *protoapi.PrepareCancelOrderRequest) (*protoapi.PrepareCancelOrderResponse, error) {
startTime := time.Now()
defer metrics.APIRequestAndTimeGRPC("PrepareCancelOrder", startTime)
err := s.tradeOrderService.PrepareCancelOrder(ctx, req.Cancellation)
Expand All @@ -116,7 +116,7 @@ func (s *tradingService) PrepareCancelOrder(ctx context.Context, req *protoapi.C
}, nil
}

func (s *tradingService) PrepareAmendOrder(ctx context.Context, req *protoapi.AmendOrderRequest) (*protoapi.PrepareAmendOrderResponse, error) {
func (s *tradingService) PrepareAmendOrder(ctx context.Context, req *protoapi.PrepareAmendOrderRequest) (*protoapi.PrepareAmendOrderResponse, error) {
startTime := time.Now()
defer metrics.APIRequestAndTimeGRPC("PrepareAmendOrder", startTime)
err := s.tradeOrderService.PrepareAmendOrder(ctx, req.Amendment)
Expand Down Expand Up @@ -196,7 +196,7 @@ func (s *tradingService) PrepareProposal(
if err := req.Validate(); err != nil {
return nil, apiError(codes.InvalidArgument, ErrMalformedRequest, err)
}
proposal, err := s.governanceService.PrepareProposal(ctx, req.PartyID, req.Reference, req.Proposal)
proposal, err := s.governanceService.PrepareProposal(ctx, req.PartyId, req.Reference, req.Proposal)
if err != nil {
return nil, apiError(codes.Internal, ErrPrepareProposal, err)
}
Expand Down
Loading

0 comments on commit 76d2a21

Please sign in to comment.