forknote / cryptonote-generator

Generate Cryptonote coin with 1 command
104 stars 211 forks source link

Issues with premined genesis block #48

Closed luiscosio closed 6 years ago

luiscosio commented 6 years ago

Did several tries, every single time I'm getting this error:

2018-Jan-06 01:26:28.277608 ERROR [BlockchainSynchronizer] Failed to load: genesis block hash does not match stored state, read 7b933ca7336f0c9ccb05e61ed6eeddb26501a5316fb2829f04a963168cdede7d, expected a2210cd02bbbf68cca11b219ae6

Here is step-by-step what I'm doing:

1. Launch a brand new Ubuntu 16.04 LTS server
2. sudo apt-get update
3. sudo apt-get upgrade
4. Install dependencies according to https://github.com/facebook/rocksdb/blob/master/INSTALL.md, otherwise install fails.
5. wget https://github.com/forknote/forknote/releases/download/2.1.2/forknote-linux.tar.gz
6. tar -zxvf forknote-linux.tar.gz
7. cd /home/ubuntu/forknote-linux
8. Create "configs/FakeCoin.conf" using the online wizard (skipping reward address and genesis block)
9. ./simplewallet --config-file configs/FakeCoin.conf --generate-new-wallet genesis.wallet --password 1234567890
10. Same wizard, add wallet address for reward and the IP of the newly launched server, export it as FakeCoin.json
    11. cd /home/ubuntu/; git clone https://github.com/forknote/cryptonote-generator.git generator
12. cd /home/ubuntu/generator/
13. bash install_dependencies.sh
14. bash generator.sh -f configs/FakeCoin.json -c '-j2'
15. cd /home/ubuntu/generator/generated_files/builds/FakeCoin-linux/
16. ./FakeCoind --print-genesis-tx --genesis-block-reward-address FT7wrEqKTy7UaXPS7bc1btgGR4DX2fCzw3sk7cde5r8v1XALNc1BaKVMPHDm2JcLP81UbeAmq2ssfJE8TWpFdvk7GdDVeJU (this is the address that I created with simplewallet, before compiling)
16. Add genesis block to FakeCoin.json
17. bash generator.sh -f configs/FakeCoin.json -c '-j2'

Everything else is working, I can mine, create wallets, etc.

zhmrab commented 6 years ago

Did you add the genesis tx to fakecoin.conf as well? or just to the .json?

luiscosio commented 6 years ago

@zhmrab Just to the .json, since I generate the genesis block and recompile and start using the compiled simple wallet.

Also found an issue with the online generator, if you try to use forknote as a wallet with the config file, it can't sync because UPGRADE_HEIGHT_V3 in .json and conf file has different values, you need to extract it from CryptoNoteConfig.h, not sure if related.

zhmrab commented 6 years ago

Yes make sure you UPGRADE_HEIGHT_V3 & genesis tx values are identical in yourcoin.conf and yourcoin.json

Next, you need at least 2 seed nodes for your blockchain to start working,

For example 2 servers on which you have installed forknote and yourcoin.conf file will do,

Then on your computer : You can use Forknote to generate wallet and start mining (commands need specifications like path to config and daemon rpc port for the miner)

or use the generator with the .json version of your.conf to compile standalone exec files for win/mac/linux that will not require additional arg

luiscosio commented 6 years ago

@zhmrab Let me recreate my environment again using just forknote without compiling and will let you know. I will document everything.

Also, I'll do a pull request in this repo to update the missing dependencies on Ubuntu 16.04.

I saw in another thread that the name of the coin should be lowercase, is that correct?

zhmrab commented 6 years ago

Yes, you could also try to use the generator on 2 servers and go from there, compile the files on your computer and generate the genesis block on your local wallet

luiscosio commented 6 years ago

@zhmrab For some reason, the issue was mining the genesis block and using the simplewallet in the same server as one of the nodes.

zhmrab commented 6 years ago

Did you successfully get the premined coins on your wallet?

luiscosio commented 6 years ago

@zhmrab Yes, I managed to get them. The issue was using simplewallet and miner in a node.

zhmrab commented 6 years ago

Ok, could you direct me how you did it? Everything else with my setup is working except I cant get a hold of the premined coins...

luiscosio commented 6 years ago

@zhmrab @D3monWolf2483 Do not worry, it drove me crazy for a couple of days. Do you guys have Telegram? I could help you out there: https://t.me/forknote

zhmrab commented 6 years ago

@luiscosio just joined the forknote chat on telegram

On 10 Jan 2018, at 17:19, D3monWolf2483 notifications@github.com wrote:

plus idk how to use telegram

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.