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

Tweak Rewards API: Unique ID + do not sum rewards per layer #272

Open
brusherru opened this issue Sep 20, 2023 · 0 comments
Open

Tweak Rewards API: Unique ID + do not sum rewards per layer #272

brusherru opened this issue Sep 20, 2023 · 0 comments

Comments

@brusherru
Copy link
Member

brusherru commented Sep 20, 2023

Rationale

There are two issues with GlobalStateService.AccountDataQuery and GlobalStateService.AccountDataStream regarding Rewards.

The first one is that the output of these endpoints is a bit inconsistent:

  • AccountDataQuery returns the sum of rewards per layer. So it returns only one Reward object per layer.
  • AccountDataStream may return many rewards per layer.

The second one is that we don't have any unique ID in the Reward object, which makes it impossible to get rid of duplicates.
We need to add SmesherID / BallotID / AtxID or any other unique ID.

Required by

  • Explorer: to get rid of duplicates
  • Smapp: to get rid of duplicates & keep storing data on fs :)

Additional info

We already have an issue to add SmesherID into the Reward object: spacemeshos/go-spacemesh#4529

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant