From 528cc07a00fc0934bd8420a83f282cf8aa007214 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 26 Sep 2016 18:51:30 -0700 Subject: [PATCH] chaincfg: add BIP0009 deployment parameters for the CSV soft-fork MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds BIP-9 deployment parameters for all registered networks for the CSV soft-fork package. The mainnet and testnet parameters have been set in accordance to the finalized BIPs. For simnet, and the regression net, the activation date is back-dated in order to allow signaling for the soft-fork at any time. Additionally the expiration time for simnet and regrets has been set to math.MaxInt64, meaning they’ll never expire. --- chaincfg/params.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/chaincfg/params.go b/chaincfg/params.go index 451683de..fba88cc1 100644 --- a/chaincfg/params.go +++ b/chaincfg/params.go @@ -85,6 +85,11 @@ const ( // purposes. DeploymentTestDummy = iota + // DeploymentCSV defines the rule change deployment ID for the CSV + // soft-fork package. The CSV package includes the depolyment of BIPS + // 68, 112, and 113. + DeploymentCSV + // NOTE: DefinedDeployments must always come last since it is used to // determine how many defined deployments there currently are. @@ -270,6 +275,11 @@ var MainNetParams = Params{ StartTime: 1199145601, // January 1, 2008 UTC ExpireTime: 1230767999, // December 31, 2008 UTC }, + DeploymentCSV: { + BitNumber: 0, + StartTime: 1462060800, // May 1st, 2016 + ExpireTime: 1493596800, // May 1st, 2017 + }, }, // Mempool parameters @@ -330,6 +340,11 @@ var RegressionNetParams = Params{ StartTime: 0, // Always available for vote ExpireTime: math.MaxInt64, // Never expires }, + DeploymentCSV: { + BitNumber: 0, + StartTime: 0, // Always available for vote + ExpireTime: math.MaxInt64, // Never expires + }, }, // Mempool parameters @@ -407,6 +422,11 @@ var TestNet3Params = Params{ StartTime: 1199145601, // January 1, 2008 UTC ExpireTime: 1230767999, // December 31, 2008 UTC }, + DeploymentCSV: { + BitNumber: 0, + StartTime: 1456790400, // March 1st, 2016 + ExpireTime: 1493596800, // May 1st, 2017 + }, }, // Mempool parameters @@ -471,6 +491,11 @@ var SimNetParams = Params{ StartTime: 0, // Always available for vote ExpireTime: math.MaxInt64, // Never expires }, + DeploymentCSV: { + BitNumber: 0, + StartTime: 0, // Always available for vote + ExpireTime: math.MaxInt64, // Never expires + }, }, // Mempool parameters