|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using Blockcore.Consensus.Checkpoints; |
| 4 | +using HomeCoin.Networks.Setup; |
| 5 | +using NBitcoin; |
| 6 | + |
| 7 | +namespace HomeCoin |
| 8 | +{ |
| 9 | + internal class HomeCoinSetup |
| 10 | + { |
| 11 | + internal static HomeCoinSetup Instance = new HomeCoinSetup(); |
| 12 | + |
| 13 | + internal CoinSetup Setup = new CoinSetup |
| 14 | + { |
| 15 | + FileNamePrefix = "homecoin", |
| 16 | + ConfigFileName = "homecoin.conf", |
| 17 | + Magic = "48-4F-4D-45", |
| 18 | + CoinType = 100500, //0x80018894// SLIP-0044: https://github.com/satoshilabs/slips/blob/master/slip-0044.md, |
| 19 | + PremineReward = 1000000, |
| 20 | + PoWBlockReward = 10, |
| 21 | + PoSBlockReward = 10, |
| 22 | + LastPowBlock = 100500, |
| 23 | + MaxSupply = 21000000, |
| 24 | + GenesisText = "I'd like to know what this whole show is all about before it's out.", |
| 25 | + TargetSpacing = TimeSpan.FromSeconds(64), |
| 26 | + ProofOfStakeTimestampMask = 0x0000000F, |
| 27 | + PoSVersion = 3 |
| 28 | + }; |
| 29 | + |
| 30 | + internal NetworkSetup Main = new NetworkSetup |
| 31 | + { |
| 32 | + Name = "HomeCoinMain", |
| 33 | + RootFolderName = "homecoin", |
| 34 | + CoinTicker = "HOME", |
| 35 | + DefaultPort = 33331, |
| 36 | + DefaultRPCPort = 33332, |
| 37 | + DefaultAPIPort = 33333, |
| 38 | + DefaultSignalRPort = 33334, |
| 39 | + PubKeyAddress = 40, // B https://en.bitcoin.it/wiki/List_of_address_prefixes |
| 40 | + ScriptAddress = 100, // b |
| 41 | + SecretAddress = 160, |
| 42 | + GenesisTime = 1614259698, |
| 43 | + GenesisNonce = 60494, |
| 44 | + GenesisBits = 0x1E0FFFFF, |
| 45 | + GenesisVersion = 1, |
| 46 | + GenesisReward = Money.Zero, |
| 47 | + HashGenesisBlock = "00000ae66e376bf115b9440f03a520bd88d28624ec6f13606b0d72051e56e635", |
| 48 | + HashMerkleRoot = "f54bfdb51ebda155c70525ed6ef4fee32ca2564b8532767661acf42015cd5542", |
| 49 | + DNS = new[] { "seed.homecoin.ru", "seed2.homecoin.ru", "seed3.homecoin.ru", "seed4.homecoin.ru", "seed5.homecoin.ru" }, |
| 50 | + Nodes = new[] { "167.86.77.3", "167.86.126.130", "158.101.197.109", "158.101.206.15", "40.76.201.247" }, |
| 51 | + Checkpoints = new Dictionary<int, CheckpointInfo> |
| 52 | + { |
| 53 | + { 0, new CheckpointInfo(new uint256("0x00000ae66e376bf115b9440f03a520bd88d28624ec6f13606b0d72051e56e635"), new uint256("0x0000000000000000000000000000000000000000000000000000000000000000")) }, // Genisis |
| 54 | + { 2, new CheckpointInfo(new uint256("0x346e8a928dc03b3d92249cc67666d905a92b09f18b7bb5308198d7a28562bd98"), new uint256("0x8503c0bca8aeca76ed38648896d164637bf7229f5d9865d2b26448d448675c43")) }, // Premine |
| 55 | + { 1000, new CheckpointInfo(new uint256("0x10b7137bc293d3c9426b29548ff902fca123f60e7af8a844c8fa151a736dbb37"), new uint256("0x228f509a5761ca04c14e2c3aa1b2a3249485525dbc9c33e19271e13404c0a7ee")) }, |
| 56 | + } |
| 57 | + }; |
| 58 | + |
| 59 | + internal NetworkSetup RegTest = new NetworkSetup |
| 60 | + { |
| 61 | + Name = "HomeCoinRegTest", |
| 62 | + RootFolderName = "homecoinregtest", |
| 63 | + CoinTicker = "THOME", |
| 64 | + DefaultPort = 43331, |
| 65 | + DefaultRPCPort = 43332, |
| 66 | + DefaultAPIPort = 43333, |
| 67 | + DefaultSignalRPort = 43334, |
| 68 | + PubKeyAddress = 111, |
| 69 | + ScriptAddress = 196, |
| 70 | + SecretAddress = 239, |
| 71 | + GenesisTime = 1614259704, |
| 72 | + GenesisNonce = 83376, |
| 73 | + GenesisBits = 0x1F00FFFF, |
| 74 | + GenesisVersion = 1, |
| 75 | + GenesisReward = Money.Zero, |
| 76 | + HashGenesisBlock = "00008e71ca88630fe4f8156b826f04f564858315e0d2d38ffaf583f3c269de44", |
| 77 | + HashMerkleRoot = "6c68247b2a96dabbcd8bffd2b0cc9adbca29662c7a94acedf3543ac3a98e9806", |
| 78 | + DNS = new[] { "regtestseed.homecoin.ru", "regtestseed2.homecoin.ru", "regtestseed3.homecoin.ru", "regtestseed4.homecoin.ru", "regtestseed5.homecoin.ru" }, |
| 79 | + Nodes = new[] { "167.86.77.3", "167.86.126.130", "158.101.197.109", "158.101.196.76", "40.76.201.247" }, |
| 80 | + Checkpoints = new Dictionary<int, CheckpointInfo> |
| 81 | + { |
| 82 | + // TODO: Add checkpoints as the network progresses. |
| 83 | + } |
| 84 | + }; |
| 85 | + |
| 86 | + internal NetworkSetup Test = new NetworkSetup |
| 87 | + { |
| 88 | + Name = "HomeCoinTest", |
| 89 | + RootFolderName = "homecointest", |
| 90 | + CoinTicker = "THOME", |
| 91 | + DefaultPort = 53331, |
| 92 | + DefaultRPCPort = 53331, |
| 93 | + DefaultAPIPort = 53331, |
| 94 | + DefaultSignalRPort = 53334, |
| 95 | + PubKeyAddress = 111, |
| 96 | + ScriptAddress = 196, |
| 97 | + SecretAddress = 239, |
| 98 | + GenesisTime = 1614259712, |
| 99 | + GenesisNonce = 1845, |
| 100 | + GenesisBits = 0x1F0FFFFF, |
| 101 | + GenesisVersion = 1, |
| 102 | + GenesisReward = Money.Zero, |
| 103 | + HashGenesisBlock = "0008c7ff991b012b8dc06bd91165b64b307e53f183d070850d8381f238c672df", |
| 104 | + HashMerkleRoot = "277acb69460036d6f4aa04408164be0c38d6cc1c10cc771fb1385696036fe742", |
| 105 | + DNS = new[] { "testseed.homecoin.ru", "testseed2.homecoin.ru", "testseed3.homecoin.ru", "testseed4.homecoin.ru", "testseed5.homecoin.ru" }, |
| 106 | + Nodes = new[] { "167.86.77.3", "167.86.126.130", "158.101.197.109", "158.101.196.76", "40.76.201.247" }, |
| 107 | + Checkpoints = new Dictionary<int, CheckpointInfo> |
| 108 | + { |
| 109 | + // TODO: Add checkpoints as the network progresses. |
| 110 | + } |
| 111 | + }; |
| 112 | + |
| 113 | + public bool IsPoSv3() |
| 114 | + { |
| 115 | + return this.Setup.PoSVersion == 3; |
| 116 | + } |
| 117 | + |
| 118 | + public bool IsPoSv4() |
| 119 | + { |
| 120 | + return this.Setup.PoSVersion == 4; |
| 121 | + } |
| 122 | + } |
| 123 | +} |
0 commit comments