How To Mine 1st Blocks After Genesis (PIVX Fork)?
I have generated the genesis block and related hashes, daemon runs fine.
I'm trying to mine the 1st block (block 1) using 'setgenerate true 1'
I've changed related params in chainparams.cpp, any time I run the command I get segmentation fault.
debug log shows
2018-06-25 19:30:54 keypool reserve 2
2018-06-25 19:30:54 CreateNewBlock(): total size 1000
Using latest master branch.
Answer
First thing you need to do is check the debug.log from .pivx folder second thing what data you given in pivx.conf ?
for mine ill add below
rpcuser=user
rpcpassword=password
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
staking=1
txindex=1
And your error segmentation fault. is because the miner.cpp . In src/miner.cpp there is line:
uint256 hashBlockLastAccumulated = chainActive[nHeight - (nHeight % 10) - 10]->GetBlockHash();
so, nHeight is blockchain last block number (which at empty blockchain is 0) + 1 = 1, and thus accessing negative index of array causes Segmentation Fault.
So you need edit this code anyway to run the mining process.
Related Questions
- → In a NodeJS Blockchain, does this code create a basic peer to peer blockchain that checks the previous block's hash?
- → How to mine 1st blocks after genesis (PIVX fork)?
- → Aion Faucet for Test Coins
- → How to run the Aion Kernel Script
- → How should i start learning code of any cryptocurrency?
- → Can I query Hyperledger Fabric ledger or update ledger without chaincode in peer?
- → Getting Bitcoin's block number in a specific date and hour?
- → How do you create a 12 or 24 mnemonics code for multiple cryptocurrencies (ETH, BTC and so on..)
- → Can Hyperledger Fabric Be Used To Create A Tradable Cryptocurrency?
- → Are "unconfirmed transactions" of a blockchain's memory pool spread over nodes?
- → How to receive only the transactions about particular set of addresses from blockchain without full syncing?
- → Detect if an IP address is running a Bitcoin node
- → What if a block size limit in a certain blockchain is exceeded and a new block isn't yet created?