Bitcoin Forum
June 17, 2024, 03:56:02 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Mining alt coin always return AcceptBlock: high-hash, proof of work failed  (Read 135 times)
liorko87 (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 6


View Profile
January 11, 2021, 01:58:07 PM
 #1

I'm trying to mine new blocks (based on bitcoin v 0.20.1) to different networks (mainnet and testnet). During the creation of the genesis block I changed some of the parameters like nTime, nNonce and nBits.

The hash I received from CreateGenesisBlock was update at
Code:
assert(consensus.hashGenesisBlock == uint256S("<my_new_hash>"));

I also updated these values:

Code:
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
consensus.nMinimumChainWork = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");

When I'm re compiling the code and trying to build the network, I always get this error:
Code:
AcceptBlock: high-hash, proof of work failed

What I'm doing wrong? Which parameters I should change that the block will be accepted?
Does the problem is the hash of the genesis?
miner29
Full Member
***
Offline Offline

Activity: 1264
Merit: 138


View Profile
January 11, 2021, 02:01:54 PM
 #2

What are you trying to mine?

liorko87 (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 6


View Profile
January 11, 2021, 02:19:47 PM
 #3

I'm trying that the genesis block will be accepted by the PoW algorithm
miner29
Full Member
***
Offline Offline

Activity: 1264
Merit: 138


View Profile
January 11, 2021, 03:47:58 PM
 #4

Again what are you trying to mine.  Appears BTC but that wont work because that block is gone many years ago.  What chain (ie what coin) are you trying to generate for?

If you are spinning up a new chain then you will need a lot more than just a miner to make that happen.  None of the nodes on the BTC network or any other active coin will authenticate that block.

Please explain what you are trying to do because it doesnt make a lot of sense from what you have posted.  If you think you can just start a blockchain you got a lot more pieces missing than just a miner.

liorko87 (OP)
Newbie
*
Offline Offline

Activity: 29
Merit: 6


View Profile
January 12, 2021, 08:22:22 AM
Last edit: January 17, 2021, 11:14:35 AM by liorko87
 #5

For academic research I'm trying to create new independent chain where blocks are created in seconds. Therefore, I need a new genesis block for my main and test networks.

I have a private network of nodes that connect between them. I'm not trying to connect/post to the real BTC network.

***********EDIT**********
The problem solved by using the pow and the consensus parameters that used in the bitcoin itself.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!