0

So i am trying to do a monero hard fork. I changed the ports, prefixes, etc. I am running on a bit of an issue. I can't mine new blocks.

Here's the error:

 2019-04-27 22:07:02.425 [miner 0]       WARN    checkpoints     src/checkpoints/checkpoints.cpp:109     CHECKPOINT FAILED FOR HEIGHT 1. EXPECTED HASH: <771fbcd656ec1464d3a02ead5e18644030007a0fc664c0a964d30922821
a8148>, FETCHED HASH: <7989160f55d2b5deeb21f90fd4ae9c105642f2f354cd90c1cd84c4efff018d4a>
2019-04-27 22:07:02.425 [miner 0]       ERROR   blockchain      src/cryptonote_core/blockchain.cpp:3397 CHECKPOINT VALIDATION FAILED
2019-04-27 22:07:02.425 [miner 0]       ERROR   cn      src/cryptonote_core/cryptonote_core.cpp:1310    mined block failed verification
2019-04-27 22:07:02.497 [miner 0]       INFO    global  src/cryptonote_basic/miner.cpp:495      Found block <2ad7c5252afc7d5c6630bcced4c76c911aaab7dc8f8dcc670e6afd8a6735e0bd> at height 1 for difficulty: 1
2019-04-27 22:07:02.497 [miner 0]       INFO    blockchain.db.lmdb      src/blockchain_db/lmdb/db_lmdb.cpp:591  [check_and_resize_for_batch] checking DB size
2019-04-27 22:07:02.497 [miner 0]       INFO    blockchain.db.lmdb      src/blockchain_db/lmdb/db_lmdb.cpp:559  DB map size:     1073741824
2019-04-27 22:07:02.497 [miner 0]       INFO    blockchain.db.lmdb      src/blockchain_db/lmdb/db_lmdb.cpp:560  Space used:      77824
2019-04-27 22:07:02.497 [miner 0]       INFO    blockchain.db.lmdb      src/blockchain_db/lmdb/db_lmdb.cpp:561  Space remaining: 1073664000
2019-04-27 22:07:02.497 [miner 0]       INFO    blockchain.db.lmdb      src/blockchain_db/lmdb/db_lmdb.cpp:562  Size threshold:  92160000
2019-04-27 22:07:02.498 [miner 0]       INFO    blockchain.db.lmdb      src/blockchain_db/lmdb/db_lmdb.cpp:564  Percent used: 0.0001  Percent threshold: 0.9000
2019-04-27 22:07:02.498 [miner 0]       INFO    verify  src/cryptonote_core/blockchain.cpp:3367 No pre-validated hash at height 1, verifying fully

My cryptonote_config.h:

namespace config
{
  uint64_t const DEFAULT_FEE_ATOMIC_XMR_PER_KB = 500; // Just a placeholder!  Change me!
  uint8_t const FEE_CALCULATION_MAX_RETRIES = 10;
  uint64_t const DEFAULT_DUST_THRESHOLD = ((uint64_t)2000000000); // 2 * pow(10, 9)
  uint64_t const BASE_REWARD_CLAMP_THRESHOLD = ((uint64_t)100000000); // pow(10, 8)
  std::string const P2P_REMOTE_DEBUG_TRUSTED_PUB_KEY = "0000000000000000000000000000000000000000000000000000000000000000";

  uint64_t const CRYPTONOTE_PUBLIC_ADDRESS_BASE58_PREFIX = 60;
  uint64_t const CRYPTONOTE_PUBLIC_INTEGRATED_ADDRESS_BASE58_PREFIX = 61;
  uint64_t const CRYPTONOTE_PUBLIC_SUBADDRESS_BASE58_PREFIX = 62;
  uint16_t const P2P_DEFAULT_PORT = 17238;
  uint16_t const RPC_DEFAULT_PORT = 17239;
  uint16_t const ZMQ_RPC_DEFAULT_PORT = 17240;
  boost::uuids::uuid const NETWORK_ID = { {
      0x12 ,0x30, 0x71, 0xF1 , 0x61,  0x41, 0x04, 0x61, 0x31, 0x17, 0x00, 0x82, 0x16, 0xA1, 0x10, 0xA1
    } }; // Bender's nightmare
  std::string const GENESIS_TX = "013c01ff0001ffffffffffff0302BAxepF8U14PC2x98WiaKWuHdnj2dGEQHjYcsPMzRJohS8Yxt8cJtr8aG38A41k8M3ydKBRyc9fkkBHSoG5vW4hhLHGaaheP21017767aafcde9be00dcfd098715ebcf7f410daebc582fda69d24a28e9d0bc890d1";
  uint32_t const GENESIS_NONCE = 10000;

When i run status: status

Height: 1/1 (100.0%) on mainnet, not mining, net hash 0 H/s, v1, up to date, 0(out)+0(in) connections, uptime 0d 0h 0m 2s

Any idea why can't i mine new blocks?

1

You could try this:

In file...: monero-${VERSION}/CMakeLists.txt

Change....: set(PER_BLOCK_CHECKPOINT 1)
To........: set(PER_BLOCK_CHECKPOINT 0)
  • Doesn't that compromise security? – IvRRimUm Apr 29 at 17:01
  • Also it didn't work :// – IvRRimUm Apr 29 at 18:47
  • What worked for is to open build/release/Linus/release-${VERSION}/src/checkpoints.cpp and comment out the checkpoints. Example //ADD_CHECKPOINT(100, "ac3e11ca545e57c49fca2b4e8c48c03c23be047c43e471e1394528b1f9f80b2d"); Then do go to the build/release/Linus/release-${VERSION}/ and run make and then just run the monerod --offline and it works. – IvRRimUm Apr 29 at 19:09
  • If I remember correctly, when set(PER_BLOCK_CHECKPOINT 0), and run monerod, the log output will tell you what hash being looked for. Then change ADD_CHECKPOINT(1,"LongHexString"); to ADD_CHECKPOINT(0,"HashFromLogOutput"); and comment out the rest of the ADD_CHECKPOINT(n,"LongHexString");. This is from memory, so YMMV. – Mogens TrasherDK Apr 30 at 4:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.