Skip to content

Commit 150398c

Browse files
authored
Merge pull request #3378 from vegaprotocol/release/v0.35.0
Release v0.35.0
2 parents f5219e6 + e3d34da commit 150398c

196 files changed

Lines changed: 7026 additions & 1929 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.spelling

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ base64
1111
blockchain
1212
Buf
1313
codegen
14+
cyclomatic
1415
datestamps
1516
datetime
1617
denylist
@@ -31,13 +32,15 @@ hotfix
3132
Ilya
3233
init
3334
lifecycle
35+
linters
3436
MacOSX
3537
MarkToMarket
3638
multisig
3739
mutex
3840
mutexes
3941
nodewallet
4042
notarising
43+
Prometheus
4144
proto
4245
protobuf
4346
protobufs

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Changelog
22

3+
## 0.35.0
4+
*2021-04-21*
5+
6+
### Improvements
7+
- [#3341](https://github.com/vegaprotocol/vega/pull/3341) - Add logging for transactions rejected for having no accounts
8+
- [#3339](https://github.com/vegaprotocol/vega/pull/3339) - Reimplement amending LPs not to be cancel and replace
9+
- [#3371](https://github.com/vegaprotocol/vega/pull/3371) - Optimise calculation of cumulative price levels
10+
- [#3339](https://github.com/vegaprotocol/vega/pull/3339) - Reuse LP orders IDs when they are re-created
11+
- [#3385](https://github.com/vegaprotocol/vega/pull/3385) - Track the time spent in auction via Prometheus metrics
12+
- [#3376](https://github.com/vegaprotocol/vega/pull/3376) - Implement a simple benchmarking framework for the core trading
13+
- [#3371](https://github.com/vegaprotocol/vega/pull/3371) - Optimize indicative price and volume calculation
14+
15+
### Fixes
16+
- [#3356](https://github.com/vegaprotocol/vega/pull/3356) - Auctions are extended if exiting auction would leave either side of the book empty
17+
- [#3348](https://github.com/vegaprotocol/vega/pull/3348) - Correctly set time when liquidity engine is created
18+
- [#3321](https://github.com/vegaprotocol/vega/pull/3321) - Fix bond account use on LP submission
19+
- [#3369](https://github.com/vegaprotocol/vega/pull/3369) - Reimplement amending LPs not to be cancel and replace
20+
- [#3358](https://github.com/vegaprotocol/vega/pull/3358) - Improve event bus stability
21+
- [#3363](https://github.com/vegaprotocol/vega/pull/3363) - Fix behaviour when leaving auctions
22+
- [#3321](https://github.com/vegaprotocol/vega/pull/3321) - Do not slash bond accounts on LP submission
23+
- [#3350](https://github.com/vegaprotocol/vega/pull/3350) - Fix equity like share in the market data
24+
- [#3363](https://github.com/vegaprotocol/vega/pull/3363) - Ensure leaving an auction cannot trigger another auction / auction leave
25+
- [#3369](https://github.com/vegaprotocol/vega/pull/3369) - Fix LP order deployments
26+
- [#3366](https://github.com/vegaprotocol/vega/pull/3366) - Set the fee paid in uncrossing auction trades
27+
- [#3364](https://github.com/vegaprotocol/vega/pull/3364) - Improve / fix positions tracking
28+
- [#3358](https://github.com/vegaprotocol/vega/pull/3358) - Fix event bus by deep cloning all messages
29+
- [#3374](https://github.com/vegaprotocol/vega/pull/3374) - Check trades in integration tests
30+
331
## 0.34.1
432

533
*2021-04-08*
File renamed without changes.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Vega
22

3-
Version 0.34.1.
3+
Version 0.35.0.
44

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

REFACTORING.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,37 @@ This document is an attempt to get the team on the same page about the refactori
77
* Make the code easier to deal with.
88
* Ease the addition (or update) of features.
99

10+
* Remove technical limitation
11+
* Maintainability: Clean code / SOLID philosophy
12+
* Make it easier to understand
13+
* [The Pony philosophy](https://www.ponylang.io/discover/#the-pony-philosophy)
14+
1015
## How?
1116
* Defined how we can reach that goal.
12-
* Which techniques? More domain-oriented and less "algorithmic".
17+
* Which techniques?
18+
* More domain-oriented and less "algorithmic". `order.IsUncrossed()` instead of `order.offet < -1`
19+
* avoid graph style code, more like tree structure.
20+
* SOLID
21+
* clean code
22+
* avoid coupling: Better interfaces, or event driven packages.
1323
* Defined critical code path for maximum impact.
14-
* Identify the hottest path of code change.
24+
* Identify the hottest path of code change :
25+
* compare results with cyclomatic complexity (`gocyclo`).
26+
* rate of changes of the code and files
27+
* number of import inside a file -> reveal a code smell ?
1528
* Defined medium to share the knowledge.
1629
* Create workshops on specific problems to find a solution, and be on the same page.
1730
* Save our decisions into a file.
31+
* Use external articles on the matter. file with "do this" and "don't do this".
1832

1933
## When?
34+
35+
Be discussed before being addressed.
36+
37+
Verify the test coverage (coverage is not everything) before refactor.
38+
39+
Beware of refactoring scope to not go too far, and cause conflict.
40+
2041
### Opportunistic refactoring
2142
It's done along the way.
2243

@@ -43,3 +64,10 @@ Basically, the boy scout's rule.
4364

4465
* How to avoid overlapping with someone else?
4566
* Into the same PR as the one of the feature or a different one?
67+
68+
## Planing
69+
70+
1. find a tool to highlight hot code path
71+
2. Bootstrap files for coding style, convention and stuff.
72+
3. Find the biggest offenders and start from there to build our guideline.
73+
4. `golangci` : Use linters to get more insight on smells.

assets/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type Config struct {
1515

1616
// NewDefaultConfig creates an instance of the package specific configuration, given a
1717
// pointer to a logger instance to be used for logging within the package.
18-
func NewDefaultConfig(defaultRootPath string) Config {
18+
func NewDefaultConfig() Config {
1919
return Config{
2020
Level: encoding.LogLevel{Level: logging.InfoLevel},
2121
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"id": "076BB86A5AA41E3E",
3+
"tradableInstrument": {
4+
"instrument": {
5+
"id": "unused-id",
6+
"code": "BTCUSD.MF21",
7+
"name": "BTCUSD Monthly (30 Jun 2021)",
8+
"metadata": {
9+
"tags": [
10+
"base:BTC",
11+
"quote:USD",
12+
"class:fx/crypto",
13+
"monthly",
14+
"sector:crypto"
15+
]
16+
},
17+
"future": {
18+
"maturity": "2021-06-30T23:59:59Z",
19+
"settlementAsset": "fDAI",
20+
"quoteName": "USD",
21+
"oracleSpec": {
22+
"pubKeys": [
23+
"0x51a3a77554709b5db7b769d4376560ad6398c7b08380b5a3e49bda1236697f4f"
24+
],
25+
"filters": [
26+
{
27+
"key": {
28+
"name": "prices.BTC.value",
29+
"type": "TYPE_INTEGER"
30+
},
31+
"conditions": [
32+
]
33+
}
34+
]
35+
},
36+
"oracleSpecBinding": {
37+
"settlementPriceProperty": "prices.BTC.value"
38+
}
39+
}
40+
},
41+
"marginCalculator": {
42+
"scalingFactors": {
43+
"searchLevel": 1.1,
44+
"initialMargin": 1.2,
45+
"collateralRelease": 1.5
46+
}
47+
},
48+
"logNormalRiskModel": {
49+
"riskAversionParameter": 0.0001,
50+
"tau": 0.0000190129,
51+
"params": {
52+
"mu": 0,
53+
"r": 0.016,
54+
"sigma": 1.25
55+
}
56+
}
57+
},
58+
"decimalPlaces": "5",
59+
"fees": {
60+
"factors": {
61+
"makerFee": "0.00075",
62+
"infrastructureFee": "0.00175",
63+
"liquidityFee": "0.0025"
64+
}
65+
},
66+
"openingAuction": {
67+
"duration": "10",
68+
"volume": "0"
69+
},
70+
"priceMonitoringSettings": {
71+
"parameters": {
72+
"triggers": [
73+
{
74+
"horizon": 43200,
75+
"probability": 0.9999999,
76+
"auctionExtension": 600
77+
}
78+
]
79+
},
80+
"updateFrequency": "1"
81+
},
82+
"continuous": {
83+
"tickSize": "0.00001"
84+
},
85+
"liquidityMonitoringParameters": {
86+
"targetStakeParameters": {
87+
"timeWindow": "3600",
88+
"scalingFactor": 10
89+
},
90+
"triggeringRatio": 0
91+
}
92+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"id": "1F0BB6EB5703B099",
3+
"tradableInstrument": {
4+
"instrument": {
5+
"id": "unused-id",
6+
"code": "ETHBTC.QM21",
7+
"name": "ETHBTC Quarterly (30 Jun 2021)",
8+
"metadata": {
9+
"tags": [
10+
"base:ETH",
11+
"quote:BTC",
12+
"class:fx/crypto",
13+
"quarterly",
14+
"sector:crypto"
15+
]
16+
},
17+
"future": {
18+
"maturity": "2021-06-30T23:59:59Z",
19+
"settlementAsset": "fBTC",
20+
"quoteName": "BTC",
21+
"oracleSpec": {
22+
"pubKeys": [
23+
"0x51a3a77554709b5db7b769d4376560ad6398c7b08380b5a3e49bda1236697f4f"
24+
],
25+
"filters": [
26+
{
27+
"key": {
28+
"name": "prices.ETH.value",
29+
"type": "TYPE_INTEGER"
30+
},
31+
"conditions": [
32+
]
33+
}
34+
]
35+
},
36+
"oracleSpecBinding": {
37+
"settlementPriceProperty": "prices.ETH.value"
38+
}
39+
}
40+
},
41+
"marginCalculator": {
42+
"scalingFactors": {
43+
"searchLevel": 1.025,
44+
"initialMargin": 1.05,
45+
"collateralRelease": 1.1
46+
}
47+
},
48+
"logNormalRiskModel": {
49+
"riskAversionParameter": 0.01,
50+
"tau": 0.0001140771161,
51+
"params": {
52+
"mu": 0,
53+
"r": 0.016,
54+
"sigma": 0.3
55+
}
56+
}
57+
},
58+
"decimalPlaces": "5",
59+
"fees": {
60+
"factors": {
61+
"makerFee": "0.00075",
62+
"infrastructureFee": "0.00175",
63+
"liquidityFee": "0.0025"
64+
}
65+
},
66+
"openingAuction": {
67+
"duration": "10",
68+
"volume": "0"
69+
},
70+
"priceMonitoringSettings": {
71+
"parameters": {
72+
"triggers": [
73+
{
74+
"horizon": 43200,
75+
"probability": 0.9999999,
76+
"auctionExtension": 600
77+
}
78+
]
79+
},
80+
"updateFrequency": "1"
81+
},
82+
"continuous": {
83+
"tickSize": "0.00001"
84+
},
85+
"liquidityMonitoringParameters": {
86+
"targetStakeParameters": {
87+
"timeWindow": "3600",
88+
"scalingFactor": 10
89+
},
90+
"triggeringRatio": 0
91+
}
92+
}

0 commit comments

Comments
 (0)