vegaprotocol / vega

A Go implementation of the Vega Protocol, a protocol for creating and trading derivatives on a fully decentralised network.
https://vega.xyz
GNU Affero General Public License v3.0
38 stars 22 forks source link

[Bug]: party with open position not counted as active #9505

Closed cdummett closed 1 year ago

cdummett commented 1 year ago

Problem encountered

Two new test cases added to cover the scenario where a party opens a position and keeps it open over multiple epochs. If the position is larger than the network parameter rewards.activityStreak.minQuantumOpenVolume then the party should be deemed active.

Tests failing as party is only being considered active in the epoch they open the position.

PR - https://github.com/vegaprotocol/vega/pull/9503

Observed behaviour

  1. rewards.activityStreak.minQuantumTradeVolume set high so we only consider open positions for activity
  2. Epoch 1: party opens position that is large enough to be considered active
  3. Move to next epoch, check stats, activity streak incremented πŸ‘
  4. Epoch 2: party places no new trades but their position remains open
  5. Move to next epoch, check stats, inactivity streak incremented πŸ”΄

Expected behaviour

  1. rewards.activityStreak.minQuantumTradeVolume set high so we only consider open positions for activity
  2. Epoch 1: party opens position that is large enough to be considered active
  3. Move to next epoch, check stats, activity streak incremented πŸ‘
  4. Epoch 2: party places no new trades but their position remains open (they should be considered active)
  5. Move to next epoch, check stats, activity streak incremented 🟒

Steps to reproduce

1. checkout feat/activity_streak_tests
2. cd core
3. go test -v ./integration/... --godog.format=pretty $(pwd)/integration/features/activity-streak/0086-ASPR-evaluating_activity.feature:154

Software version

feat/activity_streak_tests

Failing test

/core//integration/features/activity-streak/0086-ASPR-evaluating_activity.feature:154

Jenkins run

No response

Configuration used

No response

Relevant log output

No response

jeremyletang commented 1 year ago

fixed in: https://github.com/vegaprotocol/vega/pull/9503