sandoche / Proof-of-Stake-Cryptocurrency-generator

🍀 Create your own Proof of Stake cryptocurrency with its own blockchain based on NXT
https://coingenerator.sh
MIT License
359 stars 438 forks source link

Fatal Error during blockchain activation #14

Open BardoBravo opened 6 years ago

BardoBravo commented 6 years ago

When performing the step 2 (Create your own Cryptocurrency), the error SEVERE: Error in block generation thread is raised in the console.

Also, the account balance is showed as -999,999,999 and not connected, as displayed in this shared link

Any idea on how to solve it?

Regards

sandoche commented 6 years ago

Hello I think, there was a missing point in step 1: "Edit the genesisParameters.json file to define the timestamp of the genesis block for your new blockchain (epochBeginning), and the public key of the genesis account (genesisPublicKey)."

Be sure that the public key of the genesis account is not the same as the public keys you put in genesisAccounts.json

I invite you to do again step 1, maybe follow the video tutorial of NXT: https://www.youtube.com/watch?v=6Wg3uv07GU4

BardoBravo commented 6 years ago

Hello, I have followed the step 1 and created a new account, assigning its public key to 'genesisPublicKey' of genesisParameters.json file.

Any other suggestion?

BardoBravo commented 6 years ago

UPDATE: After machine restart, system now informs FINE: forger #### deadline 0 hit 0 started

sandoche commented 6 years ago

Do you still see -999,999,999 coins?

BardoBravo commented 6 years ago

Yes :(. It seems that the new account cannot establish a connection.

sandoche commented 6 years ago

Maybe you should contact the NXT Support in the NXT Slack. Also, check this video: https://www.youtube.com/watch?v=6Wg3uv07GU4 to be sure you didn't do anything wrong in the Step 1.

BardoBravo commented 6 years ago

Hi, I have done it all again and now I have the following issue and trying to run the crypto folder (Build your Crypto steps): " java.lang.RuntimeException: Errors running startup tasks:org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "BLOCK_ID_IDX ON PUBLIC.BLOCK(ID) VALUES ( / 4 / -5953303402691474650 )"; SQL statement:INSERT INTO block (id, version, timestamp, previous_block_id, total_amount, total_fee, payload_length, previous_block_hash, next_block_id, cumulative_difficulty, base_target, height, generation_signature, block_signature, payload_hash, generator_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23505-196] " It seems the parameter values are being sent as '?'.

Any suggestion?

sandoche commented 6 years ago

Yes, go to your crypto's folder and delete the nxt_db folder

BardoBravo commented 6 years ago

Hi, After deleting the folder, another issue is raised: " nxt.BlockchainProcessorImpl.addGenesisBlock(BlockchainProcessorImpl.java:1286) nxt.BlockchainProcessorImpl.lambda$new$5(BlockchainProcessorImpl.java:971) nxt.util.ThreadPool.lambda$runAll$1(ThreadPool.java:126)Exception in thread "Thread-2" java.lang.NullPointerException at nxt.Genesis.apply(Genesis.java:92) at nxt.BlockchainProcessorImpl.addGenesisBlock(BlockchainProcessorImpl.java:1275) at nxt.BlockchainProcessorImpl.lambda$new$5(BlockchainProcessorImpl.java:971) at nxt.util.ThreadPool.lambda$runAll$1(ThreadPool.java:126) at java.base/java.lang.Thread.run(Thread.java:844)

2018-05-18 13:14:22 SEVERE: Errors running startup tasks:nulljava.lang.RuntimeException: Errors running startup tasks:null at nxt.util.ThreadPool.runAll(ThreadPool.java:144) at nxt.util.ThreadPool.start(ThreadPool.java:74) at nxt.Nxt$Init.(Nxt.java:395) at nxt.Nxt.init(Nxt.java:327) at nxt.Nxt.main(Nxt.java:314) "

If I execute run.sh again, the same error with parameters as '?' is displayed.

sandoche commented 6 years ago

Have you updated the file genesisAccounts.json in the folder conf/data of your cryptocurrency, after your regenerated it?

BardoBravo commented 6 years ago

Yeap. I did it all again (third time) and the crypto account shows -999,999,999 balance, can start forging but the icon for 'Not connected' is RED. Was it supposed to be connected?

sandoche commented 5 years ago

Yes it's supposed to be connected. Is your total in genesisAccounts.json equals to 1 billion ?

Casper0513 commented 4 years ago

I have set mine to 1 billion but I am getting this error java.lang.RuntimeException: Errors running startup tasks: Total balance 299999999999957354 exceeds maximum allowed 100000000000000000

sandoche commented 4 years ago

This means your genesis block file is not well configured the total sum should equal 100000000000000000