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(DRE): Add RewardPeriod definition to NPR_v1 #3840

Draft
wants to merge 4 commits into
base: pmarco/add-npr-lib-v1
Choose a base branch
from

Conversation

pietrodimarco-dfinity
Copy link
Contributor

@pietrodimarco-dfinity pietrodimarco-dfinity commented Feb 6, 2025

  • Introduced RewardPeriod struct as an input to the calculate_rewards function.
  • RewardPeriod is derived from two unaligned timestamps, which are adjusted to align with the start and end of their respective days. This ensures that only the relevant BlockmakerMetrics within the reward period are considered, maintaining the invariant defined in [ic_replicated_state::metadata_state::BlockmakerMetricsTimeSeries].
  • Added input validation for subnet metrics.

@pietrodimarco-dfinity pietrodimarco-dfinity requested a review from a team as a code owner February 6, 2025 17:16
@pietrodimarco-dfinity pietrodimarco-dfinity marked this pull request as draft February 6, 2025 17:16
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

If this pull request affects the behavior of any canister owned by
the Governance team, remember to update the corresponding
unreleased_changes.md file(s).

To acknowldge this reminder (and unblock the PR), dismiss this
code review by going to the bottom of the pull request page, and
supply one of the following reasons:

  1. Done.

  2. No canister behavior changes.

@pietrodimarco-dfinity pietrodimarco-dfinity changed the title Input validation and rewarding period definition feat(DRE) Add RewardPeriod definition to NPR lib. Feb 7, 2025
@pietrodimarco-dfinity pietrodimarco-dfinity changed the title feat(DRE) Add RewardPeriod definition to NPR lib. feat(DRE) Add RewardPeriod definition to NPR_v1 Feb 7, 2025
@pietrodimarco-dfinity pietrodimarco-dfinity changed the title feat(DRE) Add RewardPeriod definition to NPR_v1 feat(DRE): Add RewardPeriod definition to NPR_v1 Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant