14

Does anyone know how Monero's genesis block was created (and how I can generate a new one)?

Background information: I want to fork Monero for use as part of a school assignment (there are other things involved but this would be the core).

It's really easy with the Cryptonote 'reference' implementation, just build with no genesis_tx and then run the daemon with --print-genesis-tx but Monero seems to have been forked from Cryptonote before this was added.

I know I can easily build a private testnet (and even call it mainnet) and use the same genesis block but with a daemon on different ports, etc. But I don't think that will get the same level of appreciation from my professor (and I may as well just use the Cryptonote reference in that case).

Edit: Tried to comply better with Stack Exchange guidelines (I'm new).

1 Answer 1

11

Go here and screw around with the genesis tx and nonce. You probably also want to change other stuff (network id) to avoid contacting live Monero nodes.

I've helpfully decoded the genesis tx so you know/can guess what to change:

version
01
unlock time (varint, height, 60 here)
3c
vin length (value in)
01
vin #1 (of 1) type (gen, 0xff)
ff
height for gen input
00
vout length (value out)
01
output #1 (of 1) amount (17592186044415 as varint)
ffffffffffff03
output #1 type (to key, 0x02)
02
output #1 key (32 bytes)
9b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd088071
extra length in bytes (varint, here 33)
21
extra pubkey tag (0x01)
01
transaction pubkey (32 bytes)
7767aafcde9be00dcfd098715ebcf7f410daebc582fda69d24a28e9d0bc890d1
4
  • what we have to change? @Luigi Jan 27, 2018 at 16:27
  • @luigi can you explain in details ? what we should change and what are params using for ?
    – Sohan
    Feb 26, 2018 at 10:51
  • Still not clear. What do we need to change?
    – James
    Jul 5, 2018 at 11:15
  • where do you change network ID?
    – James
    Jul 5, 2018 at 11:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.