diff --git a/contracts/contracts/activities/IValidatorRewarder.sol b/contracts/contracts/activities/IValidatorRewarder.sol index 96d79e1b4..abd7e83f7 100644 --- a/contracts/contracts/activities/IValidatorRewarder.sol +++ b/contracts/contracts/activities/IValidatorRewarder.sol @@ -7,14 +7,14 @@ import {Consensus} from "./Activity.sol"; /// @title ValidatorRewarder interface. /// /// @dev Implement this interface and supply the address of the implementation contract at subnet creation to process -/// subnet summaries at this level, and disburse rewards to validators based on their block production activity. +/// consensus activity summaries at this level, and disburse rewards to validators based on their block production +/// activities inside the subnet. /// /// This interface will be called by the subnet actor when a validator presents a _valid_ proof of consensus activity, -/// via the ValidatorRewardFacet#claim -/// +/// via the ValidatorRewardFacet#claim method. interface IValidatorRewarder { /// @notice Called by the subnet manager contract to instruct the rewarder to process the subnet summary and /// disburse any relevant rewards. /// @dev This method should revert if the summary is invalid; this will cause the - function disburseRewards(SubnetID calldata id, Consensus.ValidatorData calldata validatedData) external; + function notifyValidClaim(SubnetID calldata id, Consensus.ValidatorData calldata validatedData) external; } diff --git a/contracts/contracts/examples/ValidatorRewarderMap.sol b/contracts/contracts/examples/ValidatorRewarderMap.sol index 8f0ffd7d8..99785d0af 100644 --- a/contracts/contracts/examples/ValidatorRewarderMap.sol +++ b/contracts/contracts/examples/ValidatorRewarderMap.sol @@ -20,7 +20,7 @@ contract ValidatorRewarderMap is IValidatorRewarder, Ownable { subnetId = id; } - function disburseRewards(SubnetID calldata id, Consensus.ValidatorData calldata detail) external { + function notifyValidClaim(SubnetID calldata id, Consensus.ValidatorData calldata detail) external { require(keccak256(abi.encode(id)) == keccak256(abi.encode(subnetId)), "not my subnet"); address actor = id.route[id.route.length - 1]; diff --git a/contracts/contracts/lib/LibActivity.sol b/contracts/contracts/lib/LibActivity.sol index a71bbb42a..41f9fc815 100644 --- a/contracts/contracts/lib/LibActivity.sol +++ b/contracts/contracts/lib/LibActivity.sol @@ -146,7 +146,7 @@ library LibActivity { } // Notify the validator rewarder of a valid claim. - IValidatorRewarder(s.validatorRewarder).disburseRewards(subnet, data); + IValidatorRewarder(s.validatorRewarder).notifyValidClaim(subnet, data); // Prune state for this height if all validators have claimed. if (pending.claimed.length() == pending.summary.stats.totalActiveValidators) {