Author Topic: Creating a genesis block using PTS as a model  (Read 8301 times)

0 Members and 1 Guest are viewing this topic.

Offline barwizi

  • Hero Member
  • *****
  • Posts: 764
  • Noirbits, NoirShares, NoirEx.....lol, noir anyone?
    • View Profile
    • Noirbitstalk.org
There exists a bounty on how to do this but I think it amounts to creating a single 'spend to may' transaction in the genesis block.

Doesn't this mean 10% of all coins/shares/whatever need to be "pre-mined?"  Or, if not pre-mined, just declared to be in existence by the genesis block?  That seems a little harsh of a requirement, since premining is often frowned upon.

It's not a premine per say, and yes you are stating that those coins are already in existence. I ay that it is not a premine because this is not the run of the mill crypto, these are more like shares in ventures and as a result the "pre-mine" notion is not applicable. Consider it IPO , and like every company, the parent company keeps a % of shares for it'self and employees then the rest is transferable.

on a side note, i used to be on the anti-pre-mine bandwagon, but now i see the light.
--Bar--  PiNEJGUv4AZVZkLuF6hV4xwbYTRp5etWWJ

The magical land of crypto, no freebies people.

Offline alatvian

  • Newbie
  • *
  • Posts: 12
    • View Profile
There exists a bounty on how to do this but I think it amounts to creating a single 'spend to may' transaction in the genesis block.

Doesn't this mean 10% of all coins/shares/whatever need to be "pre-mined?"  Or, if not pre-mined, just declared to be in existence by the genesis block?  That seems a little harsh of a requirement, since premining is often frowned upon.

Offline barwizi

  • Hero Member
  • *****
  • Posts: 764
  • Noirbits, NoirShares, NoirEx.....lol, noir anyone?
    • View Profile
    • Noirbitstalk.org
Freetrade could make this process easy by sharing the full details of how he made his version. I have come up with some clues from his code. I am thinking of a different method however, but i'll need to consult some gurus.
--Bar--  PiNEJGUv4AZVZkLuF6hV4xwbYTRp5etWWJ

The magical land of crypto, no freebies people.

Offline bytemaster

There exists a bounty on how to do this but I think it amounts to creating a single 'spend to may' transaction in the genesis block.

For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline alatvian

  • Newbie
  • *
  • Posts: 12
    • View Profile
am working on a modified version, i take it you were using MMC as the code base since PTS seems to have it all in order.

Not sure what MMC is.  The code for my project, RadioShares, is here: https://github.com/ddombrowsky/radioshares

Offline alatvian

  • Newbie
  • *
  • Posts: 12
    • View Profile
That is usually removed to prevent client tring to mine their own genesis blocks, or where the genesis has to be manually created/modified. Please read the draft license here, it is a recent development.

https://docs.google.com/document/d/1PGMvn2kMHQCK1ji4ieOV9Bt2wusq81C33GVxjzKEHSg/edit?usp=sharing

I have already mined the genesis block and have changed the code to meet the needs of my project.  This is a complete experiment and it's very possible that these "shares" on will amount to nothing but a learning experience.

Quote
and if you do choose to continue and abide by the consensus, we are attempting to write a guide to initializing chains that do just that here

https://docs.google.com/document/d/1xu4csMJB5jEb05EEzVWB2puCkQfFcXJtbAD6YPQ8ypc/edit?usp=sharing

if you can help, please post in this thread https://bitsharestalk.org/index.php?topic=1714.0 your gmail address and i will give you permission to edit the document

it still requires a lot of work and technical know how.

I'll post information in that thread.  I will contribute in any way I can.

your "experiment" should not be for public use since you are not honouring the Consensus. Any release of it into the public is in direct violation of the License.

I fully intend to honor the Consensus by giving 10% of the shares to all PTS holders at the time of the first issuing of real shares in the company.  I understand this isn't "honoring" the design restrictions (e.g. total share limit of 10x PTS shares), but these things did not exist when I started the project nor were they included in the publicly available source code for PTS nodes.  The end result will be the same: 10% going to those (including myself) who own ProtoShares. 

Offline barwizi

  • Hero Member
  • *****
  • Posts: 764
  • Noirbits, NoirShares, NoirEx.....lol, noir anyone?
    • View Profile
    • Noirbitstalk.org
am working on a modified version, i take it you were using MMC as the code base since PTS seems to have it all in order.
--Bar--  PiNEJGUv4AZVZkLuF6hV4xwbYTRp5etWWJ

The magical land of crypto, no freebies people.

Offline barwizi

  • Hero Member
  • *****
  • Posts: 764
  • Noirbits, NoirShares, NoirEx.....lol, noir anyone?
    • View Profile
    • Noirbitstalk.org
That is usually removed to prevent client tring to mine their own genesis blocks, or where the genesis has to be manually created/modified. Please read the draft license here, it is a recent development.

https://docs.google.com/document/d/1PGMvn2kMHQCK1ji4ieOV9Bt2wusq81C33GVxjzKEHSg/edit?usp=sharing

I have already mined the genesis block and have changed the code to meet the needs of my project.  This is a complete experiment and it's very possible that these "shares" on will amount to nothing but a learning experience.

Quote
and if you do choose to continue and abide by the consensus, we are attempting to write a guide to initializing chains that do just that here

https://docs.google.com/document/d/1xu4csMJB5jEb05EEzVWB2puCkQfFcXJtbAD6YPQ8ypc/edit?usp=sharing

if you can help, please post in this thread https://bitsharestalk.org/index.php?topic=1714.0 your gmail address and i will give you permission to edit the document

it still requires a lot of work and technical know how.

I'll post information in that thread.  I will contribute in any way I can.

your "experiment" should not be for public use since you are not honouring the Consensus. Any release of it into the public is in direct violation of the License.
--Bar--  PiNEJGUv4AZVZkLuF6hV4xwbYTRp5etWWJ

The magical land of crypto, no freebies people.

Offline betax

  • Hero Member
  • *****
  • Posts: 808
    • View Profile
I will be very interested in an "Idiots" guide, bootstrapping template, start to finish to create a DAC forking from PTS.

1.1 Use existing algorithm
1.2 Tips to ensure CPU only mining if decide to change it.
2. Set the number of shares to mine
4. How to give 10 % to both PTS holders and AGS (the document is focusing on the extraction), how do we initialise it, how the holders can easily claim their shares (as per Memory Coin). (Note I am not mentioning the genesis block, that should be part of the introduction).
5. Business Logic, example areas where we can add our business logic, ie add more information to the block chain, extract info (as per donschoe) etc.

The simpler to get started the better, I see PTS and AGS as a way to honour a very easy way to get started with your own DAC, then let the community, users decide if your business idea is good to invest. If it is everyone is a winner!
« Last Edit: January 08, 2014, 06:33:40 am by betax »
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline alatvian

  • Newbie
  • *
  • Posts: 12
    • View Profile
That is usually removed to prevent client tring to mine their own genesis blocks, or where the genesis has to be manually created/modified. Please read the draft license here, it is a recent development.

https://docs.google.com/document/d/1PGMvn2kMHQCK1ji4ieOV9Bt2wusq81C33GVxjzKEHSg/edit?usp=sharing

I have already mined the genesis block and have changed the code to meet the needs of my project.  This is a complete experiment and it's very possible that these "shares" on will amount to nothing but a learning experience.

Quote
and if you do choose to continue and abide by the consensus, we are attempting to write a guide to initializing chains that do just that here

https://docs.google.com/document/d/1xu4csMJB5jEb05EEzVWB2puCkQfFcXJtbAD6YPQ8ypc/edit?usp=sharing

if you can help, please post in this thread https://bitsharestalk.org/index.php?topic=1714.0 your gmail address and i will give you permission to edit the document

it still requires a lot of work and technical know how.

I'll post information in that thread.  I will contribute in any way I can.

Offline barwizi

  • Hero Member
  • *****
  • Posts: 764
  • Noirbits, NoirShares, NoirEx.....lol, noir anyone?
    • View Profile
    • Noirbitstalk.org
That is usually removed to prevent client tring to mine their own genesis blocks, or where the genesis has to be manually created/modified. Please read the draft license here, it is a recent development.

https://docs.google.com/document/d/1PGMvn2kMHQCK1ji4ieOV9Bt2wusq81C33GVxjzKEHSg/edit?usp=sharing

and if you do choose to continue and abide by the consensus, we are attempting to write a guide to initializing chains that do just that here

https://docs.google.com/document/d/1xu4csMJB5jEb05EEzVWB2puCkQfFcXJtbAD6YPQ8ypc/edit?usp=sharing

if you can help, please post in this thread https://bitsharestalk.org/index.php?topic=1714.0 your gmail address and i will give you permission to edit the document

it still requires a lot of work and technical know how.
« Last Edit: January 06, 2014, 09:17:14 am by barwizi »
--Bar--  PiNEJGUv4AZVZkLuF6hV4xwbYTRp5etWWJ

The magical land of crypto, no freebies people.

Offline alatvian

  • Newbie
  • *
  • Posts: 12
    • View Profile
Replying to my own post.

It appears to have been removed in this commit:
Code: [Select]
47b0793 2013-11-03 02:47:43 +0700 FreeTrade: Updated Genesis Block, require network for mining
diff --git a/src/main.cpp b/src/main.cpp
index 4bf0cf5..f4f2f32 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2835,29 +2835,6 @@ bool InitBlockIndex() {


          //halt program if genesis block not valid
-    if(hash != hashGenesisBlock || block.hashMerkleRoot != merkleRootGenesisBlock){
-               printf("Find hash for genesis block\n");
-                       //Compute hashes
-      CBigNum bnTarget;
-      bnTarget.SetCompact(block.nBits);
-      printf("bntarget=%s\n",bnTarget.getuint256().ToString().c_str());
-
-      do{
-         block.nNonce++;
-         hashGenesisBlock = block.CalculateBestBirthdayHash();
-         printf("hash=%s\n",hashGenesisBlock.ToString().c_str());
-      }while(hashGenesisBlock>bnTarget.getuint256());
-
-         //Print out these values to make it easy to paste when generating a new genesis block
-         block.print();
-         printf("coinnNonce=%d;\n",block.nNonce);
-         printf("birthdayA=%u;\n",block.nBirthdayA);
-         printf("birthdayB=%u;\n",block.nBirthdayB);
-         printf("verifyHashGenesisBlock=uint256(\"%s\");\n",hashGenesisBlock.ToString().c_str());
-         printf("verifyHashMerkleRoot=uint256(\"%s\");\n",block.BuildMerkleTree().ToString().c_str());
-      }
-
-
         assert(block.hashMerkleRoot == merkleRootGenesisBlock);
         assert(hash == hashGenesisBlock);

Offline alatvian

  • Newbie
  • *
  • Posts: 12
    • View Profile
I'm working on a proof-of-concept project and am trying to use the momentum algorithm as a baseline.  For this, I took the source code to the protoshares client and am attempting to create my own block chain for testing and development.  In the source code, the normal place where the code can be altered to generate a "genesis block" is missing in the protoshares source (in the InitBlockIndex() function in main.cpp). 

Was this code moved?  Is there some other way I can generate a genesis block for my own development network?