Skip to content

Conversation

@pietrodimarco-dfinity
Copy link
Contributor

@pietrodimarco-dfinity pietrodimarco-dfinity commented Mar 18, 2025

Node Provider Rewards V1 Library
Second phase of NPR_V1 implementation here the first phase.

In this phase the computed PerformanceMultipliers are applied to the monthly XDR Rewards each node receives for participating in the IC network.

  • Add RewardsCalculator which computes rewards per Node Provider given nodes PerformanceMultipliers and NodeRewardsTable
  • Extend ExecutionContext functionality used now as holder for final/intermediate results
  • The entire computation is now tracked in a ComputationTable
  • Change the way intermediate results are logged now represented in table columns.

Next Steps (TODO)

  • Add more tests focused on the RewardsCalculator
  • Add one more table representing the computation of BaseRewards for each NodeCategory
  • Store IntermediateResults in stable memory

pietrodimarco-dfinity and others added 30 commits February 12, 2025 19:40
…-rewards-xdr

# Conflicts:
#	Cargo.Bazel.lock
#	Cargo.lock
#	rs/node-provider-rewards/Cargo.toml
#	rs/node-provider-rewards/src/lib.rs
#	rs/node-provider-rewards/src/logs.rs
#	rs/node-provider-rewards/src/performance_calculator.rs
#	rs/node-provider-rewards/src/performance_calculator/tests.rs
Copy link
Contributor

@DFINITYManu DFINITYManu left a comment

Choose a reason for hiding this comment

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

A small refactor is taking place, I will review again after the refactor. Code is looking quite good!

@DFINITYManu DFINITYManu merged commit 0bfb756 into main Mar 21, 2025
7 checks passed
@DFINITYManu DFINITYManu deleted the pmarco/add-rewards-multiplier-lib-rewards-xdr branch March 21, 2025 16: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.

2 participants