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

Track stake distribution across epochs #42

Merged
merged 9 commits into from
Jan 8, 2025
Merged

Track stake distribution across epochs #42

merged 9 commits into from
Jan 8, 2025

Conversation

KtorZ
Copy link
Contributor

@KtorZ KtorZ commented Dec 20, 2024

No description provided.

Copy link
Contributor

@abailly abailly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch :)

+1,431,355 −572,246

I am not going to review this, I trust you.

@KtorZ
Copy link
Contributor Author

KtorZ commented Dec 21, 2024

That's mostly the snapshots data though. The actual changes aren't that large, though the diff on the import command is perhaps hard to read.

@Quantumplation
Copy link
Contributor

I imagine that's going to be a recurring problem for this kind of work; Random idea: what if we stored snapshot tests in a separate but closely related repo, perhaps with a git submodule, to keep diffs less intimidating?

@KtorZ
Copy link
Contributor Author

KtorZ commented Dec 22, 2024

We could have them as git sub modules I suppose. Those tests are ignored by default anyway because they require a synchronised node ledger database to run. So they can easily be taken out of the main source code.

KtorZ added 9 commits January 4, 2025 14:47
  As well as their issuers, necessary for performing rewards calculations later on.
  Also, use preprod snapshot from epoch 165, so that reward calculation can happen using the stake distribution of epoch 163, which is already in Conway and therefore, doesn't include any of the stake credential pointers.
…well.

  We're starting to need the whole ledger state for the rewards and stake distribution calculation. In particular, the rewards calculated during the epoch needs to be added to the accounts at the epoch boundary. Similarly, the reserves and treasury need to extracted and tracked.
  Still, unregistered rewards are missing and needs to be added
  eventually.
@KtorZ KtorZ force-pushed the ledger/stake-distr branch from a2b7e9d to 6e98f7f Compare January 4, 2025 14:03
@KtorZ
Copy link
Contributor Author

KtorZ commented Jan 8, 2025

As discussed off-band, merging this, so we can move on with other stuff on top. It isn't complete (still missing rewards calculation), but current master isn't either so it's not like the ledger state is more wrong 🤷. Actually gets us one step closer.

@KtorZ KtorZ marked this pull request as ready for review January 8, 2025 10:16
@KtorZ KtorZ merged commit ec7bffb into main Jan 8, 2025
5 checks passed
@KtorZ KtorZ deleted the ledger/stake-distr branch January 8, 2025 10:16
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

Successfully merging this pull request may close these issues.

3 participants