Advertisement
Guest User

godcoin/achilles

a guest
Jul 27th, 2014
563
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 10.84 KB | None | 0 0
  1. diff -uNr godcoin/src/base58.h achilles/src/base58.h
  2. --- godcoin/src/base58.h    2014-07-27 14:24:36.034629925 +0100
  3. +++ achilles/src/base58.h   2014-07-27 14:26:27.378627441 +0100
  4. @@ -272,7 +272,7 @@
  5.  public:
  6.      enum
  7.      {
  8. -        PUBKEY_ADDRESS = 38, // Zencoin addresses start with G
  9. +        PUBKEY_ADDRESS = 23,
  10.          SCRIPT_ADDRESS = 5,
  11.          PUBKEY_ADDRESS_TEST = 111,
  12.          SCRIPT_ADDRESS_TEST = 196,
  13. diff -uNr godcoin/src/bitcoinrpc.cpp achilles/src/bitcoinrpc.cpp
  14. --- godcoin/src/bitcoinrpc.cpp  2014-07-27 14:24:36.050629925 +0100
  15. +++ achilles/src/bitcoinrpc.cpp 2014-07-27 14:26:27.398627441 +0100
  16. @@ -93,7 +93,7 @@
  17.  int64 AmountFromValue(const Value& value)
  18.  {
  19.      double dAmount = value.get_real();
  20. -    if (dAmount <= 0.0 || dAmount > 84000000.0)
  21. +    if (dAmount <= 0.0 || dAmount > MAX_MONEY)
  22.          throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount");
  23.      int64 nAmount = roundint64(dAmount * COIN);
  24.      if (!MoneyRange(nAmount))
  25. @@ -788,7 +788,7 @@
  26.      // Try a dual IPv6/IPv4 socket, falling back to separate IPv4 and IPv6 sockets
  27.      const bool loopback = !mapArgs.count("-rpcallowip");
  28.      asio::ip::address bindAddress = loopback ? asio::ip::address_v6::loopback() : asio::ip::address_v6::any();
  29. -    ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", 12700));
  30. +    ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", 17255));
  31.      boost::system::error_code v6_only_error;
  32.      boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(*rpc_io_service));
  33.  
  34. @@ -1070,7 +1070,7 @@
  35.      asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
  36.      SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
  37.      iostreams::stream< SSLIOStreamDevice<asio::ip::tcp> > stream(d);
  38. -    if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", "12700")))
  39. +    if (!d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", "17255")))
  40.              throw runtime_error("couldn't connect to server");
  41.  
  42.      // HTTP basic authentication
  43. diff -uNr godcoin/src/checkpoints.cpp achilles/src/checkpoints.cpp
  44. --- godcoin/src/checkpoints.cpp 2014-07-27 14:24:36.054629925 +0100
  45. +++ achilles/src/checkpoints.cpp    2014-07-27 14:26:27.406627440 +0100
  46. @@ -35,19 +35,19 @@
  47.      // + Contains no strange transactions
  48.      static MapCheckpoints mapCheckpoints =
  49.          boost::assign::map_list_of
  50. -        (  0, uint256("0x"))
  51. +        (       0, uint256("0x0000034e58835f5a592145ddb68adf4553513a5ca0ff02ddf51c0e2dcad59ca2"))
  52.          ;
  53.      static const CCheckpointData data = {
  54.          &mapCheckpoints,
  55. -        1403493000, // * UNIX timestamp of last checkpoint block
  56. -        24000,    // * total number of transactions between genesis and last checkpoint
  57. +        1406102641, // * UNIX timestamp of last checkpoint block
  58. +        1408,    // * total number of transactions between genesis and last checkpoint
  59.                      //   (the tx=... number in the SetBestChain debug.log lines)
  60. -        2400.0     // * estimated number of transactions per day after checkpoint
  61. +        250.0     // * estimated number of transactions per day after checkpoint
  62.      };
  63.  
  64.      static MapCheckpoints mapCheckpointsTestnet =
  65.          boost::assign::map_list_of
  66. -        (  0, uint256("0x0000c4e5b62e04d9e78c357fbaacfcfa78b3f2b16e43d15f9819e9430290af2"))
  67. +        (       0, uint256("0x"))
  68.          ;
  69.      static const CCheckpointData dataTestnet = {
  70.          &mapCheckpointsTestnet,
  71. diff -uNr godcoin/src/init.cpp achilles/src/init.cpp
  72. --- godcoin/src/init.cpp    2014-07-27 14:24:36.038629925 +0100
  73. +++ achilles/src/init.cpp   2014-07-27 14:26:27.382627441 +0100
  74. @@ -307,7 +307,7 @@
  75.          "  -socks=<n>             " + _("Select the version of socks proxy to use (4-5, default: 5)") + "\n" +
  76.          "  -tor=<ip:port>         " + _("Use proxy to reach tor hidden services (default: same as -proxy)") + "\n"
  77.          "  -dns                   " + _("Allow DNS lookups for -addnode, -seednode and -connect") + "\n" +
  78. -        "  -port=<port>           " + _("Listen for connections on <port> (default: 12701 or testnet: 12721)") + "\n" +
  79. +        "  -port=<port>           " + _("Listen for connections on <port> (default: 17256 or testnet: 12256)") + "\n" +
  80.          "  -maxconnections=<n>    " + _("Maintain at most <n> connections to peers (default: 125)") + "\n" +
  81.          "  -addnode=<ip>          " + _("Add a node to connect to and attempt to keep the connection open") + "\n" +
  82.          "  -connect=<ip>          " + _("Connect only to the specified node(s)") + "\n" +
  83. @@ -350,7 +350,7 @@
  84.  #endif
  85.          "  -rpcuser=<user>        " + _("Username for JSON-RPC connections") + "\n" +
  86.          "  -rpcpassword=<pw>      " + _("Password for JSON-RPC connections") + "\n" +
  87. -        "  -rpcport=<port>        " + _("Listen for JSON-RPC connections on <port> (default: 12700 or testnet: 12720)") + "\n" +
  88. +        "  -rpcport=<port>        " + _("Listen for JSON-RPC connections on <port> (default: 17255 or testnet: 12255)") + "\n" +
  89.          "  -rpcallowip=<ip>       " + _("Allow JSON-RPC connections from specified IP address") + "\n" +
  90.  #ifndef QT_GUI
  91.          "  -rpcconnect=<ip>       " + _("Send commands to node running on <ip> (default: 127.0.0.1)") + "\n" +
  92. diff -uNr godcoin/src/main.cpp achilles/src/main.cpp
  93. --- godcoin/src/main.cpp    2014-07-27 14:24:36.022629926 +0100
  94. +++ achilles/src/main.cpp   2014-07-27 14:26:27.358627442 +0100
  95. @@ -31,7 +31,7 @@
  96.  unsigned int nTransactionsUpdated = 0;
  97.  
  98.  map<uint256, CBlockIndex*> mapBlockIndex;
  99. -uint256 hashGenesisBlock("0x000000d33dc1866691d5a32ee21fcf8826958cfb40af3220f56c999414f258d5");
  100. +uint256 hashGenesisBlock("0x0000034e58835f5a592145ddb68adf4553513a5ca0ff02ddf51c0e2dcad59ca2");
  101.  
  102.  static CBigNum bnProofOfWorkLimit(~uint256(0) >> 20); // zencoin: starting difficulty is 1 / 2^12
  103.  CBlockIndex* pindexGenesisBlock = NULL;
  104. @@ -1087,21 +1087,17 @@
  105.      int64 nSubsidy = 0;
  106.      if(nHeight==1)
  107.      {
  108. -        nSubsidy = 10080*COIN;
  109. +        nSubsidy = 1100000*COIN;
  110.      }
  111. -    else if(nHeight<=140)
  112. +    else if(nHeight>2)
  113.      {
  114. -        nSubsidy = 1 *COIN;
  115. -    }
  116. -    else if(nHeight>140)
  117. -    {
  118. -        nSubsidy = 7 *COIN;
  119. +        nSubsidy = 80 *COIN;
  120.      }
  121.      return nSubsidy + nFees;
  122.  }
  123.  
  124. -static const int64 nTargetTimespan = 7 * 24 * 60 * 60; // Zencoin: 1 Day
  125. -static const int64 nTargetSpacing = 10 * 60; // Zencoin: 10 Minutes
  126. +static const int64 nTargetTimespan = 2.5 * 60; // Zencoin: 2.5 minutes
  127. +static const int64 nTargetSpacing = 2.5 * 60; // Zencoin: 2.5 Minutes
  128.  static const int64 nInterval = nTargetTimespan / nTargetSpacing; // 72
  129.  
  130.  //
  131. @@ -3079,7 +3075,7 @@
  132.          pchMessageStart[1] = 0x1a;
  133.          pchMessageStart[2] = 0x2c;
  134.          pchMessageStart[3] = 0xaf;
  135. -        hashGenesisBlock = uint256("0x00000c4e5b62e04d9e78c357fbaacfcfa78b3f2b16e43d15f9819e9430290af2");
  136. +        hashGenesisBlock = uint256("0x0000034e58835f5a592145ddb68adf4553513a5ca0ff02ddf51c0e2dcad59ca2");
  137.      }
  138.  
  139.      //
  140. @@ -3112,34 +3108,34 @@
  141.          //   vMerkleTree: 97ddfbbae6
  142.  
  143.          // Genesis block        
  144. -        const char* pszTimestamp = " 20/5/14 Authorities have let The Malaysian Airlines flight MH370 disappear";
  145. +        const char* pszTimestamp = "Zencoin Zencoin";
  146.          CTransaction txNew;
  147.          txNew.vin.resize(1);
  148.          txNew.vout.resize(1);
  149.          txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
  150. -        txNew.vout[0].nValue = 7 * COIN;
  151. +        txNew.vout[0].nValue = 80 * COIN;
  152.          txNew.vout[0].scriptPubKey = CScript() << ParseHex("040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9") << OP_CHECKSIG;
  153.          CBlock block;
  154.          block.vtx.push_back(txNew);
  155.          block.hashPrevBlock = 0;
  156.          block.hashMerkleRoot = block.BuildMerkleTree();
  157.          block.nVersion = 1;
  158. -        block.nTime    = 1403493000;
  159. +        block.nTime    = 1406102641;
  160.          block.nBits    = 0x1e0ffff0;
  161. -        block.nNonce   = 1586544;
  162. +        block.nNonce   = 1118322;
  163.  
  164.          if (fTestNet)
  165.          {
  166. -            block.nTime    = 1403414633;
  167. -            block.nNonce   = 590690;
  168. +            block.nTime    = 1406102641;
  169. +            block.nNonce   = 1118322;
  170.          }
  171. -
  172. +
  173.          //// debug print
  174.          uint256 hash = block.GetHash();
  175.          printf("%s\n", hash.ToString().c_str());
  176.          printf("%s\n", hashGenesisBlock.ToString().c_str());
  177.          printf("%s\n", block.hashMerkleRoot.ToString().c_str());
  178. -        assert(block.hashMerkleRoot == uint256("0xedac2ffe17ec70f2433b92fafc72fabdb10446012bd00f4fc1c5e075edcba429"));
  179. +        assert(block.hashMerkleRoot == uint256("0xab476d4d52343e0c21e4bc570491214ab88e8ae373d2df7095dee9b6d4c0c792"));
  180.          block.print();
  181.          assert(hash == hashGenesisBlock);
  182.  
  183. diff -uNr godcoin/src/main.h achilles/src/main.h
  184. --- godcoin/src/main.h  2014-07-27 14:24:36.018629926 +0100
  185. +++ achilles/src/main.h 2014-07-27 14:30:36.694621878 +0100
  186. @@ -54,7 +54,7 @@
  187.  /** Dust Hard Limit, ignored as wallet inputs (mininput default) */
  188.  static const int64 DUST_HARD_LIMIT = 1000;   // 0.00001 ZENZ mininput
  189.  /** No amount larger than this (in satoshi) is valid */
  190. -static const int64 MAX_MONEY = 21000000 * COIN;
  191. +static const int64 MAX_MONEY = 22000000 * COIN;
  192.  inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
  193.  /** Coinbase transaction outputs can only be spent after this number of new blocks (network rule) */
  194.  static const int COINBASE_MATURITY = 25;
  195. @@ -623,7 +623,7 @@
  196.      {
  197.          // Large (in bytes) low-priority (new, small-coin) transactions
  198.          // need a fee.
  199. -        return dPriority > COIN * 144 / 250; //144 blocks
  200. +        return dPriority > COIN * 576 / 250; //144 blocks
  201.      }
  202.  
  203.  // Apply the effects of this transaction on the UTXO set represented by view
  204. diff -uNr godcoin/src/net.cpp achilles/src/net.cpp
  205. --- godcoin/src/net.cpp 2014-07-27 14:24:36.026629926 +0100
  206. +++ achilles/src/net.cpp    2014-07-27 14:26:27.362627441 +0100
  207. @@ -1193,10 +1193,6 @@
  208.  // The second name should resolve to a list of seed addresses.
  209.  
  210.  static const char *strMainNetDNSSeed[][2] = {
  211. -    {"162.243.151.67", "162.243.151.67"},
  212. -    {"192.241.184.85", "192.241.184.85"},
  213. -    {"188.226.248.45", "188.226.248.45"},
  214. -    {"128.199.165.180", "128.199.165.180"},
  215.      {NULL, NULL},
  216.  };
  217.  
  218. diff -uNr godcoin/src/protocol.h achilles/src/protocol.h
  219. --- godcoin/src/protocol.h  2014-07-27 14:24:36.030629926 +0100
  220. +++ achilles/src/protocol.h 2014-07-27 14:26:27.374627441 +0100
  221. @@ -18,7 +18,7 @@
  222.  extern bool fTestNet;
  223.  static inline unsigned short GetDefaultPort(const bool testnet = fTestNet)
  224.  {
  225. -    return testnet ? 12721 : 12701;
  226. +    return testnet ? 12256 : 17256;
  227.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement