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

Add node rewards endpoint to Node Metrics canister #705

Merged
merged 12 commits into from
Aug 13, 2024

Conversation

pietrodimarco-dfinity
Copy link
Contributor

@pietrodimarco-dfinity pietrodimarco-dfinity commented Aug 9, 2024

Added

  • node_rewards endpoint to fetch rewards with/without consecutive days penalty
  • Tested node rewards computation

Changed

  • Compute daily proposed/failed blocks on write before storing metrics
  • Modified key stable BTreeMap to be (ts, node_id)
  • Normalized node metrics struct stored as valued in stable BTreeMap.
    Normalization helps with the aggregations served by the API, now read-heavy on node rewards endpoint.

@pietrodimarco-dfinity pietrodimarco-dfinity requested a review from a team as a code owner August 9, 2024 18:39
@pietrodimarco-dfinity pietrodimarco-dfinity changed the title Add endpoint for node rewards Add node rewards endpoint to Node Metrics cansiter Aug 9, 2024
@pietrodimarco-dfinity pietrodimarco-dfinity changed the title Add node rewards endpoint to Node Metrics cansiter Add node rewards endpoint to Node Metrics backend cansiter Aug 9, 2024
@pietrodimarco-dfinity pietrodimarco-dfinity changed the title Add node rewards endpoint to Node Metrics backend cansiter Add node rewards endpoint to Node Metrics cansiter Aug 9, 2024
@DFINITYManu
Copy link
Contributor

wen svelte? :-D

@sasa-tomic sasa-tomic changed the title Add node rewards endpoint to Node Metrics cansiter Add node rewards endpoint to Node Metrics canister Aug 12, 2024
@pietrodimarco-dfinity pietrodimarco-dfinity merged commit 661bdb9 into main Aug 13, 2024
4 checks passed
@pietrodimarco-dfinity pietrodimarco-dfinity deleted the refactor-node-metrics-canister branch August 13, 2024 07:45
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.

4 participants