Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions protocol/config/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
14 changes: 14 additions & 0 deletions types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Loading