Skip to content

Commit

Permalink
fix review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Neeharika-Sompalli <neeharika.sompalli@swirldslabs.com>
  • Loading branch information
Neeharika-Sompalli committed Nov 13, 2024
1 parent 1132190 commit c52d0bb
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions HIP/hip-1064.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ is guaranteed to have judges created by a supermajority of nodes (>2/3 of weight
<dd>A node is an *Active Node* if it creates a "judge" in a significant fraction of rounds during a staking period,
for example 80%. Any node that is trustworthy and submits events will create judges. If the node doesn’t submit events
or when other nodes don’t build on this node’s events, the node will not create judges.</dd>
<dt>Staking Period</dt>
<dd>Staking rewards are currently recalculated once per day, though this duration is a setting called the
"staking period". Node rewards will be transferred on the same schedule. Everywhere that this document mentions
a "day", it should be interpreted as the staking period. And every time calculations about a fraction of rounds
are done, they are the average over a single staking period.</dd>
</dl>

## Motivation
Expand Down Expand Up @@ -78,10 +83,10 @@ Each node is paid the constant reward minus the average node fees received that
This reduction is averaged across all nodes; the network SHALL NOT subtract the node fees earned by one node in
particular.

The node rewards SHALL be distributed at the end of a staking period using`CryptoTransfer` transactions from
`ledger.fundingAccount` to each node account. Each `CryptoTransfer` only allows `ledger.transfers.maxLen`
transfers per transaction; it is possible, therefore, that multiple `CryptoTransfer` transaction will be necessary to
distribute rewards, based on the total number of node accounts in the network.
The node rewards SHALL be distributed at the end of a staking period using synthetic `CryptoTransfer` transactions from
`ledger.fundingAccount` to each node account. Each synthetic `CryptoTransfer` only allows `ledger.transfers.maxLen`
transfers per transaction; it is possible, therefore, that multiple synthetic `CryptoTransfer` transactions will be
necessary to distribute rewards, based on the total number of node accounts in the network.

This HIP modifies the following state protobufs.

Expand Down Expand Up @@ -150,7 +155,7 @@ message Judge {
*/
message NodeRewards {
/**
* A number of rounds in the staking period.
* A number of rounds so far, in this staking period.
*/
uint64 num_rounds_in_staking_period = 1;
Expand All @@ -160,13 +165,13 @@ message NodeRewards {
* judges for the consensus algorithm.
* <p>
* This list SHALL contain one entry for each node participating
* in consensus during the staking period.
* in consensus during this staking period.
*/
repeated NodeActivity node_activities = 2;
}
/**
* A record of judge rounds for a single node.<br/>
* This records, for a single node, the number of rounds during a staking
* This records, for a single node, the number of rounds so far, during this staking
* period that contained at least one judge created by that node.
*
* This message SHALL NOT record the total number of rounds in a staking
Expand All @@ -183,7 +188,7 @@ message NodeActivity {
/**
* A count of rounds.<br/>
* This is the count of rounds in which the node identified
* This is the count of rounds so far, in this staking period in which the node identified
* by `node_id` created judges.
*/
uint64 num_judge_rounds = 2;
Expand Down

0 comments on commit c52d0bb

Please sign in to comment.