Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aggregated referees stats is off by one epoch #10241

Closed
ValentinTrinque opened this issue Dec 11, 2023 · 0 comments · Fixed by #10242
Closed

aggregated referees stats is off by one epoch #10241

ValentinTrinque opened this issue Dec 11, 2023 · 0 comments · Fixed by #10242
Assignees

Comments

@ValentinTrinque
Copy link
Contributor

There seems to be discrapancy between totalRefereeNotionalTakerVolume (aka PeriodVolume) and sum of epochNotionalTakerVolumes.

The observed issue is due to the condition in datanode/sqlstore/referral_sets.go which includes one more epoch than needed:

epoch_range as (select coalesce(max(id) - %d, 0) as start_epoch, coalesce(max(id), 0) as end_epoch
    from epochs
    where end_time is not null

It looks like the aggregationEpochs (%d) should be reduced by 1.

For ref: vegaprotocol/frontend-monorepo#5457

@ValentinTrinque ValentinTrinque added this to the 🏰 Palazzo Mistero milestone Dec 11, 2023
@ValentinTrinque ValentinTrinque self-assigned this Dec 11, 2023
@ValentinTrinque ValentinTrinque changed the title aggregated referral set stats is off by one epoch aggregated referees stats is off by one epoch Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant