nochowderforyou / clams

Clam Project
MIT License
62 stars 58 forks source link

How was the original genesis block generated? #214

Closed CyberCriminal0 closed 8 years ago

CyberCriminal0 commented 8 years ago

I'm trying to setup my own PoS network from scratch and I thought your coin would be a great place to start. However I do not see anywhere in the code that involves the generation of a genesis block. Has this code been removed or was the original genesis block generated through other methods? Any help would be greatly appreciated. Thank you.

creativecuriosity commented 8 years ago

Generating your genesis block is a sort of "right of passage". An exhilarating experience that should not be robbed by hand holding, in my opinion.

Link

creativecuriosity commented 8 years ago

I think Litecoin may have the generation code at least partly intact and commented out - if not, review other alternative codebases.

Otherwise, I believe there are some python scripts floating around.

It is around.

CyberCriminal0 commented 8 years ago

Ok thank you so much. I've checked pretty much every single source (see pic) ss 2015-08-19 at 01 59 25

but I'll try to add the generation code again. Can't thank you enough if that's what I'm doing wrong.

CyberCriminal0 commented 8 years ago

I tried this python script originally: https://github.com/lhartikk/GenesisH0 but I was unsure what hashing algorithm I should use since the coin is PoS.

CyberCriminal0 commented 8 years ago

As well, the compiled daemon does not output to debug.log whenever the genesis data is changed. Is this something I have to enable before compiling?

creativecuriosity commented 8 years ago

The hashing algorithm is up to you.

Not sure I exactly understand the question concerning the debug.log file.

CyberCriminal0 commented 8 years ago

Thank you, I made a mistake in my change and forgot to alter somewhere else in the code. Running sed on the entire directory solved my issue.

creativecuriosity commented 8 years ago

Since speed of the hashing algorithm is not designed to be a limiting factor for a Proof-of-Stake network; one might suggest the usage of the easiest to calculate hashing algorithm, likely SHA; unless you intend to require Proof-Of-Work in the implementation or to punish stakers for having a large set of outputs staking.

EDIT: I am not the most technically skilled person here - you are likely best off waiting for a more experienced developer, such as xploited or dooglus, for more advice.

CyberCriminal0 commented 8 years ago

Thanks man. The hash I'm running right now for the genesis block is scrypt since it was the fastest to generate with cpu. My plan was to use PoS for my testing but I'm not sure now how to generate the next block. Since the genesis block evaporates the first coins, there's no owners of the coins to generate blocks through PoS. Right now I'm just pointing a scrypt miner at my clamsd but none of my block attempts are getting accepted. Any advice?

creativecuriosity commented 8 years ago

Please change port and constants such that you do not disrupt the normal network as you test. Further, you need to specify a period of PoW until you have mature coins to stake with; or use another work-around to bootstrap.

CyberCriminal0 commented 8 years ago

All constants are changed and the entire setup is behind a non-WAN facing network. How is the period of PoW achieved? Is it specified through checkpoints?

creativecuriosity commented 8 years ago

if(nheight > X){ doPOS } else { doPOW }

creativecuriosity commented 8 years ago

Completed - Closing.