params-testnet.go raw

   1  package chaincfg
   2  
   3  import (
   4  	"github.com/p9c/p9/pkg/fork"
   5  	"github.com/p9c/p9/pkg/wire"
   6  )
   7  
   8  // TestNet3Params defines the network parameters for the test Bitcoin network (version 3). Not to be confused with the
   9  // regression test network, this network is sometimes simply called "testnet".
  10  var TestNet3Params = Params{
  11  	Name:        "testnet",
  12  	Net:         wire.TestNet3,
  13  	DefaultPort: "21047",
  14  	DNSSeeds: []DNSSeed{
  15  		// {"seed3.parallelcoin.io", true},
  16  	},
  17  	// Chain parameters
  18  	GenesisBlock: &testNet3GenesisBlock,
  19  	GenesisHash:  &testNet3GenesisHash,
  20  	PowLimit:     &fork.SecondPowLimit,    // fork&testNet3PowLimit,
  21  	PowLimitBits: fork.SecondPowLimitBits, // testnetBits,
  22  	// BIP0034Height:            math.MaxInt32,                       // 0000000023b3a96d3484e5abb3755c413e7d41500f8e2a5c3f0dd01299cd8ef8
  23  	// BIP0065Height:            math.MaxInt32,                       // 00000000007f6655f22f98e72ed80d8b06dc761d5da09df0fa1dc4be4f861eb6
  24  	// BIP0066Height:            math.MaxInt32,                       // 000000002104c8c45e99a8853285a3b592602a3ccde2b832481da85e9e4ba182
  25  	CoinbaseMaturity:         9,
  26  	SubsidyReductionInterval: 250000,
  27  	TargetTimespan:           TestnetTargetTimespan,
  28  	TargetTimePerBlock:       TestnetTargetTimePerBlock,
  29  	RetargetAdjustmentFactor: 2,
  30  	ReduceMinDifficulty:      false,
  31  	MinDiffReductionTime:     0, // time.Minute * 10, // TargetTimePerBlock * 2
  32  	GenerateSupported:        true,
  33  	// Checkpoints ordered from oldest to newest.
  34  	Checkpoints: []Checkpoint{
  35  		// {546, newHashFromStr("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70")},
  36  	},
  37  	// Consensus rule change deployments.
  38  	//
  39  	// The miner confirmation window is defined as:
  40  	//   target proof of work timespan / target proof of work spacing
  41  	RuleChangeActivationThreshold: 2, // 75% of MinerConfirmationWindow
  42  	MinerConfirmationWindow:       2016,
  43  	// Deployments: [DefinedDeployments]ConsensusDeployment{
  44  	// 	DeploymentTestDummy: {
  45  	// 		BitNumber:  28,
  46  	// 		StartTime:  math.MaxInt64, // January 1, 2008 UTC
  47  	// 		ExpireTime: math.MaxInt64, // December 31, 2008 UTC
  48  	// 	},
  49  	// 	DeploymentCSV: {
  50  	// 		BitNumber:  29,
  51  	// 		StartTime:  math.MaxInt64, // March 1st, 2016
  52  	// 		ExpireTime: math.MaxInt64, // May 1st, 2017
  53  	// 	},
  54  	// 	DeploymentSegwit: {
  55  	// 		BitNumber:  29,
  56  	// 		StartTime:  math.MaxInt64, // always available
  57  	// 		ExpireTime: math.MaxInt64, // never expires
  58  	// 	},
  59  	// },
  60  	// Mempool parameters
  61  	RelayNonStdTxs: true,
  62  	// // Human-readable part for Bech32 encoded segwit addresses, as defined in BIP 173.
  63  	// Bech32HRPSegwit: "t9", // always tb for test net
  64  	// Address encoding magics
  65  	PubKeyHashAddrID: 18,  // starts with m or n
  66  	ScriptHashAddrID: 188, // starts with 2
  67  	// WitnessPubKeyHashAddrID: 0x03, // starts with QW
  68  	// WitnessScriptHashAddrID: 0x28, // starts with T7n
  69  	PrivateKeyID: 239, // starts with 9 (uncompressed) or c (compressed)
  70  	// BIP32 hierarchical deterministic extended key magics
  71  	HDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94}, // starts with tprv
  72  	HDPublicKeyID:  [4]byte{0x04, 0x35, 0x87, 0xcf}, // starts with tpub
  73  	// BIP44 coin type used in the hierarchical deterministic path for address generation.
  74  	HDCoinType: 1,
  75  	// Parallelcoin specific difficulty adjustment parameters
  76  	Interval:                TestnetInterval,
  77  	AveragingInterval:       TestnetAveragingInterval, // Extend to target timespan to adjust better to hashpower (30000/300=100) post hardforkTestnet
  78  	AveragingTargetTimespan: TestnetAveragingTargetTimespan,
  79  	MaxAdjustDown:           TestnetMaxAdjustDown,
  80  	MaxAdjustUp:             TestnetMaxAdjustUp,
  81  	TargetTimespanAdjDown:   TestnetAveragingTargetTimespan * (TestnetInterval + TestnetMaxAdjustDown) / TestnetInterval,
  82  	MinActualTimespan:       TestnetAveragingTargetTimespan * (TestnetInterval - TestnetMaxAdjustUp) / TestnetInterval,
  83  	MaxActualTimespan:       TestnetAveragingTargetTimespan * (TestnetInterval + TestnetMaxAdjustDown) / TestnetInterval,
  84  	ScryptPowLimit:          &scryptPowLimit,
  85  	ScryptPowLimitBits:      ScryptPowLimitBits,
  86  	RPCClientPort:           "21048",
  87  	WalletRPCServerPort:     "21046",
  88  }
  89