@@ -138,7 +138,7 @@ type Params struct {
138138 BIP0065Height int32
139139 BIP0066Height int32
140140
141- // Only testnet4 uses CSV activation by height. All the others use the
141+ // Only testnet4 and chipnet uses CSV activation by height. All the others use the
142142 // deployment schedule. If this value is set to anything other than zero
143143 // then it will activate at this height.
144144 CSVHeight int32
@@ -262,7 +262,7 @@ var MainNetParams = Params{
262262 Name : "mainnet" ,
263263 Net : wire .MainNet ,
264264 DefaultPort : "8333" ,
265- DNSSeeds : []DNSSeed {
265+ DNSSeeds : []DNSSeed { // TODO change this to proper dns seed
266266 {"seed.bchd.cash" , true },
267267 {"btccash-seeder.bitcoinunlimited.info" , true },
268268 {"seed.bch.loping.net" , true },
@@ -623,6 +623,94 @@ var TestNet3Params = Params{
623623 SlpAddressPrefix : "slptest" ,
624624}
625625
626+ var ChipNetParams = Params {
627+ Name : "chipnet" ,
628+ Net : wire .ChipNet ,
629+ DefaultPort : "48333" ,
630+ DNSSeeds : []DNSSeed {
631+ {"chipnet.bitjson.com" , true },
632+ },
633+
634+ // Chain parameters
635+ GenesisBlock : & testNet4GenesisBlock , // Same value as testnet4
636+ GenesisHash : & testNet4GenesisHash , // Same value as testnet4
637+ PowLimit : testNet3PowLimit , // Same value as testnet3
638+ PowLimitBits : 0x1d00ffff ,
639+ BIP0034Height : 2 ,
640+ BIP0065Height : 3 ,
641+ BIP0066Height : 4 ,
642+ CSVHeight : 5 ,
643+
644+ UahfForkHeight : 5 ,
645+ DaaForkHeight : 3000 ,
646+ MagneticAnonomalyForkHeight : 3999 ,
647+ GreatWallForkHeight : 0 ,
648+ GravitonForkHeight : 4999 ,
649+ PhononForkHeight : 0 ,
650+ AxionActivationHeight : 16844 ,
651+
652+ CosmicInflationActivationTime : 1637694000 ,
653+
654+ CoinbaseMaturity : 100 ,
655+ SubsidyReductionInterval : 210000 ,
656+ TargetTimespan : time .Hour * 24 * 14 , // 14 days
657+ TargetTimePerBlock : time .Minute * 10 , // 10 minutes
658+ RetargetAdjustmentFactor : 4 , // 25% less, 400% more
659+ ReduceMinDifficulty : true ,
660+ NoDifficultyAdjustment : false ,
661+ MinDiffReductionTime : time .Minute * 20 , // TargetTimePerBlock * 2
662+ AsertDifficultyHalflife : 3600 , // 1 hour
663+ AsertDifficultyAnchorHeight : 16844 ,
664+ AsertDifficultyAnchorParentTimestamp : 1605451779 ,
665+ AsertDifficultyAnchorBits : 0x1d00ffff ,
666+ GenerateSupported : false ,
667+
668+ // Checkpoints ordered from oldest to newest.
669+ Checkpoints : []Checkpoint {},
670+
671+ // Consensus rule change deployments.
672+ //
673+ // The miner confirmation window is defined as:
674+ // target proof of work timespan / target proof of work spacing
675+ RuleChangeActivationThreshold : 1512 , // 75% of MinerConfirmationWindow
676+ MinerConfirmationWindow : 2016 ,
677+ Deployments : [DefinedDeployments ]ConsensusDeployment {
678+ DeploymentTestDummy : {
679+ BitNumber : 28 ,
680+ StartTime : 1199145601 , // January 1, 2008 UTC
681+ ExpireTime : 1230767999 , // December 31, 2008 UTC
682+ },
683+ DeploymentCSV : {
684+ BitNumber : 0 ,
685+ StartTime : 1456790400 , // March 1st, 2016
686+ ExpireTime : 1493596800 , // May 1st, 2017
687+ },
688+ },
689+
690+ // Mempool parameters
691+ RelayNonStdTxs : false ,
692+
693+ // The prefix for the cashaddress
694+ CashAddressPrefix : "bchtest" , // always bchtest for testnet
695+
696+ // Address encoding magics
697+ LegacyPubKeyHashAddrID : 0x6f , // starts with m or n
698+ LegacyScriptHashAddrID : 0xc4 , // starts with 2
699+ PrivateKeyID : 0xef , // starts with 9 (uncompressed) or c (compressed)
700+
701+ // BIP32 hierarchical deterministic extended key magics
702+ HDPrivateKeyID : [4 ]byte {0x04 , 0x35 , 0x83 , 0x94 }, // starts with tprv
703+ HDPublicKeyID : [4 ]byte {0x04 , 0x35 , 0x87 , 0xcf }, // starts with tpub
704+
705+ // BIP44 coin type used in the hierarchical deterministic path for
706+ // address generation.
707+ HDCoinType : 1 , // all coins use 1
708+
709+ // slp indexer parameters
710+ SlpIndexStartHeight : 0 ,
711+ SlpAddressPrefix : "slptest" ,
712+ }
713+
626714// TestNet4Params defines the network parameters for the test Bitcoin network
627715// (version 4). Not to be confused with the regression test network, this
628716// network is sometimes simply called "testnet".
0 commit comments