From c5a916d4806e881803d1183d2a639835f619d430 Mon Sep 17 00:00:00 2001 From: Rootul Patel Date: Wed, 27 Nov 2024 09:56:14 -0500 Subject: [PATCH] deprecate consts --- pkg/appconsts/v1/app_consts.go | 16 ++++++---------- pkg/appconsts/v2/app_consts.go | 8 ++++---- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/pkg/appconsts/v1/app_consts.go b/pkg/appconsts/v1/app_consts.go index 1a3890bedc..478ce6ac3e 100644 --- a/pkg/appconsts/v1/app_consts.go +++ b/pkg/appconsts/v1/app_consts.go @@ -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. ) diff --git a/pkg/appconsts/v2/app_consts.go b/pkg/appconsts/v2/app_consts.go index cd574af755..b2e187eaf0 100644 --- a/pkg/appconsts/v2/app_consts.go +++ b/pkg/appconsts/v2/app_consts.go @@ -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