params-simnet.go raw

   1  package chaincfg
   2  
   3  import (
   4  	"time"
   5  	
   6  	"github.com/p9c/p9/pkg/wire"
   7  )
   8  
   9  // SimNetParams defines the network parameters for the simulation test Bitcoin network. This network is similar to the
  10  // normal test network except it is intended for private use within a group of individuals doing simulation testing. The
  11  // functionality is intended to differ in that the only nodes which are specifically specified are used to create the
  12  // network rather than following normal routeable rules. This is important as otherwise it would just turn into another
  13  // public testnet.
  14  var SimNetParams = Params{
  15  	Name:        "simnet",
  16  	Net:         wire.SimNet,
  17  	DefaultPort: "41047",
  18  	DNSSeeds:    []DNSSeed{}, // NOTE: There must NOT be any seeds.
  19  	// Chain parameters
  20  	GenesisBlock: &simNetGenesisBlock,
  21  	GenesisHash:  &simNetGenesisHash,
  22  	PowLimit:     simNetPowLimit,
  23  	PowLimitBits: 0x207fffff,
  24  	// BIP0034Height:            0, // Always active on simnet
  25  	// BIP0065Height:            0, // Always active on simnet
  26  	// BIP0066Height:            0, // Always active on simnet
  27  	CoinbaseMaturity:         100,
  28  	SubsidyReductionInterval: 210000,
  29  	TargetTimespan:           30000, // 14 days
  30  	TargetTimePerBlock:       300,   // 10 minutes
  31  	RetargetAdjustmentFactor: 2,     // 25% less, 400% more
  32  	ReduceMinDifficulty:      true,
  33  	MinDiffReductionTime:     time.Minute * 10, // TargetTimePerBlock * 2
  34  	GenerateSupported:        true,
  35  	// Checkpoints ordered from oldest to newest.
  36  	Checkpoints: nil,
  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: 75, // 75% of MinerConfirmationWindow
  42  	MinerConfirmationWindow:       100,
  43  	// Deployments: [DefinedDeployments]ConsensusDeployment{
  44  	// 	DeploymentTestDummy: {
  45  	// 		BitNumber:  28,
  46  	// 		StartTime:  0,             // Always available for vote
  47  	// 		ExpireTime: math.MaxInt64, // Never expires
  48  	// 	},
  49  	// 	DeploymentCSV: {
  50  	// 		BitNumber:  0,
  51  	// 		StartTime:  0,             // Always available for vote
  52  	// 		ExpireTime: math.MaxInt64, // Never expires
  53  	// 	},
  54  	// 	DeploymentSegwit: {
  55  	// 		BitNumber:  1,
  56  	// 		StartTime:  0,             // Always available for vote
  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
  63  	// // BIP 173.
  64  	// Bech32HRPSegwit: "sb", // always sb for sim net
  65  	// Address encoding magics
  66  	PubKeyHashAddrID: 0x3f, // starts with S
  67  	ScriptHashAddrID: 0x7b, // starts with s
  68  	PrivateKeyID:     0x64, // starts with 4 (uncompressed) or F (compressed)
  69  	// WitnessPubKeyHashAddrID: 0x19, // starts with Gg
  70  	// WitnessScriptHashAddrID: 0x28, // starts with ?
  71  	// BIP32 hierarchical deterministic extended key magics
  72  	HDPrivateKeyID: [4]byte{0x04, 0x20, 0xb9, 0x00}, // starts with sprv
  73  	HDPublicKeyID:  [4]byte{0x04, 0x20, 0xbd, 0x3a}, // starts with spub
  74  	// BIP44 coin type used in the hierarchical deterministic path for address generation.
  75  	HDCoinType: 115, // ASCII for s
  76  	// Parallelcoin specific difficulty adjustment parameters
  77  	Interval:                100,
  78  	AveragingInterval:       10, // Extend to target timespan to adjust better to hashpower (30000/300=100) post hardfork
  79  	AveragingTargetTimespan: 10 * 300,
  80  	MaxAdjustDown:           10,
  81  	MaxAdjustUp:             20,
  82  	TargetTimespanAdjDown:   300 * (100 + 10) / 100,
  83  	MinActualTimespan:       10 * 300 * (100 - 20) / 100,
  84  	MaxActualTimespan:       10 * 300 * (100 + 10) / 100,
  85  	ScryptPowLimit:          &scryptPowLimit,
  86  	ScryptPowLimitBits:      ScryptPowLimitBits,
  87  	RPCClientPort:           "41048",
  88  	WalletRPCServerPort:     "41046",
  89  }
  90