Skip to content

Commit

Permalink
Adds LastProposed fields, and logic for checking absenteeism
Browse files Browse the repository at this point in the history
This does not yet *set* the LastProposed field, so it can't even be
tested yet.  Committing to rebase on top of mining work, since the
LastPrposed field will be set where the miner is paid.
  • Loading branch information
jannotti committed Sep 27, 2023
1 parent 293d98b commit 797bac9
Show file tree
Hide file tree
Showing 14 changed files with 583 additions and 365 deletions.
2 changes: 2 additions & 0 deletions cmd/goal/accountsList.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ func (accountList *AccountsList) outputAccount(addr string, acctInfo model.Accou
status = "offline"
case basics.NotParticipating.String():
status = "excluded"
case basics.Suspended.String():
status = "suspended"
default:
panic(fmt.Sprintf("unexpected account status: %v", acctInfo.Status))
}
Expand Down
2 changes: 2 additions & 0 deletions cmd/incorporate/incorporate.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ func parseRecord(cols []string) (rec record) {
rec.Status = basics.Offline
case "NotParticipating":
rec.Status = basics.NotParticipating
case "Suspended":
rec.Status = basics.Suspended
default:
log.Fatalf("unknown status: %s", cols[3])
}
Expand Down
19 changes: 15 additions & 4 deletions config/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,14 @@ type ConsensusParams struct {

EnableExtraPagesOnAppUpdate bool

// MaxProposedExpiredOnlineAccounts is the maximum number of online accounts, which need
// to be taken offline, that would be proposed to be taken offline.
// MaxProposedExpiredOnlineAccounts is the maximum number of online accounts
// that a proposer can take offline for having expired voting keys.
MaxProposedExpiredOnlineAccounts int

// MaxProposedAbsentOnlineAccounts is the maximum number of online accounts,
// that a proposer can suspend for not proposing "lately" (TBD)
MaxProposedAbsentOnlineAccounts int

// EnableAccountDataResourceSeparation enables the support for extended application and asset storage
// in a separate table.
EnableAccountDataResourceSeparation bool
Expand Down Expand Up @@ -603,10 +607,14 @@ var MaxExtraAppProgramLen int
// supported supported by any of the consensus protocols. used for decoding purposes.
var MaxAvailableAppProgramLen int

// MaxProposedExpiredOnlineAccounts is the maximum number of online accounts, which need
// to be taken offline, that would be proposed to be taken offline.
// MaxProposedExpiredOnlineAccounts is the maximum number of online accounts
// that a proposer can take offline for having expired voting keys.
var MaxProposedExpiredOnlineAccounts int

// MaxProposedAbsentOnlineAccounts is the maximum number of online accounts,
// that a proposer can suspend for not proposing "lately" (TBD)
var MaxProposedAbsentOnlineAccounts int

// MaxAppTotalArgLen is the maximum number of bytes across all arguments of an application
// max sum([len(arg) for arg in txn.ApplicationArgs])
var MaxAppTotalArgLen int
Expand Down Expand Up @@ -677,6 +685,7 @@ func checkSetAllocBounds(p ConsensusParams) {
checkSetMax(p.MaxAppProgramLen, &MaxLogCalls)
checkSetMax(p.MaxInnerTransactions*p.MaxTxGroupSize, &MaxInnerTransactionsPerDelta)
checkSetMax(p.MaxProposedExpiredOnlineAccounts, &MaxProposedExpiredOnlineAccounts)
checkSetMax(p.MaxProposedAbsentOnlineAccounts, &MaxProposedAbsentOnlineAccounts)

// These bounds are exported to make them available to the msgp generator for calculating
// maximum valid message size for each message going across the wire.
Expand Down Expand Up @@ -1376,6 +1385,8 @@ func initConsensusProtocols() {
vFuture.LogicSigVersion = 10 // When moving this to a release, put a new higher LogicSigVersion here
vFuture.EnableLogicSigCostPooling = true

vFuture.MaxProposedAbsentOnlineAccounts = 32

// Setting DynamicFilterTimeout in vFuture will impact e2e test performance
// by reducing round time. Hence, it is commented out for now.
// vFuture.DynamicFilterTimeout = true
Expand Down
Loading

0 comments on commit 797bac9

Please sign in to comment.