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

Feat: record informations in epoch service for status route #2100

Merged

Conversation

dlachaume
Copy link
Collaborator

@dlachaume dlachaume commented Nov 7, 2024

Content

This PR includes storing all the necessary information in the EpochService to support the future /status route on the aggregator.

The following data is now saved:

  • Current Cardano era
  • Current Mithril era
  • Total number of SPOs for the current epoch
  • Total stake for the current epoch

This PR will allow the /status route to expose these details when implemented.

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested
  • Documentation
    • Update README file (if relevant)
    • Update documentation website (if relevant)
    • Add dev blog post (if relevant)

Issue(s)

Relates to #2071

@dlachaume dlachaume self-assigned this Nov 7, 2024
@dlachaume dlachaume force-pushed the dlachaume/2071/record-in-epoch-service-for-status-route branch from 6582e5d to 93de39c Compare November 7, 2024 16:14
Copy link

github-actions bot commented Nov 7, 2024

Test Results

    4 files  ±0     51 suites  ±0   11m 2s ⏱️ -10s
1 437 tests +1  1 437 ✅ +1  0 💤 ±0  0 ❌ ±0 
1 648 runs  +1  1 648 ✅ +1  0 💤 ±0  0 ❌ ±0 

Results for commit b4f4c4f. ± Comparison against base commit d2d8c4c.

♻️ This comment has been updated with latest results.

@dlachaume dlachaume force-pushed the dlachaume/2071/record-in-epoch-service-for-status-route branch 2 times, most recently from f05bcf1 to 129cbb4 Compare November 8, 2024 08:07
@dlachaume dlachaume force-pushed the dlachaume/2071/record-in-epoch-service-for-status-route branch from 129cbb4 to 13cd95a Compare November 8, 2024 09:04
@dlachaume dlachaume temporarily deployed to testing-sanchonet November 8, 2024 09:19 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/2071/record-in-epoch-service-for-status-route branch from 13cd95a to 5d48588 Compare November 8, 2024 10:04
@dlachaume dlachaume temporarily deployed to testing-sanchonet November 8, 2024 10:15 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/2071/record-in-epoch-service-for-status-route branch from 5d48588 to 1419034 Compare November 8, 2024 10:26
Run `update_stake_distribution` before `inform_epoch`, as it's now needed to record the total number of SPOs and total stake in the Epoch service.
@dlachaume dlachaume temporarily deployed to testing-sanchonet November 8, 2024 10:37 — with GitHub Actions Inactive
@dlachaume dlachaume force-pushed the dlachaume/2071/record-in-epoch-service-for-status-route branch from 1419034 to 57e4b22 Compare November 8, 2024 10:38
@dlachaume dlachaume marked this pull request as ready for review November 8, 2024 10:40
@dlachaume dlachaume temporarily deployed to testing-sanchonet November 8, 2024 10:46 — with GitHub Actions Inactive
mithril-aggregator/src/services/epoch_service.rs Outdated Show resolved Hide resolved
mithril-aggregator/src/services/epoch_service.rs Outdated Show resolved Hide resolved
mithril-aggregator/src/services/epoch_service.rs Outdated Show resolved Hide resolved
mithril-aggregator/src/services/epoch_service.rs Outdated Show resolved Hide resolved
mithril-aggregator/src/services/epoch_service.rs Outdated Show resolved Hide resolved
mithril-aggregator/src/services/epoch_service.rs Outdated Show resolved Hide resolved
@dlachaume dlachaume force-pushed the dlachaume/2071/record-in-epoch-service-for-status-route branch from 46c63c7 to 95f3d41 Compare November 8, 2024 13:44
@dlachaume dlachaume force-pushed the dlachaume/2071/record-in-epoch-service-for-status-route branch from 95f3d41 to ca3706c Compare November 8, 2024 13:55
@dlachaume dlachaume temporarily deployed to testing-sanchonet November 8, 2024 14:07 — with GitHub Actions Inactive
Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

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

LGTM 👍

* mithril-aggregator from `0.5.106` to `0.5.107`
* mithril-common from `0.4.83` to `0.4.84`
Copy link
Collaborator

@sfauvel sfauvel left a comment

Choose a reason for hiding this comment

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

LGTM

@dlachaume dlachaume merged commit 57af397 into main Nov 12, 2024
47 checks passed
@dlachaume dlachaume deleted the dlachaume/2071/record-in-epoch-service-for-status-route branch November 12, 2024 08:06
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