Skip to content

Proto/AI: Mention stakers in receipts

Raphaël Cauderlier requested to merge rafoo@ai_stakers_in_receipts into master

Context

Receipts for staking pseudo-operations (stake, request_unstake, and finalize_unstake), for rewards and for slashing all refer to the delegate pkh even in situations in which a delegator uses them. This MR fixes that as follows:

  • we add an abstract notion of staker which can be either a single staker (delegate or costaker) or the group consisting of all the costakers of a given delegate (sharing rewards and punishments)
  • we use it in Token and in operation receipts to represent the container touched by the staking operations.

In the case of shared rewards and punishments, the receipts still only contain the pkh of the delegate but at least it is wrapped by a constructor indicating that sharing occurs.

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Raphaël Cauderlier

Merge request reports

Loading