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

validation + node rewards #123

Merged
merged 1 commit into from
Nov 13, 2023
Merged

validation + node rewards #123

merged 1 commit into from
Nov 13, 2023

Conversation

aie0
Copy link
Contributor

@aie0 aie0 commented Nov 8, 2023

No description provided.

@aie0 aie0 requested a review from yahortsaryk November 8, 2023 22:46
let charge: BalanceOf<T> = amount.saturated_into::<BalanceOf<T>>();

<T as pallet::Config>::Currency::transfer(
&updated_billing_report.vault,
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we going to use a specific vault per each Billing Report that was generated as a sub-account? I thought we were about to start from a single Pallet's vault account. Did you confirm that sub-accounts are safe?

ChargingFinished { cluster_id: ClusterId, era: DdcEra },
RewardingStarted { cluster_id: ClusterId, era: DdcEra },
Rewarded { cluster_id: ClusterId, era: DdcEra, node_id: T::AccountId, amount: u128 },
RewardingFinished { cluster_id: ClusterId, era: DdcEra },
Copy link
Contributor

Choose a reason for hiding this comment

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

I think in the Rewarded event the field node_id should be renamed to node_provider_id or node_stash_id, as the reward is being received by the node operator.
As for node identifier (node_id), we use NodePublicKey type, which may be different from the one supported by T::AccountId and depends on DDC node's internal implementation

@aie0 aie0 merged commit f84e3c2 into feat/payouts-pallet Nov 13, 2023
2 checks passed
@aie0 aie0 deleted the finish-payout branch November 13, 2023 12:30
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