Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: remove unused EnableOnlineAccountCatchpoints consensus flag, rename EnableAccountDataResourceSeparation #6242

Merged
merged 2 commits into from
Feb 5, 2025
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
14 changes: 6 additions & 8 deletions config/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,11 @@ type ConsensusParams struct {
// that a proposer can take offline for having expired voting keys.
MaxProposedExpiredOnlineAccounts int

// EnableAccountDataResourceSeparation enables the support for extended application and asset storage
// in a separate table.
EnableAccountDataResourceSeparation bool
// EnableLedgerDataUpdateRound enables the support for setting the UpdateRound on account and
// resource data in the ledger. The UpdateRound is encoded in account/resource data types used
// on disk and in catchpoint snapshots, and also used to construct catchpoint merkle trie keys,
// but does not appear in on-chain state.
EnableLedgerDataUpdateRound bool

// When rewards rate changes, use the new value immediately.
RewardsCalculationFix bool
Expand Down Expand Up @@ -488,9 +490,6 @@ type ConsensusParams struct {
// Setting it to 1 for example allows querying data up to MaxTxnLife + 1 rounds back from the Latest.
DeeperBlockHeaderHistory uint64

// EnableOnlineAccountCatchpoints specifies when to re-enable catchpoints after the online account table migration has occurred.
EnableOnlineAccountCatchpoints bool

// UnfundedSenders ensures that accounts with no balance (so they don't even
// "exist") can still be a transaction sender by avoiding updates to rewards
// state for accounts with no algos. The actual change implemented to allow
Expand Down Expand Up @@ -1371,7 +1370,7 @@ func initConsensusProtocols() {
// flag would already be restructuring their internal storage for extended
// application storage, and therefore would not produce catchpoints and/or
// catchpoint labels prior to this feature being enabled.
v32.EnableAccountDataResourceSeparation = true
v32.EnableLedgerDataUpdateRound = true

// Remove limits on MinimumBalance
v32.MaximumMinimumBalance = 0
Expand Down Expand Up @@ -1424,7 +1423,6 @@ func initConsensusProtocols() {
v34.UnifyInnerTxIDs = true

v34.EnableSHA256TxnCommitmentHeader = true
v34.EnableOnlineAccountCatchpoints = true

v34.UnfundedSenders = true

Expand Down
2 changes: 1 addition & 1 deletion ledger/acctupdates.go
Original file line number Diff line number Diff line change
Expand Up @@ -1508,7 +1508,7 @@ func (au *accountUpdates) prepareCommit(dcc *deferredCommitContext) error {

// once the consensus upgrade to resource separation is complete, all resources/accounts are also tagged with
// their corresponding update round.
setUpdateRound := config.Consensus[au.versions[1]].EnableAccountDataResourceSeparation
setUpdateRound := config.Consensus[au.versions[1]].EnableLedgerDataUpdateRound

// compact all the deltas - when we're trying to persist multiple rounds, we might have the same account
// being updated multiple times. When that happen, we can safely omit the intermediate updates.
Expand Down
2 changes: 1 addition & 1 deletion ledger/applications_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ return`
var expectedCreatorBase, expectedCreatorResource, expectedUserOptInBase, expectedUserOptInResource, expectedUserLocalBase, expectedUserLocalResource []byte
// the difference between these encoded structure is the UpdateRound variable. This variable is not being set before
// the consensus upgrade, and affects only nodes that have been updated.
if proto.EnableAccountDataResourceSeparation {
if proto.EnableLedgerDataUpdateRound {
expectedCreatorBase, err = hex.DecodeString("87a14301a144ce000186a0a16101a162ce009d2290a16704a16b01a17a01")
a.NoError(err)
expectedCreatorResource, err = hex.DecodeString("86a171c45602200200012604056c6f63616c06676c6f62616c026c6b02676b3118221240003331192212400010311923124000022243311b221240001c361a00281240000a361a0029124000092243222a28664200032b29672343a172c40102a17501a17704a17903a17a01")
Expand Down