diff --git a/protocol/config/consensus.go b/protocol/config/consensus.go index 1cabaa87..bfc70901 100644 --- a/protocol/config/consensus.go +++ b/protocol/config/consensus.go @@ -84,11 +84,6 @@ type ConsensusParams struct { // a way of making the spender subsidize the cost of storing this transaction. MinTxnFee uint64 - // EnableFeePooling specifies that the sum of the fees in a - // group must exceed one MinTxnFee per Txn, rather than check that - // each Txn has a MinFee. - EnableFeePooling bool - // EnableAppCostPooling specifies that the sum of fees for application calls // in a group is checked against the sum of the budget for application calls, // rather than check each individual app call is within the budget. @@ -562,6 +557,10 @@ type ConsensusParams struct { // specify the current app. This parameter can be removed and assumed true // after the first consensus release in which it is set true. AllowZeroLocalAppRef bool + + // LoadTracking enables header values that track Load that grows/shrinks + // when blocks are more/less than half full. + LoadTracking bool } // ProposerPayoutRules puts several related consensus parameters in one place. The same @@ -1090,7 +1089,6 @@ func initConsensusProtocols() { // "reachability" between accounts and creatables, so we // retain 4 x 4 as worst case. - v28.EnableFeePooling = true v28.EnableKeyregCoherencyCheck = true Consensus[protocol.ConsensusV28] = v28 @@ -1367,10 +1365,10 @@ func initConsensusProtocols() { vFuture.ApprovedUpgrades = map[protocol.ConsensusVersion]uint64{} vFuture.LogicSigVersion = 13 // When moving this to a release, put a new higher LogicSigVersion here - vFuture.AppSizeUpdates = true vFuture.AllowZeroLocalAppRef = true vFuture.EnforceAuthAddrSenderDiff = true + vFuture.LoadTracking = true Consensus[protocol.ConsensusFuture] = vFuture diff --git a/types/block.go b/types/block.go index 5143c0f6..584b8a70 100644 --- a/types/block.go +++ b/types/block.go @@ -114,6 +114,16 @@ type BlockHeader struct { // ParticipationUpdates contains the information needed to mark // certain accounts offline because their participation keys expired ParticipationUpdates + + // Load is the degree to which a block is full. Currently, it is based on + // the number of bytes in the final block, compared to the maximum allowed. + // It is expressed as a fixed-point integer with 6 digits of precision. So, + // 1,000,000 is a completely full block. + Load Micros `codec:"ld"` + + // CongestionTax fee required, beyond the MinFee, for "normal" + // transactions in this block. + CongestionTax Micros `codec:"ct"` } // TxnCommitments represents the commitments computed from the transactions in the block. @@ -337,3 +347,7 @@ const ( // DeleteAction indicates that the value for a particular key should be deleted DeleteAction DeltaAction = 3 ) + +// Micros represents millionths of something. It's a fixed-point number with 6 +// digits of precision. +type Micros uint64