From 5ce1569399fc53ef12ee591296940ad46301c7bd Mon Sep 17 00:00:00 2001 From: John Jannotti Date: Mon, 18 Sep 2023 11:52:05 -0400 Subject: [PATCH] Add fields in block header for proposer and fees collected. These are needed for https://github.com/algorand/go-algorand/pull/5740 and should not be merged until that work is finalized. --- types/block.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/types/block.go b/types/block.go index 213fa86c..a41bc1e9 100644 --- a/types/block.go +++ b/types/block.go @@ -28,6 +28,25 @@ type ( // Genesis hash to which this block belongs. GenesisHash Digest `codec:"gh"` + // Proposer is the proposer of this block. Like the Seed, agreement adds + // this after the block is assembled by the transaction pool, so that the same block can be prepared + // for multiple participating accounts in the same node. Populated if proto.Payouts.Enabled + Proposer Address `codec:"prp"` + + // FeesCollected is the sum of all fees paid by transactions in this + // block. Populated if proto.EnableMining. + FeesCollected MicroAlgos `codec:"fc"` + + // Bonus is the bonus incentive to be paid for proposing this block. It + // begins as a consensus parameter value, and decays periodically. + Bonus MicroAlgos `codec:"bi"` + + // ProposerPayout is the amount that should be moved from the FeeSink to + // the Proposer at the start of the next block. It is basically the + // bonus + the payouts percent of FeesCollected, but may be zero'd by + // proposer ineligibility. + ProposerPayout MicroAlgos `codec:"pp"` + // Rewards. // // When a block is applied, some amount of rewards are accrued to