Skip to content

Commit

Permalink
deprecate consts
Browse files Browse the repository at this point in the history
  • Loading branch information
rootulp committed Nov 27, 2024
1 parent 08cb556 commit c5a916d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
16 changes: 6 additions & 10 deletions pkg/appconsts/v1/app_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ const (
Version uint64 = 1
SquareSizeUpperBound int = 128
SubtreeRootThreshold int = 64
// TimeoutPropose wasn't a constant in v1, it was the default for a
// user-configurable timeout.
// TimeoutPropose is deprecated because it was not a constant
// in v1, it was the default for a user-configurable timeout.
TimeoutPropose = time.Second * 10
// TimeoutCommit wasn't a constant in v1, it was the default for a
// user-configurable timeout.
// TimeoutCommit is deprecated because it was not a constant
// in v1, it was the default for a user-configurable timeout.
TimeoutCommit = time.Second * 11
// UpgradeHeightDelay is the number of blocks after a quorum has been
// reached that the chain should upgrade to the new version. Assuming a
// block interval of 12 seconds, this is 7 days.
//
// TODO: why does this constant exist in v1? v1 does not contain the signal
// module.
// UpgradeHeightDelay is deprecated because v1 does not contain the signal
// module so this constant should not be used.
UpgradeHeightDelay = int64(7 * 24 * 60 * 60 / 12) // 7 days * 24 hours * 60 minutes * 60 seconds / 12 seconds per block = 50,400 blocks.
)
8 changes: 4 additions & 4 deletions pkg/appconsts/v2/app_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ const (
Version uint64 = 2
SquareSizeUpperBound int = 128
SubtreeRootThreshold int = 64
// TimeoutPropose wasn't a constant in v2, it was the default for a
// user-configurable timeout.
// TimeoutPropose is deprecated because it was not a constant
// in v2, it was the default for a user-configurable timeout.
TimeoutPropose = time.Second * 10
// TimeoutCommit wasn't a constant in v2, it was the default for a
// user-configurable timeout.
// TimeoutCommit is deprecated because it was not a constant
// in v2, it was the default for a user-configurable timeout.
TimeoutCommit = time.Second * 11
// UpgradeHeightDelay is the number of blocks after a quorum has been
// reached that the chain should upgrade to the new version. Assuming a block
Expand Down

0 comments on commit c5a916d

Please sign in to comment.